summaryrefslogtreecommitdiffstats
path: root/plugins/check_mrtg.d/config.h
blob: 96b849a2cdda0c4bd9774d56a277dadd6a6667d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "../../config.h"
#include <stddef.h>
#include <stdlib.h>

typedef struct {
	bool use_average;
	int variable_number;
	int expire_minutes;
	char *label;
	char *units;
	char *log_file;

	bool value_warning_threshold_set;
	unsigned long value_warning_threshold;
	bool value_critical_threshold_set;
	unsigned long value_critical_threshold;
} check_mrtg_config;

check_mrtg_config check_mrtg_config_init() {
	check_mrtg_config tmp = {
		.use_average = true,
		.variable_number = -1,
		.expire_minutes = 0,
		.label = NULL,
		.units = NULL,
		.log_file = NULL,

		.value_warning_threshold_set = false,
		.value_warning_threshold = 0,
		.value_critical_threshold_set = false,
		.value_critical_threshold = 0,
	};
	return tmp;
}