summaryrefslogtreecommitdiffstats
path: root/lib/thresholds.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-08-11 21:54:05 +0200
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-08-11 21:54:05 +0200
commit7382fa90f84d38cd2ae08c880e9ed6a4ad644d35 (patch)
treee367f424cfb94bd6730e196916a96a9725e61c27 /lib/thresholds.c
parentfb39f96ac6f72bb56d17f3e8694134dfea9186e9 (diff)
parent1dfb5a0c10881b43cb60cf93bab63648c61201b5 (diff)
downloadmonitoring-plugins-7382fa90f84d38cd2ae08c880e9ed6a4ad644d35.tar.gz
Merge branch 'master' into refactor/check_users
Diffstat (limited to 'lib/thresholds.c')
-rw-r--r--lib/thresholds.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/thresholds.c b/lib/thresholds.c
index ddefae37..de2b9315 100644
--- a/lib/thresholds.c
+++ b/lib/thresholds.c
@@ -51,9 +51,21 @@ mp_state_enum mp_get_pd_status(mp_perfdata perfdata) {
51 } 51 }
52 if (perfdata.warn_present) { 52 if (perfdata.warn_present) {
53 if (mp_check_range(perfdata.value, perfdata.warn)) { 53 if (mp_check_range(perfdata.value, perfdata.warn)) {
54 return STATE_CRITICAL; 54 return STATE_WARNING;
55 } 55 }
56 } 56 }
57 57
58 return STATE_OK; 58 return STATE_OK;
59} 59}
60
61mp_thresholds mp_thresholds_set_warn(mp_thresholds thlds, mp_range warn) {
62 thlds.warning = warn;
63 thlds.warning_is_set = true;
64 return thlds;
65}
66
67mp_thresholds mp_thresholds_set_crit(mp_thresholds thlds, mp_range crit) {
68 thlds.critical = crit;
69 thlds.critical_is_set = true;
70 return thlds;
71}