host-metrics: stack.yml + compose skeleton
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>pull/753/head
parent
2ff7e5eb77
commit
874c61820d
|
|
@ -0,0 +1,21 @@
|
||||||
|
services:
|
||||||
|
telegraf:
|
||||||
|
image: telegraf:1.36
|
||||||
|
restart: unless-stopped
|
||||||
|
network_mode: host
|
||||||
|
pid: host
|
||||||
|
entrypoint: ["/scripts/telegraf-entrypoint.sh"]
|
||||||
|
environment:
|
||||||
|
INFLUXDB_URL: ${INFLUXDB_URL}
|
||||||
|
INFLUXDB_DB: ${INFLUXDB_DB:-host_metrics}
|
||||||
|
INFLUXDB_USER: ${INFLUXDB_WRITE_USER}
|
||||||
|
INFLUXDB_PASSWORD: ${INFLUXDB_WRITE_PASSWORD}
|
||||||
|
COLLECT_INTERVAL: ${COLLECT_INTERVAL:-10s}
|
||||||
|
HOST_TAG: ${HOST_TAG:-}
|
||||||
|
COLLECT_ZFS: ${COLLECT_ZFS:-false}
|
||||||
|
volumes:
|
||||||
|
- ../config/host-metrics/telegraf.conf.tpl:/etc/telegraf/telegraf.conf.tpl:ro
|
||||||
|
- ../config/host-metrics/scripts/telegraf-entrypoint.sh:/scripts/telegraf-entrypoint.sh:ro
|
||||||
|
- /proc:/hostfs/proc:ro
|
||||||
|
- /sys:/hostfs/sys:ro
|
||||||
|
- /:/hostfs:ro
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
# host-metrics stack
|
||||||
|
|
||||||
|
Per-host system metrics collector. Runs telegraf with host networking, host
|
||||||
|
PID namespace, and read-only bind mounts of /proc, /sys, and / so it can
|
||||||
|
report real CPU, memory, disk, network, and process metrics for the machine
|
||||||
|
it runs on. Writes to an InfluxDB 1.x endpoint of your choosing.
|
||||||
|
|
||||||
|
Deploy one instance per machine you want monitored.
|
||||||
|
|
||||||
|
## Quick deploy
|
||||||
|
|
||||||
|
(Filled in by a later task.)
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
version: "1.1"
|
||||||
|
name: host-metrics
|
||||||
|
description: "Per-host system metrics collector (telegraf -> InfluxDB)"
|
||||||
|
pods:
|
||||||
|
- host-metrics
|
||||||
Loading…
Reference in New Issue