Alertas de ntfy desde AlertHub

Alertas de ntfy desde AlertHub

Ops que vive en el teléfono ya usa ntfy: un HTTP POST y la notificación llega a Android, iOS y la web de escritorio. La trampa habitual es un topic por SaaS y un montón de curl ntfy.sh/… cuando alguien rota el secreto.

AlertHub trata ntfy como Discord o Gotify: pegas una URL de topic en el proyecto. Las fuentes siguen en https://api.thealerthub.com/sendAlert (o email). AlertHub detecta ntfy (ntfy) y hace POST del cuerpo del mensaje con cabeceras Title, Priority y Tags.

Docs: destino ntfy.

Cómo llega a ntfy

  1. En ntfy: instala la app → suscríbete a un topic difícil de adivinar.
  2. La URL es https://ntfy.sh/TU_TOPIC (o https://tu-ntfy/TU_TOPIC; añade ?auth=… si el topic está reservado).
  3. En AlertHub: Connections → ntfy del proyecto → pega la URL.
  4. Warning y critical se convierten en notificaciones ntfy (prioridad 4 vs 5). Info se queda en el panel.

El nombre del topic es la contraseña. Elige algo que no se pueda adivinar. ntfy autoalojado funciona igual: pega https://tu-ntfy/TU_TOPIC (HTTPS, accesible desde internet).

Configuración (una vez)

  1. Crea un proyecto en app.thealerthub.com.
  2. Suscríbete a un topic en ntfy y pega https://ntfy.sh/{topic} en AlertHub.
  3. Envía un warning de prueba por la API de ingestión.

Alerta 1: Guardia en el teléfono sin Slack

Ops ya vive en ntfy. Pon fallos de Stripe, uptime y GitHub Actions en el mismo proyecto AlertHub para que ntfy sea el único destino extra.

Alerta 2: ntfy + destino email

AlertHub también tiene destino email para quien silencia el teléfono. Mismas fuentes; ntfy para el bolsillo, email para el auditor.

Alerta 3: Un topic en vez de un curl por script

Cuando cada cron publica en su propio topic de ntfy, rotar el secreto implica tocar cada host. Mueve la ingestión a AlertHub (Shopify, email) y deja una sola URL de ntfy en Connections.

Ideas para sacarle más partido

  • Topic imposible de adivinar. Trata https://ntfy.sh/{topic} como el secreto de un webhook.
  • Prioridad. Critical mapea a prioridad 5 de ntfy (urgente); warning a 4.
  • Mismo patrón que Gotify. Si un segundo equipo sigue en Gotify self-hosted, añade el destino Gotify en el mismo proyecto.

FAQ

¿ntfy es un destino de primera?
Sí. AlertHub envía cabeceras más un cuerpo markdown cuando el webhook guardado se clasifica como ntfy, la misma familia que Discord y Gotify.

¿Funciona un topic reservado?
Sí. Pega https://ntfy.sh/mitopic?auth=…. AlertHub reenvía la query string.

¿Funciona ntfy autoalojado?
Sí. Pega https://tu-host/topic en la tarjeta ntfy. AlertHub no puede reconocer hosts custom con regex, así que solo exige HTTPS. El servidor debe ser accesible desde internet.

¿Las alertas info salen en ntfy?
No. Sube el nivel de la fuente cuando el teléfono deba verla.

Siguientes pasos

Pega una URL de topic de ntfy en Connections, sigue la configuración de ntfy y envía un warning de prueba.

Relacionado: alertas Gotify · GitHub Actions → ntfy · Uptime + VPS → ntfy · Guardia con Slack