Zabbix 6.2 alert via Telegram

Tram Ho

In the previous post, I have a guide for you to install zabbix server

In the warning section of Zabbix, my favorite is the warning via Telegram because it is fast and secure

Telegram Setup

  1. Register a new Telegram Bot: Send ” /NewBot ” to @BotFather and follow the instructions. The token provided by @botfather in the last step will be needed to configure the Zabbix Webhook .

image.png

  1. If you want to send a private message, you need to get the chat ID of the user to whom the bot should send the message.

image.png

Ask the user to send “/start” to the bot, created in step 1. If you skip this step, the Telegram Bot will not be able to send messages to the user.

image.png

Setting up Zabbix

  1. In the “Administration > Media types” section, enter media_telegram.yaml.
  2. Configure the added media type: Copy and paste your telegram bot token into the “Telegramtoken” field.

image.png

In the option the Parsemode parameter is required according to Telegram’s documentation. Read the Telegram BOT API documentation to learn how to format the message: Markdown / HTML / MarkDownv2 .

Note: In this case, your Telegram related actions must be separated from other notification actions (e.g. SMS), otherwise you may receive plain text notifications with tags Raw Markdown/HTML.

After the configuration is complete, we and the test to test the congfig have eaten with the group id or personal ID

image.png

image.png

If you forgot to send ‘/start’ to the bot from Telegram, you will get the following error:

image.png

  1. To receive notifications in Telegram, you need to create a Zabbix user and add a vehicle with type Telegram. In the “Sent to” field Enter the Telegram user ID or group ID obtained during Telegram setup.

image.png

After the problem, it will be announced via telegram

image.png

You can refer to the details via: https://www.zabbix.com/integrations/telegram

Share the news now

Source : Viblo