Cabot Telegram Plugin
Based on: https://github.com/lblasc/cabot-alert-slack
This is an alert plugin for the cabot service monitoring tool. It allows you to alert users using a Telegram chat room.
Installation
Enter the cabot virtual environment:
$ pip install cabot_alert_telegram $ foreman stop
or:
$ pip install git+git://github.com/codesyntax/cabot_alert_telegram.git $ foreman stop
Edit conf/*.env:
CABOT_PLUGINS_ENABLED=cabot_alert_telegram=0.4 ... TELEGRAM_BOT_TOKEN=bot_token TELEGRAM_CHAT_ID=id of the chat where messages will be sent
Add cabot_alert_telegram to the installed apps in settings.py:
$ foreman run python manage.py syncdb $ foreman start
Add manually an instance of the Alert Plugin (sometimes it is not added automatically):
$ ssh ubuntu@server $ source venv/bin/activate $ cd cabot $ foreman run -e conf/production.env python manage.py shell # point to the correct production.env file Python 2.7.3 (default, Dec 18 2014, 19:10:20) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from cabot_alert_telegram.models import TelegramAlert >>> ta = TelegramAlert() >>> ta.title = u'Telegram' >>> ta.save() >>> (Ctrl-D to exit)
Telegram Bot
You need to create a Telegram bot which will be used to send the messages to the users. To create a new Telegram Bot check the official documentation at https://core.telegram.org/bots
You need to create a new Group Chat, add all your users to that chatroom and add also the Bot there.
To get the chat id, open https://telegram.me and select the group chat you previously created. Check the URL, it will be something like this:
https://web.telegram.org/#/im?p=g99999999
You need to not the value of p parameter (g99999999) and exchange g with a -: -99999999
This is a bit hacky, but I don’t know any other way to get the group id.
0.6 (2018-05-29)
Include migrations [ex0ns]
0.5 (2016-11-07)
Simpler alert message [garaolaza]
0.4 (2016-01-21)
rework readme [Mikel Larreategi <mlarreategi@codesyntax.com>]
remove unneeded slack test [Mikel Larreategi <mlarreategi@codesyntax.com>]
add whitespace to make links correctly clickable [Mikel Larreategi <mlarreategi@codesyntax.com>]
document telegram install [Mikel Larreategi <mlarreategi@codesyntax.com>]
bot documentation [Mikel Larreategi <mlarreategi@codesyntax.com>]
remove [Mikel Larreategi <mlarreategi@codesyntax.com>]
0.3 (2015-07-02)
bump [Mikel Larreategi <mlarreategi@codesyntax.com>]
alert text change [Mikel Larreategi <mlarreategi@codesyntax.com>]
0.2 (2015-07-02)
document the bot [Mikel Larreategi <mlarreategi@codesyntax.com>]
reformat message [Mikel Larreategi <mlarreategi@codesyntax.com>]
reformat [Mikel Larreategi <mlarreategi@codesyntax.com>]
docs [Mikel Larreategi <mlarreategi@codesyntax.com>]
Merge remote-tracking branch ‘origin/master’ [Mikel Larreategi <mlarreategi@codesyntax.com>]
Update README.md [Aitzol <anaberan@codesyntax.com>]
0.1 (2015-07-02)
history! [Mikel Larreategi <mlarreategi@codesyntax.com>]
version [Mikel Larreategi <mlarreategi@codesyntax.com>]
Metadata
Release files for cabot_alert_telegram 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cabot_alert_telegram-0.6.tar.gz | 4.9 kB | Without provenance | Details for cabot_alert_telegram-0.6.tar.gz |
Release files / cabot_alert_telegram-0.6.tar.gz
| Download URL | cabot_alert_telegram-0.6.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1088031da3be3aa8d6afb65e4ca54953dde2dcd5c3c194d3a258256d03f66af5
|
|
BLAKE2b-256 checksum How to use checksums |
ec05e0f7e22d96ffc43adfab216ace56bd0ae1f26746c3d0eaa7e49eb02f7186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cabot_alert_telegram 0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.