To use push notification in Tabbix Pro,
1. Copy your device token from Tabbix Pro. To do that, go to Settings in Tabbix Pro. You will see the device token in here. We will use this token. You can copy and email it to yourself.
2. You need to create zabbix script to send notification to your device. Create a file named tabbix.sh with code as below.
curl --data "token=$posttoken&subject=$postsubject&body=$postbody" $posturl
3. Save this file in alertscripts folder in Zabbix server. My alertscripts folder is in this path /usr/lib/zabbix/alertscripts. You can find your path in zabbix_server.conf file.
4. Make tabbix.sh file executable with this command.
chmod +x tabbix.sh
5. Yo need to create new Media Type in Zabbix. Go to Administration > Media types in Zabbix Web user interface and click "Create media type" and fill fields as below
Type : Script
Script name : tabbix.sh
Enabled : checked
6. Use this media in user. Go to Administration > Users. Click a user who want to use this meda. Click Media type tab and click Add to add Tabbix Media to that user. Fill fields as below
Type : Tabbix
Send to : Your device token that copied in first item.
When Active : You can chose day and times. You can leave as is if you don't need any limitation
Use if severity : You can choose severity. Leave as is if you don't need any limitation
Enabled : checked
Now you can use Tabbix media in your Actions whatever you want as your other actions.
Be careful when using push notification service. It use https service, but it is not E2E (end-to-end encryption).
General Help : https://tech.tirgil.com/2013/04/tabbix-help-tabbix-manual.html
I'm running Zabbix 4.4.1 on Ubuntu Server 18.04. Followed the instructions above - didn't work.YanıtlaSil
After reviewing the logs i saw the error "Cannot execute command /etc/zabbix/alert.d/tabbix.sh".  No such file or directory.
I moved the tabbix.sh script from /usr/lib/zabbix/alertscripts to /etc/zabbix/alert.d/ and this fixed the problem.
Please note, the alerts.d folder did not exist, i had to create it.
Hi Clint, you can find the right path in zabbix_server.conf file. Probably your configuration for alertscript is "/etc/zabbix/alert.d/". You already did it and fixed the problem.YanıtlaSil
I did everything as instructed, but it still doesn't work. He uses the curl service and previously I had this same problem with the telegram, because I need a version for the php to run another service. Can anyone tell me if the version can compromise and which is necessary. I tried switching but it didn't work anyway.
You can use any service instead of curl, but you need to be careful about sending data by POST method, not GET method.Sil
I get the error message:Sil
curl: (3) URL using bad/illegal format or missing URL
Any solutions for this problem?
Hi Andreas, could you please contact me via firstname.lastname@example.org. btw do your parameters have special characters? Please test it with simple words.Sil