Pular para o conteúdo
#0030
Pipe

A live metrics dashboard with no metrics backend

You want a live dashboard for your agent fleet: twenty containers, each emitting metrics every second. The standard stack: agent → statsd → InfluxDB → Grafana. Four moving parts, four config files, four things to monitor monitoring.

You skip three. Each agent pipes its metrics line to one path: echo "$line" | curl -T - https://.../api/v1/pipe/metrics-$AGENT_ID. Your dashboard page is an HTML file with twenty EventSource connections: or just fetch against each pipe and read the chunks.

The dashboard renders the latest line from each agent. There's no database. No scrape interval. No retention policy because there's no storage. When you close the dashboard, the streams end and the metrics evaporate. When you open it again, you see live data within the second.

For "what's happening right now," you don't need a time-series database. You need a wire.

The dashboard didn't query a database. The bytes just arrived.