i am looking solution how to ship the choosen log using nxlog shipper to logstash and send alert to nagios.

there is many log pattern in that file, i want to monitor this type of log like below :

2015-03-04 09:54:55.298 [178] Statistic SmscWorker_10 INCOMING SM from MSISDN 651111111111111 2015-03-04 09:54:55.328 [220] Statistic SmscWorker_16 SUBMIT SM to MSISDN 651111111111111 ReqId 1008688024 TN 232

how to filter this log using nxlog shipper and send alert from logstash to nagios. "INCOMING SM" and "SUBMIT SM" should be in the log every 5 minutes. if there is no "INCOMING SM" or "SUBMIT SM" in 5 minutes, the logstash send alert to Nagios maybe using "/var/lib/nagios3/rw/nagios.cmd" prefered if there is nrpd command

Please advice me how to make it.

Thank you very much.


You can do something like this in nxlog:

Exec if $raw_event =~ /<REGEXP>/ exec_async("/var/lib/nagios3/rw/nagios.cmd", "param...");
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.