check_log multiple pattern and filtering

Tobias Exner texner at eoipso.com
Thu Dec 3 09:09:15 CET 2009


Hi list,



1.

any suggestions how to check multiple pattern with one command?


example:

check_log -F /var/adm/messages -O /var/adm/nagios_messages -q 
"error|connection timed out|SCSI transport failed"




2.

Is there a way to ignore lines from the result?

example:

check_log -F /var/adm/messages -O /var/adm/nagios_messages -q "error"

This will search for all errors.
But what can I do to ignore lines with with spezial errors like

Dec 3 07:26:23 SERVER rmclomv: [ID 431010 kern.error] CPU_FAN @ 
MB.P0.F0.RS has FAILED.




regards,

Tobias


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list