monitoring-plugins/lib/thresholds.h
2025-02-18 21:58:34 +01:00

28 lines
604 B
C

#pragma once
#include "./perfdata.h"
#include "states.h"
/*
* Old threshold type using the old range type
*/
typedef struct thresholds_struct {
range *warning;
range *critical;
} thresholds;
typedef struct mp_thresholds_struct {
bool warning_is_set;
mp_range warning;
bool critical_is_set;
mp_range critical;
} mp_thresholds;
mp_thresholds mp_thresholds_init(void);
mp_perfdata mp_pd_set_thresholds(mp_perfdata /* pd */, mp_thresholds /* th */);
mp_state_enum mp_get_pd_status(mp_perfdata /* pd */);
char *fmt_threshold_warning(thresholds th);
char *fmt_threshold_critical(thresholds th);