Ubuntu – how to get zabbix item values in two different time for trigger

monitoringUbuntuzabbix

For monitoring some database servers parameters (NOT ZABBIX self), In zabbix I need to create a trigger for checking an item value at every 15 minute and run if the last retrieve value is increase or decrease from now retrieve value.

How to create that trigger?

Best Answer

If you only wish to see whether the last value differs from the previous value, you should use the diff() function, like so:

{host:item.diff()} = 1

If you wish to see whether the last value differs from the previous value by a certain amount, you should use the change() function, like so:

{host:item.change()} < -100 | {host:item.change()} > 100

If you wish to construct more complicated expressions, you might wish to consider using prev() and last() functions to explicitly refer to the last two values. For instance, the diff() example above can be replaced with:

{host:item.prev()} # {host:item.last()}

You probably also want the trigger to generate multiple successive PROBLEM events by selecting the checkbox on the right of "Multiple PROBLEM events generation". In that case, if an item goes from 0 to 150 to 300, you will be notified on both changes. Otherwise, you will only be notified on the first change.

Also see official documentation for a complete list of available trigger functions.