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-28 00:35:51 +0100
committerGitHub <noreply@github.com>2025-11-28 00:35:51 +0100
commit16db5eed1e5c59493506fef4e69d564ee8e607ca (patch)
treee76f090874e11942c889e6acaf2bbc798d62120f /plugins/check_mrtgtraf.d/config.h
parent7827b55bbf3e0909b263f4e756c8dfcd12243b78 (diff)
parentcd7698a41945cdfe4cfe0e70cc9812f0c895b8db (diff)
downloadmonitoring-plugins-16db5eed1e5c59493506fef4e69d564ee8e607ca.tar.gz
Merge pull request #2183 from RincewindsHat/modern_output/check_mrtgtraf
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}