Skip to content

Smart notification sending to matrix if telegram bot is died

2024-10-14 16:00:27.0143: [DIED] can not get chatbot: Failed to resolve host name 'api.telegram.org' with family 0.
Error: Temporary failure in name resolution

If bot is died due to network errors, we can not send notification as well:

Mon Oct 14 16:05:01 +06 2024 [down]: sending the notification for @trappist-one:matrix.org
Mon Oct 14 16:05:21 +06 2024 [down]: can not obtain token for @trappist-one:matrix.org

Improvement proposal

Use Prometheus: https://prometheus.io/docs/introduction/overview/ with

  1. Push Gateway: https://github.com/prometheus/pushgateway
  2. Alert manager: https://github.com/prometheus/alertmanager

Each component runs in own docker container.

Edited by Konstantin Narkhov