From c79da275858099d4d5f809f8b0622ebe541b2181 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Mon, 11 May 2026 10:44:58 +0000 Subject: [PATCH] host-metrics: telegraf config template Co-Authored-By: Claude Sonnet 4.6 --- .../config/host-metrics/telegraf.conf.tpl | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 stack_orchestrator/data/config/host-metrics/telegraf.conf.tpl diff --git a/stack_orchestrator/data/config/host-metrics/telegraf.conf.tpl b/stack_orchestrator/data/config/host-metrics/telegraf.conf.tpl new file mode 100644 index 00000000..b7322ca3 --- /dev/null +++ b/stack_orchestrator/data/config/host-metrics/telegraf.conf.tpl @@ -0,0 +1,60 @@ +# host-metrics telegraf template. +# Rendered at container start by telegraf-entrypoint.sh: +# - @@HOST_TAG_BLOCK@@ -> [global_tags] host = "" if HOST_TAG set, +# empty if unset (telegraf auto-tags with kernel hostname). +# - @@ZFS_BLOCK@@ -> [[inputs.zfs]] block if COLLECT_ZFS=true, else empty. +# All ${...} variables are resolved by telegraf's native env substitution at +# config-load time. + +@@HOST_TAG_BLOCK@@ + +[agent] + interval = "${COLLECT_INTERVAL}" + round_interval = true + collection_jitter = "0s" + flush_interval = "${COLLECT_INTERVAL}" + flush_jitter = "0s" + precision = "0s" + hostname = "" + omit_hostname = false + +[[outputs.influxdb]] + urls = ["${INFLUXDB_URL}"] + database = "${INFLUXDB_DB}" + skip_database_creation = true + username = "${INFLUXDB_USER}" + password = "${INFLUXDB_PASSWORD}" + retention_policy = "" + write_consistency = "any" + timeout = "10s" + +[[inputs.cpu]] + percpu = false + totalcpu = true + collect_cpu_time = false + report_active = true + +[[inputs.mem]] + +[[inputs.swap]] + +[[inputs.system]] + +[[inputs.processes]] + +[[inputs.disk]] + ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", + "aufs", "squashfs", "nsfs", "tracefs", "proc", "sysfs", + "cgroup", "cgroup2", "fuse.lxcfs"] + mount_points = ["/hostfs"] + +[[inputs.diskio]] + device_tags = ["DEVNAME"] + skip_serial_number = true + name_templates = ["$DEVNAME"] + +[[inputs.net]] + ignore_protocol_stats = true + interfaces = ["eth*", "en*", "ens*", "eno*", "enp*", "wlan*"] + +@@ZFS_BLOCK@@