I'm working on setting up log monitoring right now. I've got simple triggers setup to show when the shutterspeed of a remote controlled camera are set to 30 seconds by parsing the log specifically for 30 "{log[<path_to_log>,shutterspeed: ].str(*30*)}=1, and those are working just fine. I've had to set up individual triggers for different shutterspeeds. Ultimately, I want it to pull the shutterspeed value from the log file and trigger if it's anything other than 15. I've tried a couple different variations, but none have worked thus far. The value in the log appears as "shutterspeed: X"
{log[<path_to_log>,shutterspeed: ,,,,\1].last()}<>15 (this is the most recent one I tried. I thought \1 captures the value after the search string, but it's not.
So...
1. What is wrong with the item/trigger above?
2. Is there a way (like zabbix_agentd -t <item>) to test out log items on command line to verify the output is what I think it is going to be?
{log[<path_to_log>,shutterspeed: ,,,,\1].last()}<>15 (this is the most recent one I tried. I thought \1 captures the value after the search string, but it's not.
So...
1. What is wrong with the item/trigger above?
2. Is there a way (like zabbix_agentd -t <item>) to test out log items on command line to verify the output is what I think it is going to be?
Comment