Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Can I send personal and group notifications using Zabbix and Telegram


Can I send personal and group notifications using Zabbix and Telegram


Yes, you can send both personal and group notifications using Zabbix and Telegram. The integration allows you to configure Zabbix to send alerts to individual users or groups via Telegram by following specific setup steps.

Setting Up Zabbix with Telegram

1. Create a Telegram Bot:
- Use the @BotFather on Telegram to create a new bot. You will receive an API token that you need for the integration.

2. Get Chat IDs:
- To send notifications to a personal chat, you can use the IDBot to retrieve your personal chat ID.
- For group notifications, you need to add your bot to the group and retrieve the group's chat ID.

3. Install Required Scripts:
- You can use scripts such as `zbxtg.py` and `zbxtg_group.py` for sending messages. Place these scripts in the `AlertScriptsPath` directory specified in your `zabbix_server.conf` file[1][2][4].

4. Configure Media Types in Zabbix:
- In the Zabbix web interface, navigate to Administration > Media types and create a new media type for Telegram. Specify the script name and parameters, such as the chat ID and message format[1][3].

5. Create Actions:
- Set up actions in Zabbix under Configuration > Actions to define when and how notifications should be sent. You can customize the subject and message content based on the alerts triggered[1][4].

6. Assign Users:
- Assign the newly created Telegram media type to users in Zabbix who should receive the notifications. Specify whether they should receive personal or group notifications by entering the appropriate chat IDs[2][5].

Features

- Personal Notifications: Send alerts directly to individual users.
- Group Notifications: Send alerts to group chats or supergroups.
- Graph Support: Notifications can include graphs based on the latest data.
- Markdown and HTML Support: Messages can be formatted using simple markdown or HTML[2][3].

By following these steps, you can effectively set up Zabbix to send notifications through Telegram, utilizing both personal and group messaging capabilities.

Citations:
[1] https://github.com/GabrielRF/Zabbix-Telegram-Notification
[2] https://github.com/ableev/Zabbix-in-Telegram
[3] https://ashoktutorials.blogspot.com/2017/06/zabbix-alert-notification-with-telegram.html
[4] https://azdigi.com/blog/en/linux-server-en/tools-en/how-to-set-up-zabbix-alerts-via-telegram/
[5] https://www.reddit.com/r/zabbix/comments/pxvuft/cant_seem_to_get_zabbix_messaging_on_telegram/
[6] https://stackoverflow.com/questions/73179062/perevent-sendind-certain-trigger-to-telegram
[7] https://www.zabbix.com/forum/zabbix-help/461498-how-to-configure-sending-alerts-to-telegram
[8] https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/466963-sending-a-notification-to-a-topic-in-a-telegram-group