Using telegram to send Zabbix notifications

From Zabbix 4.4, notifications can be sent to Telegram messenger using Telegram Bot API and Zabbix webhook feature. The advantage of this approach is that it is simple and it is native to Zabbix, but the downside is that it cannot send colorful messages. The documentation here is good in setting up the telegram integration. But after the setup, I am not able to get any notifications, and it seems that I am missing something. Indeed, I miss out on setting up a trigger action to link the triggers to the telegram script.

Click Actions and select Trigger actions if it is not being selected. Then click Create action.

You may add a condition to only send notifications for a host group if you have targeted audience for the host groups. This is useful for multi-tenant setup, so that notifications from 1 tenant do not cross over to the other tenant. Click Add in the conditions box and a pop-up will appear and you may select the host group accordingly.

Click on the Operations tab and you will see as below:

To configure a notification when the status change from “OK” to “Problem”, click on Add in the Operations box. To configure a notification when the status change from “Problem” to “OK”, click on Add in the Recovery operations box.

In the Operations details box, Add the user that is configured with the telegram chat id in the Send to Users. In this example, I set it to Admin. Change the Default media type to Telegram

Once this is completed, the trigger action is linked to the notification, and you will receive telegram notifications when there is a Problem.

Leave a Comment