summaryrefslogtreecommitdiffstats
path: root/lib/thresholds.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-02-21 14:33:24 +0100
committerGitHub <noreply@github.com>2025-02-21 14:33:24 +0100
commit75658bd04d84d037dbcc9fafd9f7860555ac4836 (patch)
tree6b50ee39401c68a27757abac785c931bd82ae02d /lib/thresholds.h
parentb38dec3e9b45efa6a6631acc38ada853e69fc547 (diff)
parent7c8c9d9b3e7bb6c29d82788d05d74e3f18f01aa5 (diff)
downloadmonitoring-plugins-master.tar.gz
Merge pull request #2064 from RincewindsHat/feature/new_output_infraHEADmastercoverity/master
Feature/new output infra
Diffstat (limited to 'lib/thresholds.h')
-rw-r--r--lib/thresholds.h28
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 */
9typedef struct thresholds_struct {
10 range *warning;
11 range *critical;
12} thresholds;
13
14typedef 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
21mp_thresholds mp_thresholds_init(void);
22
23mp_perfdata mp_pd_set_thresholds(mp_perfdata /* pd */, mp_thresholds /* th */);
24
25mp_state_enum mp_get_pd_status(mp_perfdata /* pd */);
26
27char *fmt_threshold_warning(thresholds th);
28char *fmt_threshold_critical(thresholds th);