Skip to content

Yet another telegram bot handler for prometheus

License

Notifications You must be signed in to change notification settings

hatamiarash7/Prometheus-Telegram

Repository files navigation

Prometheus-Telegram

Telegram Handler Docker Image Size (latest semver) Docker Image Version (latest semver)

It's a simple API to handle alert requests and send them via Telegram.

sample

How-to use

  1. Create a Telegram bot using botfather

  2. Keep BOT TOKEN for later

  3. Get your Chat id using @BotChatId_bot ( Or other bots/ways )

  4. Run image with required environment variables

    docker run -d -p 8127:8127 \
        -e TG_HOST=https://api.telegram.org \
        -e TG_BOT_TOKEN='291043804:AAGHDLwaXNN2U2oI0uxCR35KsivsxNUqT3o' \
        -e TG_CHAT_ID='-200160323059' \
        hatamiarash7/telegram-handler:v1.2.0
  5. Use alertmanager to send alerts using webhook to http://<IP>:8127/api/alert URL

Proxy

We have a TG_HOST env variables here to bypass any filtering or blocking. You can proxy your custom domain to https://api.telegram.org and use it here.

https://telegram.domain.com -> https://api.telegram.org

There are many ways to do that, just search for it 😃


Support 💛

ko-fi

Contributing 🤝

Don't be shy and reach out to us if you want to contribute 😉

  1. Fork it !
  2. Create your feature branch : git checkout -b my-new-feature
  3. Commit your changes : git commit -am 'Add some feature'
  4. Push to the branch : git push origin my-new-feature
  5. Submit a pull request

Issues

Each project may have many problems. Contributing to the better development of this project by reporting them. 👍