App icon

ZBX Viewer

Download zbxviewer.sh and put in /usr/lib/zabbix/alertscripts (can be viewed in the settings into zabbix_server.conf(cat zabbix_server.conf|grep AlertScriptsPath)) and add right on exec (chmod +x zbxviewer.sh)

On Your Zabbix server make new Media types with parameters as image

{ALERT.SENDTO} Then there will be your token

{ALERT.SUBJECT} Message subject

{ALERT.MESSAGE} Message your triggers


Set Attempts to 1


Go to the Users tab and add your parameters to your user as in the picture


Done!

Wait for the event to happen and you will receive notification in the application.


Version 1.6.0 introduced the ability to encrypt push messages.

In order to take advantage of this, you need to download the latest version of the script to send notifications. From the application you need to take the key for decryption, it is generated locally on the phone at the first start. This code needs to be inserted into the script and enable sending encrypted push. Do not forget that you should have OpenSSL and curl

If you need to send encrypted notifications to multiple users use this script zbxviewer2.sh


Possible problems in the absence of sending notifications

Verify that the dispatch works from the console. In zabbix 4.2, you can click Test media type. In other cases, you can call the script from the terminal.

./zbxviewer.sh token title message

If the tests passed, but the messages still do not arrive, you need to check the interface of the zabbix itself.

Need to go to the tab

Configuration -> Action and Enable Report problems to Zabbix administrators.

If an error code 3, you must adjust the length of the notification sent. Because the template contains line breaks, when the script is called, they are not correctly transmitted. Try to remove line breaks.