I've got a script that writes to a file whenever a specific server can't access multiple other servers over a period of time. The contents of the text of that file I would like to somehow import into a zabbix action and emailed out. Right now, I'm running in my zabbix_agentd.conf:
UserParameter=EQ.Monitor_wkg,cat /home/quake/REQS_monitor/logdir/zabbix.LOG | grep "RECENTEQS_Working" | cut -d: -f2 | sed "s/\s//g"
Which results in a 0 or a 1.
So in the rest of this zabbix.LOG file I have this:
RECENTEQS_Working: 0
server1 - Mon Mar 16 18:29:46 UTC 2009 - Uptime: 11:31:07 up 1:37, 2 users, load average: 2.31, 2.26, 2.08 - Rsyncs: 6
Problems:
Slow response (> 5 seconds) for 5 times from: server2/recenteqs/ (10.1.1.1)
Slow response (> 5 seconds) for 6 times from: server3/recenteqs/ (10.1.1.2)
See: http://serveraddress/mostrecent_summary.html
How can I get the information in blue to pull into an action comment?
UserParameter=EQ.Monitor_wkg,cat /home/quake/REQS_monitor/logdir/zabbix.LOG | grep "RECENTEQS_Working" | cut -d: -f2 | sed "s/\s//g"
Which results in a 0 or a 1.
So in the rest of this zabbix.LOG file I have this:
RECENTEQS_Working: 0
server1 - Mon Mar 16 18:29:46 UTC 2009 - Uptime: 11:31:07 up 1:37, 2 users, load average: 2.31, 2.26, 2.08 - Rsyncs: 6
Problems:
Slow response (> 5 seconds) for 5 times from: server2/recenteqs/ (10.1.1.1)
Slow response (> 5 seconds) for 6 times from: server3/recenteqs/ (10.1.1.2)
See: http://serveraddress/mostrecent_summary.html
How can I get the information in blue to pull into an action comment?
Comment