Skip to main content

Bot only used for monitoring purpose

Project description

http://dadard.fr:8080/api/badges/dadard/WardenBot/status.svg https://badge.fury.io/py/WardenBot.svg

This is a goddamn bot

WHY

In Grafana, you have the option to bind an alert from your metrics data, to a Telegram Bot (see doc).

This is convenient to be alerted via instant messaging (no delay, few of configuration needed…)

HOW

Bot examples are given here.

By reading the official docs, you should have get a Bot Token. Store it in a secure way and retrieve it in your code (I personally store the bot token in an environment variable in a container)

Dont forget to install the python-telegram-bot package when copy/pasting examples :)

When the code of your bot is ready, deploy it or launch it : python your_bot.py

In Telegram Messaging App, you should be able to start a new group, and to add your bot in.

The last thing you need is the Chat ID of the group you just created. To retrieve it, checkout the Telegram Api : https://api.telegram.org/bot{BOT_TOKEN}/getUpdates

In case of troubles, see this post.

Then, just put the chat ID and the bot ID in your Grafana alert handler and test it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

WardenBot-0.39.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file WardenBot-0.39.tar.gz.

File metadata

  • Download URL: WardenBot-0.39.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for WardenBot-0.39.tar.gz
Algorithm Hash digest
SHA256 f01c2ef2fcb03285e2d788dbdc73b3b73f8ab86c9e2213ece0fba05f7dff7bcc
MD5 33a43524aa40a63323d7ee3d763d82d8
BLAKE2b-256 a802c100723b20c8250734234769e9578c954c486feead3abd268cce844b6fc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page