diff --git a/README.md b/README.md index 32f2074..a8c6eff 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,38 @@ # Zabbix-in-Telegram Zabbix Notifications with graphs in Telegram -Join us on **Telegram group**: https://telegram.me/joinchat/AGnFigJ_NW75IGNnpOyjig +Join us in our **Telegram group** via this link: https://telegram.me/joinchat/AGnFigJ_NW75IGNnpOyjig ### Features -- [x] graphs based on latest data are sent directly to your messenger -- [x] you can send them both in private and group chats -- [x] saves chatid as a temporary file +- [x] Graphs based on latest data are sent directly to your messenger +- [x] You can send them both in private and group chats +- [x] Saves chatid as a temporary file -### Configuration +### Configuration / Installation -**First of all**: you need to install `requests` module for python: `pip install requests` +**First of all**: You need to install the `requests` module for python, this is required for operation!
+ To do so, enter `pip install requests` in your commandline! - * place `zbxtg.py` to `AlertScriptsPath` directory - * create `zbxtg_settings.py` with your settings and save them - * create bot in Telegram and get API key - * create readonly user in Zabbix - * set proxy host:port in `zbxtg_settings.py` if you need - * add new media for Telegram in Zabbix web interface - * send something to your bot, e.g. "/start" - * if you are in group chat, just mention it, e.g. `@ZbxTgDevBot ping` - * create new action like this: + * Place `zbxtg.py` in your `AlertScriptsPath` directory, the path is set inside your zabbix_server.conf + * Create `zbxtg_settings.py` with your settings and save them in the same directory as the script, see example for layout + * Create a bot in Telegram and get API key + * Create readonly user in Zabbix + * Set proxy host:port in `zbxtg_settings.py` if you need an internet proxy + * Add new media for Telegram in Zabbix web interface with these settings: + +![](http://i.imgur.com/sjGjwo5.png) + + * Send a message to your bot via Telegram, e.g. "/start" + * If you are in group chat, just mention your bot, e.g. `@ZbxTgDevBot ping` + * Create a new action like this: + + + + * Add the appropriate Media Type to your user + * The username is CASE-SENSITIVE + +![](http://i.imgur.com/doHpeOP.png) - #### Annotations ``` zbxtg;graphs -- enables attached graphs @@ -35,6 +45,14 @@ zbxtg;debug -- enable debug mode, some logs and images will be saved in the tmp You can use markdown in your action: https://core.telegram.org/bots/api#using-markdown +#### Debug + +* You can use the following command to send a message from your command line:
+`./zbxtg.py "" "" ""` + * For `` substitute your Telegram username, NOT that of your bot (case-sensitive) + * For `` just substitute something like "test" + * You can omit the `"`, these are optional + --- ![](http://i.imgur.com/1T4aHuf.png)