Zabbix trigger to detect no data

Karlik_B picture Karlik_B · Jan 17, 2014 · Viewed 8.7k times · Source

I need trigger able to detect that polled Zabbix agent items does not returns data. For zabbix trapper items this functionality is covered by nodata() function (Heartbeat lost detection in Zabbix documentation) but I need similar functionality supported for Zabbix agent items.

For example, a have defined Zabbix agent UserParameter: UserParameter=custom.mssqlping,/usr/local/scripts/mssqlping.sh.

The script mssqlping.sh returns 0/1. I need to cover situation when mssqlping.sh script is broken and returns empy string, which is not stored in zabbix because it is not number.

How to detect that periodically polled item data are no longer coming?

Answer

Michael Tabolsky picture Michael Tabolsky · Jan 18, 2014

It is not that it's not stored that creates the problem but the fact that it is not being considered as a valid item anymore so you can't trigger anything out of it. There is a plenty of related bug reports related to it. AFAIk your options:

  1. Adjust the script to return a numeric value in case of errors
  2. Use 2.2's "internal events" to detect the "becomes unsupported" event
  3. Make and external script that will query the database directly and will notify you on its own or triggering a condition through zabbix's trappers