summaryrefslogtreecommitdiffstats
path: root/plugins/check_mrtgtraf.d/config.h
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-11-27 07:35:29 +0100
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2025-11-27 07:35:29 +0100
commitcd7698a41945cdfe4cfe0e70cc9812f0c895b8db (patch)
treef778289cd325605b35f1d7d725c4c8c441f6bbc0 /plugins/check_mrtgtraf.d/config.h
parent0378484a57f219fc0156e208bff5152ee8624837 (diff)
downloadmonitoring-plugins-cd7698a41945cdfe4cfe0e70cc9812f0c895b8db.tar.gz
check_mrtgtraf: modern output implementation
Diffstat (limited to 'plugins/check_mrtgtraf.d/config.h')
-rw-r--r--plugins/check_mrtgtraf.d/config.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/plugins/check_mrtgtraf.d/config.h b/plugins/check_mrtgtraf.d/config.h
index 94929ff7..d9737243 100644
--- a/plugins/check_mrtgtraf.d/config.h
+++ b/plugins/check_mrtgtraf.d/config.h
@@ -1,6 +1,8 @@
1#pragma once 1#pragma once
2 2
3#include "../../config.h" 3#include "../../config.h"
4#include "output.h"
5#include "thresholds.h"
4#include <stddef.h> 6#include <stddef.h>
5#include <stdlib.h> 7#include <stdlib.h>
6 8
@@ -8,11 +10,12 @@ typedef struct {
8 char *log_file; 10 char *log_file;
9 int expire_minutes; 11 int expire_minutes;
10 bool use_average; 12 bool use_average;
11 unsigned long incoming_warning_threshold;
12 unsigned long incoming_critical_threshold;
13 unsigned long outgoing_warning_threshold;
14 unsigned long outgoing_critical_threshold;
15 13
14 mp_thresholds incoming_thresholds;
15 mp_thresholds outgoing_thresholds;
16
17 bool output_format_is_set;
18 mp_output_format output_format;
16} check_mrtgtraf_config; 19} check_mrtgtraf_config;
17 20
18check_mrtgtraf_config check_mrtgtraf_config_init() { 21check_mrtgtraf_config check_mrtgtraf_config_init() {
@@ -21,10 +24,10 @@ check_mrtgtraf_config check_mrtgtraf_config_init() {
21 .expire_minutes = -1, 24 .expire_minutes = -1,
22 .use_average = true, 25 .use_average = true,
23 26
24 .incoming_warning_threshold = 0, 27 .incoming_thresholds = mp_thresholds_init(),
25 .incoming_critical_threshold = 0, 28 .outgoing_thresholds = mp_thresholds_init(),
26 .outgoing_warning_threshold = 0, 29
27 .outgoing_critical_threshold = 0, 30 .output_format_is_set = false,
28 }; 31 };
29 return tmp; 32 return tmp;
30} 33}