Search code examples
monitoringzabbixeventtrigger

Zabbix trigger for text value


I have created one custom user-parameter which is fetching latest yum updates and data is getting captured properly and if there are no updates then the item will throw 0. Now I am looking for a trigger which generates an alert if there are any updates captured and recover if item returns 0. I have tried using all the possible triggers but no luck.

Note - Item type is Text

Latest Trigger used - {10.0.0.5:yumupdate[*].change()}<>0

Above trigger is throwing alert but also getting recovered even when there are new updates available.

Lastest data Snip


Solution

  • A simpler solution would be to return an empty string when there are no updates (allowed for text items), then detect that with trigger function: strlen()>0.