WIP Telegraf: Update config for latest version
This commit is contained in:
parent
1c734cefb1
commit
0b92d81d9f
2 changed files with 12 additions and 9 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
[[inputs.docker]]
|
[[inputs.docker]]
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
endpoint = "unix:///var/run/docker.sock"
|
||||||
perdevice = false
|
perdevice_include = []
|
||||||
total = true
|
|
||||||
total_include = ["cpu", "blkio", "network"]
|
total_include = ["cpu", "blkio", "network"]
|
||||||
container_name_include = []
|
container_name_include = []
|
||||||
container_name_exclude = []
|
container_name_exclude = []
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
[agent]
|
[agent]
|
||||||
interval = "{{ telegraf_interval }}"
|
interval = "{{ telegraf_interval }}"
|
||||||
hostname = ""
|
hostname = ""
|
||||||
|
skip_processors_after_aggregators = true
|
||||||
|
|
||||||
[[outputs.influxdb]]
|
[[outputs.influxdb]]
|
||||||
urls = ["{{ telegraf_server_url }}"]
|
urls = ["{{ telegraf_server_url }}"]
|
||||||
|
|
@ -23,18 +24,18 @@
|
||||||
collect_cpu_time = false ## If true, collect raw CPU time metrics
|
collect_cpu_time = false ## If true, collect raw CPU time metrics
|
||||||
report_active = true ## If true, compute and report the sum of all non-idle CPU states.
|
report_active = true ## If true, compute and report the sum of all non-idle CPU states.
|
||||||
|
|
||||||
fieldpass = ["usage_user", "usage_system", "usage_iowait", "usage_irq", "usage_active"]
|
fieldinclude = ["usage_user", "usage_system", "usage_iowait", "usage_irq", "usage_active"]
|
||||||
|
|
||||||
# Read metrics about memory usage
|
# Read metrics about memory usage
|
||||||
[[inputs.mem]]
|
[[inputs.mem]]
|
||||||
#fieldpass = ["total", "used_percent"]
|
#fieldinclude = ["total", "used_percent"]
|
||||||
|
|
||||||
# Read metrics about disk usage by mount point
|
# Read metrics about disk usage by mount point
|
||||||
[[inputs.disk]]
|
[[inputs.disk]]
|
||||||
# By default, telegraf gather stats for all mountpoints.
|
# By default, telegraf gather stats for all mountpoints.
|
||||||
mount_points = ["/", "/mnt/volume-nbg1-1", "/zroot", "/zfspool/zfsstore"]
|
mount_points = ["/", "/mnt/volume-nbg1-1", "/zroot", "/zfspool/zfsstore"]
|
||||||
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
|
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
|
||||||
fieldpass = ["total", "free", "used_percent"]
|
fieldinclude = ["total", "free", "used_percent"]
|
||||||
|
|
||||||
# Read metrics about disk IO by device
|
# Read metrics about disk IO by device
|
||||||
[[inputs.diskio]]
|
[[inputs.diskio]]
|
||||||
|
|
@ -43,7 +44,7 @@
|
||||||
devices = ["sd[a-d]", "mmcblk[0-1]", "ada[0-9]", "nvd[0-9]", "ploop*"]
|
devices = ["sd[a-d]", "mmcblk[0-1]", "ada[0-9]", "nvd[0-9]", "ploop*"]
|
||||||
## Uncomment the following line if you need disk serial numbers.
|
## Uncomment the following line if you need disk serial numbers.
|
||||||
# skip_serial_number = false
|
# skip_serial_number = false
|
||||||
fieldpass = ["read_bytes", "write_bytes", "io_time", "weighted_io_time", "iops_in_progress"]
|
fieldinclude = ["read_bytes", "write_bytes", "io_time", "weighted_io_time", "iops_in_progress"]
|
||||||
|
|
||||||
# Read metrics about system load & uptime
|
# Read metrics about system load & uptime
|
||||||
[[inputs.system]]
|
[[inputs.system]]
|
||||||
|
|
@ -51,13 +52,12 @@
|
||||||
|
|
||||||
# Get TCP connection state and UDP socket counts using lsof
|
# Get TCP connection state and UDP socket counts using lsof
|
||||||
[[inputs.netstat]]
|
[[inputs.netstat]]
|
||||||
fieldpass = ["tcp_established", "tcp_listen", "udp_socket"]
|
fieldinclude = ["tcp_established", "tcp_listen", "udp_socket"]
|
||||||
|
|
||||||
# Gather metrics about network interface and protocol usage (Linux only)
|
# Gather metrics about network interface and protocol usage (Linux only)
|
||||||
[[inputs.net]]
|
[[inputs.net]]
|
||||||
interfaces = ["eth*", "enp0s[0-1]", "venet*"]
|
interfaces = ["eth*", "enp0s[0-1]", "venet*"]
|
||||||
ignore_protocol_stats = true
|
fieldinclude = ["bytes_sent", "bytes_recv"]
|
||||||
fieldpass = ["bytes_sent", "bytes_recv"]
|
|
||||||
|
|
||||||
|
|
||||||
{% if telegraf_docker|default(false)|bool %}
|
{% if telegraf_docker|default(false)|bool %}
|
||||||
|
|
@ -88,7 +88,11 @@
|
||||||
# Read metrics of ZFS from arcstats, zfetchstats, vdev_cache_stats, and pools
|
# Read metrics of ZFS from arcstats, zfetchstats, vdev_cache_stats, and pools
|
||||||
[[inputs.zfs]]
|
[[inputs.zfs]]
|
||||||
## By default, telegraf gather all zfs stats
|
## By default, telegraf gather all zfs stats
|
||||||
|
{% if ansible_facts['os_family'] is defined and ansible_facts['os_family'] == "FreeBSD" %}
|
||||||
kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]
|
kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]
|
||||||
|
{% else %}
|
||||||
|
kstatMetrics = ["arcstats", "zfetchstats"]
|
||||||
|
{% endif %}
|
||||||
## By default, don't gather zpool stats
|
## By default, don't gather zpool stats
|
||||||
poolMetrics = true
|
poolMetrics = true
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue