Blog · 08

SLO y alertas por burn rate para el edge, en Python sin dependenciasSLOs and burn-rate alerts for the edge, in plain Python

Sondas DNS, TLS, HTTP y TCP, un presupuesto de error y un postmortem ficticio.DNS, TLS, HTTP and TCP probes, an error budget and a fictional postmortem.

Por qué este laboratorio

Viene de años de monitorización y respuesta a alertas con herramientas como Grafana, SolarWinds y el stack de Elastic. Este laboratorio aplica el enfoque SRE al edge: despertar a alguien cuando el presupuesto de error se consume demasiado rápido, no en cada comprobación fallida.

Qué he hecho

  • Sondas DNS, TLS, HTTP y TCP.
  • Un SLO con presupuesto de error y alertas multiventana por burn rate, con un mínimo de sondas malas antes de avisar.
  • Exportación a Elasticsearch (ECS) y Prometheus, un webhook firmado y un informe HTML.
  • Una plantilla de postmortem y un postmortem ficticio: un registro DNS perdido en una migración de zona.

Cómo está hecho

Python 3.11, solo librería estándar, 14 tests.

Siguientes pasos

  • Enviar los resultados a tu Elasticsearch o Prometheus.
  • Instalar las units de systemd en una VM pequeña cerca de tus usuarios.
  • Conectar el webhook firmado a n8n, Teams o Slack, y acordar los SLO con los responsables del servicio.

¿Quieres llevarlo a tu entorno o adaptarlo a tu caso? Escríbeme y lo vemos.

Why this lab

Comes from years of monitoring and alert response with tools such as Grafana, SolarWinds and the Elastic stack. This lab applies the SRE approach to the edge: wake someone up when the error budget is burning too fast, not on every failed check.

What I built

  • DNS, TLS, HTTP and TCP probes.
  • An SLO with an error budget and multi-window burn-rate alerts, with a minimum number of bad probes before firing.
  • Export to Elasticsearch (ECS) and Prometheus, a signed webhook and an HTML report.
  • A postmortem template and a fictional postmortem: a DNS record lost during a zone migration.

How it is built

Python 3.11, standard library only, 14 tests.

Next steps

  • Send the results to your Elasticsearch or Prometheus.
  • Install the systemd units on a small VM close to your users.
  • Connect the signed webhook to n8n, Teams or Slack, and agree the SLOs with the service owners.

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 →