Search code examples
zabbix

zabbix - last 3 values of string


I have an Item scanning for the text in a log file which returns "Up". I want a trigger that if the last 3 times it looks the value isn't "Up" to alert.

Right now I have this:

{Template_App_SWIFT:vfs.file.regexp[D:/tmp/snl_status.log,"^Subsystem  Connectivity is  *([A-Z][a-z]*)",,9,9,”\1”].str(Up)}=0

However this only captures the most recent value.


Solution

  • {Template_App_SWIFT:vfs.file.regexp[D:/tmp/snl_status.log,"^Subsystem  Connectivity is  *([A-Z][a-z]*)",,9,9,”\1”].str("Up",#3)}=0