-
Notifications
You must be signed in to change notification settings - Fork 1
/
telegraf.conf
153 lines (122 loc) · 4.75 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
# Configuration for telegraf agent
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "3s"
flush_interval = "10s"
flush_jitter = "5s"
debug = false
quiet = false
logfile = "/var/log/telegraf/telegraf.log"
logfile_rotation_interval = "0d"
logfile_rotation_max_size = "1MB"
logfile_rotation_max_archives = 5
hostname = ""
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb]]
urls = ["http://influxdb:8086"] # required
database = "telegraf" # required
username = "telegraf"
password = "instrument"
## If true, the database tag will not be added to the metric.
exclude_database_tag = false
retention_policy = ""
write_consistency = "any"
timeout = "5s"
## If true, no CREATE DATABASE queries will be sent. Set to true when using
## Telegraf with a user without permissions to create databases or when the
## database already exists.
skip_database_creation = false
###############################################################################
# INPUT PLUGINS #
###############################################################################
# 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
report_active = false
# Read metrics about disk usage by mount point
[[inputs.disk]]
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
## present on /run, /var/run, /dev/shm or /dev).
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
# Read metrics about disk IO by device
[[inputs.diskio]]
## Setting devices will restrict the stats to the specified devices.
# devices = ["sda", "sdb"]
# 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"]
[[inputs.internal]]
collect_memstats = true
# # Read metrics about network interface usage
[[inputs.net]]
interfaces = ["eth*"]
# # Read metrics about docker containers
[[inputs.docker]]
endpoint = "unix:///var/run/docker.sock"
timeout = "5s"
# Statsd Server
[[inputs.statsd]]
## Address and port to host UDP listener on
service_address = ":8125"
## Percentiles to calculate for timing & histogram stats.
percentiles = [50.0, 75.0, 99.0, 99.9]
## Delete gauges every interval (default=false)
delete_gauges = true
## Delete counters every interval (default=false)
delete_counters = true
## separator to use between elements of a statsd metric
metric_separator = "_"
## convert measurement names, “.” to “_” and “-” to “__”
convert_names = false
## used to parse StatD variable name correctly for InfluxDB
## it enables to have counters/gauges grouped by measurement
templates = [
"* measurement.field"
]
## Parses extensions to statsd in the datadog statsd format
## currently supports metrics and datadog tags.
## http://docs.datadoghq.com/guides/dogstatsd/
datadog_extensions = true
## Number of UDP messages allowed to queue up, once filled,
## the statsd server will start dropping packets
allowed_pending_messages = 10000
## Number of timing/histogram values to track per-measurement in the
## calculation of percentiles. Raising this limit increases the accuracy
## of percentiles but also increases the memory usage and cpu time.
percentile_limit = 1000
# [[inputs.docker_log]]
# ## To use TCP, set endpoint = "tcp://[ip]:[port]"
# ## To use environment variables (ie, docker-machine), set endpoint = "ENV"
# endpoint = "unix:///var/run/docker.sock"
# ## When true, container logs are read from the beginning; otherwise
# ## reading begins at the end of the log.
# # from_beginning = false
# ## docker labels to include. Globs accepted.
# ## Note that an empty array for both will include all labels as tags
# docker_label_include = ["logcapture"]
# ## Set the source tag for the metrics to the container ID hostname, eg first 12 chars
# source_tag = true