diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-18 21:58:34 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-02-18 21:58:34 +0100 |
| commit | 0645c9fc2c7f801ba3c7d68a17c137a63ada299f (patch) | |
| tree | ce222906f546f03301defba9ce81ba57591a8eb3 /lib/thresholds.h | |
| parent | 39680498ee0987a5e0eb203a2c0539aa1fa94d39 (diff) | |
| download | monitoring-plugins-0645c9fc2c7f801ba3c7d68a17c137a63ada299f.tar.gz | |
Implement new output functionality
Diffstat (limited to 'lib/thresholds.h')
| -rw-r--r-- | lib/thresholds.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/thresholds.h b/lib/thresholds.h new file mode 100644 index 00000000..4e7defee --- /dev/null +++ b/lib/thresholds.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include "./perfdata.h" | ||
| 4 | #include "states.h" | ||
| 5 | |||
| 6 | /* | ||
| 7 | * Old threshold type using the old range type | ||
| 8 | */ | ||
| 9 | typedef struct thresholds_struct { | ||
| 10 | range *warning; | ||
| 11 | range *critical; | ||
| 12 | } thresholds; | ||
| 13 | |||
| 14 | typedef struct mp_thresholds_struct { | ||
| 15 | bool warning_is_set; | ||
| 16 | mp_range warning; | ||
| 17 | bool critical_is_set; | ||
| 18 | mp_range critical; | ||
| 19 | } mp_thresholds; | ||
| 20 | |||
| 21 | mp_thresholds mp_thresholds_init(void); | ||
| 22 | |||
| 23 | mp_perfdata mp_pd_set_thresholds(mp_perfdata /* pd */, mp_thresholds /* th */); | ||
| 24 | |||
| 25 | mp_state_enum mp_get_pd_status(mp_perfdata /* pd */); | ||
| 26 | |||
| 27 | char *fmt_threshold_warning(thresholds th); | ||
| 28 | char *fmt_threshold_critical(thresholds th); | ||
