Set up Telegram as a new Media Type on Zabbix Server

Set up Telegram as a new Media Type on Zabbix Server

Telegram Setup on Zabbix

Zabbix is an open-source monitoring solution that can be customized for any complex setup. I am running it as a container in my server environment to monitor all my servers running 24*7 and notify/alert me in case of any issues with my server hardware or applications (databases, software applications) installed on those servers.

By default, Zabbix supports 'Email' as a communication media type. While the Email channel media type still works, it is not a slick solution for 2021.

So, a modern communication media type is needed for efficient notifications with markdown support.

Odoo • Text and Image
Zabbix Logo

I have recently tried creating a new Media Type in Zabbix and got multiple error messages while set up. The official version of YAML maintained on the Zabbix git repository doesn't seem to work for everyone. (at least for me) So, I have modified it to make it work on my machine. Adding it here in case anyone else runs into the same issue.

Instructions

  • Download the YAML file to your local machine by clicking on the icon.  
  • Go to the Zabbix Web console, navigate "Administration > Media Types," and then import the YAML from the step above.

Possible errors with using the official version of the script.

  1. Invalid tag "/zabbix_export/version": unsupported version number (In my case, I am using Zabbix 5.2 version, so I change the version number to 5.2, version: '5.2')
  2. TypeError: undefined not callable (property 'log' of [object Object]) at [anon] (duktape.c:65639) internal at [anon] (function:55) preventsyield