telegraf: Add parameter to enable ZFS stats

Previous templates used the assumptioon, that FreeBSD will always have
ZFS and nothing else.
master
Jannik Beyerstedt 2 months ago
parent f3ffdfc133
commit 002c19f3ad

@ -70,6 +70,7 @@ Telegraf is configured with basic host telemetry by default. You can add more fe
- `telegraf_docker_file`: filename of the docker telegraf config part in `{{role_path}}/templates` (default `telegraf-docker.conf`).
- `telegraf_unifi_file`: filename of the SNMP telegraf config part in `{{role_path}}/templates` (default `telegraf-UniFi.conf.j2`).
- `telegraf_airmax_file`: filename of the SNMP telegraf config part in `{{role_path}}/templates` (default `telegraf-AirMAX.conf.j2`).
- `telegraf_enable_zfs`: gather ZFS stats (default `false`).
Optional settings:
- `telegraf_interval`: Data sampling interval (default `300s`)

@ -9,6 +9,7 @@ telegraf_interval: "300s"
telegraf_docker_file: "telegraf-docker.conf"
telegraf_unifi_file: "telegraf-UniFi.conf.j2"
telegraf_airmax_file: "telegraf-AirMAX.conf.j2"
telegraf_enable_zfs: false
exim_etc_mailname: "{{ inventory_hostname }}"
exim_skip_install: false

@ -84,7 +84,7 @@
name_override = "cpu_temp"
{% endif %}
{% if ((override_os_family is defined) | ternary(override_os_family,ansible_os_family)) == 'FreeBSD' %}
{% if telegraf_enable_zfs %}
# Read metrics of ZFS from arcstats, zfetchstats, vdev_cache_stats, and pools
[[inputs.zfs]]
## By default, telegraf gather all zfs stats

Loading…
Cancel
Save