-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtelegraf.conf
407 lines (358 loc) · 13.7 KB
/
telegraf.conf
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
[[outputs.influxdb_v2]]
## The URLs of the InfluxDB cluster nodes.
##
## Multiple URLs can be specified for a single cluster, only ONE of the
## urls will be written to each interval.
## urls exp: http://127.0.0.1:9999
urls = ["http://192.168.1.20:8086"]
## Token for authentication.
# token = "$INFLUX_TOKEN"
token = "<removed>"
## Organization is the name of the organization you wish to write to; must exist.
organization = "<removed>"
## Destination bucket to write into.
bucket = "sophie-bucket"
###############################################################################
# INPUT PLUGINS #
###############################################################################
[[inputs.http_response]]
urls = ["http://<removed>:32400/web/index.html","https://<removed>","http://192.168.1.20:7878","http://<removed>:9000","http://192.168.1.8/admin","http://192.168.1.20:5076/","http://192.168.1.20:8989/","http://192.168.1.20:8181/home","http://192.168.1.20:8581","<removed>"]
response_timeout = "10s"
method = "GET"
follow_redirects = false
insecure_skip_verify = true
[[processors.enum]]
[[processors.enum.mapping]]
## Name of the field to map. Globs accepted.
tag = "server"
## Name of the tag to map. Globs accepted.
# tag = "status"
## Destination tag or field to be used for the mapped value. By default the
## source tag or field is used, overwriting the original value.
dest = "server_friendly"
## Default value to be used for all values not contained in the mapping
## table. When unset and no match is found, the original field will remain
## unmodified and the destination tag or field will not be created.
# default = 0
## Table of mappings
[processors.enum.mapping.value_mappings]
"http://<removed>:32400/web/index.html" = "Plex"
"http://192.168.1.20:5076/" = "NZBHydra"
"http://192.168.1.20:7878" = "Radarr"
"http://192.168.1.20:8181/home" = "Tautulli"
"http://192.168.1.20:8581" = "Homebridge"
"http://192.168.1.20:8989/" = "Sonarr"
"http://192.168.1.8/admin" = "Pi-Hole"
"https://<removed>" = "Petio external"
"http://<removed>:9000" = "Portainer"
# Read metrics about cpu usage
[[inputs.cpu]]
## Whether to report per-cpu stats or not","
percpu = true
## Whether to report total system cpu stats or not
totalcpu = true
## If true, collect raw CPU time metrics.
collect_cpu_time = false
## If true, compute and report the sum of all non-idle CPU states.
report_active = false
# Read metrics about disk usage by mount point
[[inputs.disk]]
## By default stats will be gathered for all mount points.
## Set mount_points will restrict the stats to only the specified mount points.
# mount_points = ["/"]
## Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
# Read metrics about disk IO by device
[[inputs.diskio]]
## By default, telegraf will gather stats for all devices including
## disk partitions.
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb", "vd*"]
## Uncomment the following line if you need disk serial numbers.
# skip_serial_number = false
#
## On systems which support it, device metadata can be added in the form of
## tags.
## Currently only Linux is supported via udev properties. You can view
## available properties for a device by running:
## 'udevadm info -q property -n /dev/sda'
## Note: Most, but not all, udev properties can be accessed this way. Properties
## that are currently inaccessible include DEVTYPE, DEVNAME, and DEVPATH.
# device_tags = ["ID_FS_TYPE", "ID_FS_USAGE"]
#
## Using the same metadata source as device_tags, you can also customize the
## name of the device via templates.
## The 'name_templates' parameter is a list of templates to try and apply to
## the device. The template may contain variables in the form of '$PROPERTY' or
## '${PROPERTY}'. The first template which does not contain any variables not
## present for the device is used as the device name tag.
## The typical use case is for LVM volumes, to get the VG/LV name instead of
## the near-meaningless DM-0 name.
# name_templates = ["$ID_FS_LABEL","$DM_VG_NAME/$DM_LV_NAME"]
# Get kernel statistics from /proc/stat
[[inputs.kernel]]
# no configuration
# Read metrics about memory usage
[[inputs.mem]]
# no configuration
# Get the number of processes and group them by status
[[inputs.processes]]
# no configuration
# Read metrics about swap memory usage
[[inputs.swap]]
# no configuration
# Read metrics about system load & uptime
[[inputs.system]]
## Uncomment to remove deprecated metrics.
# fielddrop = ["uptime_format"]
# # Monitor APC UPSes connected to apcupsd
[[inputs.apcupsd]]
# # A list of running apcupsd server to connect to.
# # If not provided will default to tcp://127.0.0.1:3551
servers = [ "tcp://192.168.1.20:3551" ]
#,"tcp://192.168.1.35:3551"]
#
# ## Timeout for dialing server.
timeout = "15s"
# # Query given DNS server and gives statistics
[[inputs.dns_query]]
servers = ["8.8.8.8"]
domains = ["."]
record_type = "A"
timeout = 10
name_override = "google_dns"
# ## servers to query
# servers = ["8.8.8.8"]
#
# ## Network is the network protocol name.
# # network = "udp"
#
# ## Domains or subdomains to query.
# # domains = ["."]
#
# ## Query record type.
# ## Possible values: A, AAAA, CNAME, MX, NS, PTR, TXT, SOA, SPF, SRV.
# # record_type = "A"
#
# ## Dns server port.
# # port = 53
#
# ## Query timeout in seconds.
# # timeout = 2
# # Read metrics about docker containers
# [[inputs.docker]]
# ## Docker Endpoint
# ## To use TCP, set endpoint = "tcp://[ip]:[port]"
# ## To use environment variables (ie, docker-machine), set endpoint = "ENV"
# endpoint = "unix:///var/run/docker.sock"
#
# ## Set to true to collect Swarm metrics(desired_replicas, running_replicas)
# gather_services = false
#
# ## Only collect metrics for these containers, collect all if empty
# container_names = []
#
# ## Set the source tag for the metrics to the container ID hostname, eg first 12 chars
# source_tag = false
#
# ## Containers to include and exclude. Globs accepted.
# ## Note that an empty array for both will include all containers
# container_name_include = []
# container_name_exclude = []
#
# ## Container states to include and exclude. Globs accepted.
# ## When empty only containers in the "running" state will be captured.
# ## example: container_state_include = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
# ## example: container_state_exclude = ["created", "restarting", "running", "removing", "paused", "exited", "dead"]
# # container_state_include = []
# # container_state_exclude = []
#
# ## Timeout for docker list, info, and stats commands
# timeout = "5s"
#
# ## Whether to report for each container per-device blkio (8:0, 8:1...) and
# ## network (eth0, eth1, ...) stats or not
# perdevice = true
#
# ## Whether to report for each container total blkio and network stats or not
# total = false
#
# ## Which environment variables should we use as a tag
# ##tag_env = ["JAVA_HOME", "HEAP_SIZE"]
#
# ## docker labels to include and exclude as tags. Globs accepted.
# ## Note that an empty array for both will include all labels as tags
# docker_label_include = []
# docker_label_exclude = []
#
# ## Optional TLS Config
# # tls_ca = "/etc/telegraf/ca.pem"
# # tls_cert = "/etc/telegraf/cert.pem"
# # tls_key = "/etc/telegraf/key.pem"
# ## Use TLS but skip chain & host verification
# # insecure_skip_verify = false
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
gather_services = false
container_name_include = []
container_name_exclude = []
timeout = "5s"
docker_label_include = []
docker_label_exclude = []
perdevice = true
total = false
# # Returns ethtool statistics for given interfaces
# [[inputs.ethtool]]
# ## List of interfaces to pull metrics for
# # interface_include = ["eth0"]
#
# ## List of interfaces to ignore when pulling metrics.
# # interface_exclude = ["eth1"]
# # Read metrics from fail2ban.
# [[inputs.fail2ban]]
# ## Use sudo to run fail2ban-client
# use_sudo = false
# # Parse a complete file each interval
[[inputs.file]]
files = ["/sys/class/thermal/thermal_zone0/temp"]
name_override = "cpu_temperature"
data_format = "value"
data_type = "integer"
# ## Files to parse each interval. Accept standard unix glob matching rules,
# ## as well as ** to match recursive files and directories.
# files = ["/tmp/metrics.out"]
#
# ## Name a tag containing the name of the file the data was parsed from. Leave empty
# ## to disable.
# # file_tag = ""
#
# ## Character encoding to use when interpreting the file contents. Invalid
# ## characters are replaced using the unicode replacement character. When set
# ## to the empty string the data is not decoded to text.
# ## ex: character_encoding = "utf-8"
# ## character_encoding = "utf-16le"
# ## character_encoding = "utf-16be"
# ## character_encoding = ""
# # character_encoding = ""
#
# ## The dataformat to be read from files
# ## Each data format has its own unique set of configuration options, read
# ## more about them here:
# ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
# data_format = "influx"
# # Monitor disks' temperatures using hddtemp
[[inputs.hddtemp]]
# ## By default, telegraf gathers temps data from all disks detected by the
# ## hddtemp.
# ##
# ## Only collect temps from the selected disks.
# ##
# ## A * as the device name will return the temperature values of all disks.
# ##
# # address = "127.0.0.1:7634"
# # devices = ["sda", "*"]
# # Read metrics about network interface usage
[[inputs.net]]
# ## By default, telegraf gathers stats from any up interface (excluding loopback)
# ## Setting interfaces will tell it to gather these explicit interfaces,
# ## regardless of status.
# ##
interfaces = ["br0"]
# ##
# ## On linux systems telegraf also collects protocol stats.
# ## Setting ignore_protocol_stats to true will skip reporting of protocol metrics.
# ##
# # ignore_protocol_stats = false
# ##
# # Read TCP metrics such as established, time wait and sockets counts.
[[inputs.netstat]]
# # no configuration
# # Ping given url(s) and return statistics
[[inputs.ping]]
urls = ["www.google.com"] # required
count = 4
interface = "br0"
name_override = "google_ping"
# ## Hosts to send ping packets to.
# urls = ["example.org"]
#
# ## Method used for sending pings, can be either "exec" or "native". When set
# ## to "exec" the systems ping command will be executed. When set to "native"
# ## the plugin will send pings directly.
# ##
# ## While the default is "exec" for backwards compatibility, new deployments
# ## are encouraged to use the "native" method for improved compatibility and
# ## performance.
# # method = "exec"
#
# ## Number of ping packets to send per interval. Corresponds to the "-c"
# ## option of the ping command.
# # count = 1
#
# ## Time to wait between sending ping packets in seconds. Operates like the
# ## "-i" option of the ping command.
# # ping_interval = 1.0
#
# ## If set, the time to wait for a ping response in seconds. Operates like
# ## the "-W" option of the ping command.
# # timeout = 1.0
#
# ## If set, the total ping deadline, in seconds. Operates like the -w option
# ## of the ping command.
# # deadline = 10
#
# ## Interface or source address to send ping from. Operates like the -I or -S
# ## option of the ping command.
# # interface = ""
#
# ## Percentiles to calculate. This only works with the native method.
# # percentiles = [50, 95, 99]
#
# ## Specify the ping executable binary.
# # binary = "ping"
#
# ## Arguments for ping command. When arguments is not empty, the command from
# ## the binary option will be used and other options (ping_interval, timeout,
# ## etc) will be ignored.
# # arguments = ["-c", "3"]
#
# ## Use only IPv6 addresses when resolving a hostname.
# # ipv6 = false
# # Monitor sensors, requires lm-sensors package
[[inputs.sensors]]
# ## Remove numbers from field names.
# ## If true, a field name like 'temp1_input' will be changed to 'temp_input'.
# # remove_numbers = true
#
# ## Timeout is the maximum amount of time that the sensors command can run.
# # timeout = "5s"
#attributes = true
# # A plugin to collect stats from the Unbound DNS resolver
# [[inputs.unbound]]
# ## Address of server to connect to, read from unbound conf default, optionally ':port'
# ## Will lookup IP if given a hostname
# server = "127.0.0.1:8953"
#
# ## If running as a restricted user you can prepend sudo for additional access:
# # use_sudo = false
#
# ## The default location of the unbound-control binary can be overridden with:
# # binary = "/usr/sbin/unbound-control"
#
# ## The default location of the unbound config file can be overridden with:
# # config_file = "/etc/unbound/unbound.conf"
#
# ## The default timeout of 1s can be overridden with:
# # timeout = "1s"
#
# ## When set to true, thread metrics are tagged with the thread id.
# ##
# ## The default is false for backwards compatibility, and will be changed to
# ## true in a future version. It is recommended to set to true on new
# ## deployments.
# thread_as_tag = false
# # Collect Wireguard server interface and peer statistics
# [[inputs.wireguard]]
# ## Optional list of Wireguard device/interface names to query.
# ## If omitted, all Wireguard interfaces are queried.
# # devices = ["wg0"]