Zabbix – usefull tips and commands

Testing triggers

If you need to test the Zabbix notification or response for specific alert severity, here is a little walkthrough on how you can do it easy way.

First, create the new host in Zabbix web interface. Fill only the hostname.

Then, create a new item under the newly created host. Fill the name, as the type select Zabbix trapper and as key for example test.alert.

Next step is to create a testing trigger. Name as you wish, Severity choose the level you want to test. I use the problem expressin as follow : last(/TestingTrapper/test.alert)=1 and recovery last(/TestingTrapper/test.alert)=0

After that, you can test the trigger with zabbix_sender utility. -z is the IP of the Zabbix server -s is the Hostname from step 1. -k is the item key name -o is the send value compared in the trigger.

# if not installed - apt install zabbix-sender
zabbix_sender -z localhost -s "TestingTrapper" -k test.alert -o 1

Buy Me a Coffee