forked from Griesbacher/nagflux
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconfig.gcfg.example
More file actions
160 lines (137 loc) · 5.87 KB
/
config.gcfg.example
File metadata and controls
160 lines (137 loc) · 5.87 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
[main]
# This option is deprecated, use NagiosSpoolfile.Folder when possible
NagiosSpoolfileFolder = "/var/spool/nagios"
# This option is deprecated, use NagiosSpoolfile.WorkerCount when possible
NagiosSpoolfileWorker = 1
InfluxWorker = 2
MaxInfluxWorker = 5
DumpFile = "nagflux.dump"
# This option is deprecated, use NagfluxSpoolfile.Folder when possible
NagfluxSpoolfileFolder = "/var/spool/nagflux"
FieldSeparator = "&"
BufferSize = 10000
FileBufferSize = 65536
# If the performancedata does not have a certain target set with NAGFLUX:TARGET.
# The following field will define the target for this data.
# "all" sends the data to all Targets(every Influxdb, Elasticsearch...)
# a certain name will direct the data to this certain target
DefaultTarget = "all"
[Log]
# leave empty for stdout
LogFile = ""
# List of Severities https://godoc.org/github.com/kdar/factorlog#Severity
MinSeverity = "INFO"
[Filter]
# apply filter on spool file lines (raw perfdata) if not empty. Can be used multiple times.
#SpoolFileLineTerms = "_PERF=1" # ex.: added "\t_PERF=$_HOSTPERF$" to 'host_perfdata_template'
# apply filter on livestatus log results if not empty. Can be used multiple times.
#LivestatusLineTerms = ""
# append filter on livestatus notifications log queries if not empty. Must be in Livestatus format. Can be used multiple times.
#LivestatusNotificationsFilter = "Filter: current_host_custom_variables = PERF 1\nFilter: current_service_custom_variables = PERF 1\nOr: 2\n"
# append filter on livestatus comments queries if not empty. Must be in Livestatus format. Can be used multiple times.
#LivestatusCommentsFilter = "Filter: host_custom_variables = PERF_ENABLED 1\nFilter: service_custom_variables = PERF_ENABLED 1\nOr: 2\n"
# append filter on livestatus downtimes queries if not empty. Must be in Livestatus format. Can be used multiple times.
#LivestatusDowntimesFilter = "Filter: host_custom_variables = PERF 1\nFilter: service_custom_variables = PERF 1\nOr: 2\n"
# append filter on livestatus hosts queries if not empty. Must be in Livestatus format. Can be used multiple times.
#LivestatusHostsFilter = "Filter: custom_variables = PERF 1"
# append filter on livestatus service queries if not empty. Must be in Livestatus format. Can be used multiple times.
#LivestatusServicesFilter = "Filter: custom_variables = PERF 1"
[Monitoring]
# leave empty to disable
# PrometheusAddress = ":8080"
PrometheusAddress = ":8080"
[Livestatus]
Enabled = true
# tcp or file
Type = "tcp"
# tcp: 127.0.0.1:6557 or file /var/run/live
Address = "127.0.0.1:6557"
# The amount to minutes to wait for livestatus to come up, if set to 0 the detection is disabled
MinutesToWait = 2
# Set the Version of Livestatus. Allowed are Nagios, Icinga2, Naemon.
# If left empty Nagflux will try to detect it on it's own, which will not always work.
Version = ""
[NagiosSpoolfile]
Enabled = true
# This option takes predence over Main.NagiosSpoolfileFolder if set
Folder = "/var/spool/nagios"
# This option takes predence over Main.NagiosSpoolfileWorker if set
WorkerCount = 1
PerfdataLabelMaxLength = 32
PerfdataUOMMaxLength = 16
PerfdataNumericValuesMaxLength = 32
PerfdataThresholdsMaxLength = 64
[NagfluxSpoolfile]
Enabled = true
# This option takes predence over Main.NagfluxSpoolfileFolder if set
Folder = "/var/spool/nagflux"
[ModGearman "example"] #copy this block and rename it to add a second ModGearman queue
Enabled = false
Address = "127.0.0.1:4730"
Queue = "perfdata"
# Leave Secret and SecretFile empty to disable encryption
# If both are filled the the Secret will be used
# Secret to encrypt the gearman jobs
Secret = ""
# Path to a file which holds the secret to encrypt the gearman jobs
SecretFile = "/etc/mod-gearman/secret.key"
Worker = 1
[InfluxDBGlobal]
CreateDatabaseIfNotExists = true
NastyString = ""
NastyStringToReplace = ""
HostcheckAlias = "hostcheck"
ClientTimeout = 5
[InfluxDB "nagflux"]
Enabled = true
Version = 1.0
Address = "http://127.0.0.1:8086"
Arguments = "precision=ms&u=root&p=root&db=nagflux"
StopPullingDataIfDown = true
[InfluxDB "nagflux2"]
Enabled = true
Version = 2.0
Address = "http://127.0.0.1:8086"
Arguments = "precision=ms&org=nagflux&bucket=nagflux"
AuthToken = "ABCDEFGHIJLKMNOPQRSTUVWXYZ"
StopPullingDataIfDown = true
[InfluxDB "fast"]
Enabled = false
Version = 1.0
Address = "http://127.0.0.1:8086"
Arguments = "precision=ms&u=root&p=root&db=fast"
StopPullingDataIfDown = false
[InfluxDB "victoriametrics"]
Enabled = false
Version = 1.0
Address = "http://user:password@127.0.0.1:8428"
Arguments = "precision=ms"
StopPullingDataIfDown = false
HealthUrl="/health"
[InfluxDB "telegraf"]
Enabled = false
Version = 1.0
Address = "http://user:password@127.0.0.1:8186"
Arguments = "precision=ms"
StopPullingDataIfDown = false
# telegraf has no default health check, but can be added as additional output webserver:
HealthUrl="http://localhost:8080"
[ElasticsearchGlobal]
HostcheckAlias = "hostcheck"
NumberOfShards = 1
NumberOfReplicas = 1
# Sorts the indices "monthly" or "yearly"
IndexRotation = "monthly"
[Elasticsearch "example"]
Enabled = false
Address = "http://localhost:9200"
Index = "nagflux"
Version = 2.1
[JSONFileExport "one"]
Enabled = false
Path = "export/json"
# Timeinterval in Seconds till a new file will be used. 0 for no rotation.
# If no rotation is selected, the JSON Objects are appended line by line so,
# every single line is valid JSON but the whole file not.
# If rotation is selected every file as whole is valid JSON.
AutomaticFileRotation = "10"