Por qué este laboratorio
Se apoya en años de monitorización y cuadros de Grafana. Aquí las métricas vienen de NVIDIA DCGM, y la pregunta es cuáles merecen una alerta y quién debe recibirla.
Qué he hecho
- Un simulador en Go de 4 nodos × 8 GPU que usa los nombres y etiquetas de métricas de dcgm-exporter, pod y namespace incluidos, con inyección de fallos.
- 17 recording rules y 10 alertas, cada una con su runbook (docs/alerts.md) y una etiqueta
action: drain, quarantine o cordon. - Alertmanager con rutas a guardia, ticket y equipo, e inhibiciones para que una GPU rota no avise además de "GPU ociosa" al equipo.
- Un dashboard de Grafana generado por script y
fleetreportcon GPU-horas y GPU-horas ociosas por namespace.
Cómo se prueba
7 casos de promtool test rules, tests en Go, comprobaciones de configuración, shellcheck y una prueba de punta a punta con Docker Compose (Prometheus, Alertmanager, Grafana): 32 comprobaciones, en verde a la primera.
Qué aprendí
La comprobación de energía frente a potencia daba falsos fallos con una sola muestra por el jitter del scrape. Ahora usa 1 minuto sobre 2 minutos de datos.
Siguientes pasos
- Cambiar el simulador por dcgm-exporter en tus nodos.
- Importar el cuadro de Grafana y las recording rules.
- Enrutar las alertas de Alertmanager a tus herramientas de guardia y de tickets.
¿Quieres llevarlo a tu entorno o adaptarlo a tu caso? Escríbeme y lo vemos.
Why this lab
Builds on years of monitoring and Grafana dashboards. Here the metrics come from NVIDIA DCGM, and the question is which ones deserve an alert and who should get it.
What I built
- A Go simulator with 4 nodes × 8 GPUs that uses dcgm-exporter's metric names and labels, pod and namespace included, plus fault injection.
- 17 recording rules and 10 alerts, each with a runbook (docs/alerts.md) and an
actionlabel: drain, quarantine or cordon. - Alertmanager with pager, ticket and team routes, and inhibitions so a broken GPU doesn't also alert the team about an "idle GPU".
- A Grafana dashboard generated by a script, and
fleetreportwith GPU-hours and idle GPU-hours per namespace.
How it is tested
7 promtool test rules cases, Go tests, config checks, shellcheck and an end-to-end run with Docker Compose (Prometheus, Alertmanager, Grafana): 32 checks, green on the first run.
What I learned
The energy-versus-power check gave false failures with a single sample because of scrape jitter. It now uses 1 minute of rate over 2 minutes of data.
Next steps
- Replace the simulator with dcgm-exporter on your nodes.
- Import the Grafana dashboard and the recording rules.
- Route the alerts in Alertmanager to your on-call and ticketing tools.
Want to bring it to your environment or adapt it to your case? Get in touch and we can look at it together.
Tech Career Lab · newsletter
¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.
Apúntate y llévate las 33 ideasSign up and get the 33 ideas →