diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-07-06 22:49:04 +0200 |
---|---|---|
committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-07-06 22:49:04 +0200 |
commit | 92c7b91002b64187a67463e79ae3d306f5de923c (patch) | |
tree | 0a167d65d488fd07641789e45c6863e2b982fe43 /lib/thresholds.c | |
parent | bb4ce15997a3023c5c4f2bb434b37699797272da (diff) | |
parent | e63acdb83d9edcc8c1e244fc34043b4876b74f16 (diff) | |
download | monitoring-plugins-92c7b91002b64187a67463e79ae3d306f5de923c.tar.gz |
Merge branch 'master' into refactor/check_load
Diffstat (limited to 'lib/thresholds.c')
-rw-r--r-- | lib/thresholds.c | 14 |
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 | |||
61 | mp_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 | |||
67 | mp_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 | } | ||