[Nagiosplug-help] 1 questions about plugins : check_log2 and 1 solution for check_procs

Volker.Aust at premiere.de Volker.Aust at premiere.de
Thu Aug 29 04:13:02 CEST 2002


Hi Thomas,

> For the check_log, I will try check_log2.pl but how it is possible to 
> extract all error level messages in the /var/log/messages for 
> examples 
> (like Big Brother does).
> 
> For volker: nagiosplug1.3b1 (nagios only no more netsaint ;), 
> but I want 
> to use check_log2.pl now, seems to be better in performance 
> but just not 
> understand how to extract all error or warning messages from syslog 
> messages.
> 
> thx and some ideas
> Tom

I see your problem: check_log and check_log2.pl only supply a match count
and the last message that matches the query. For extracting all messages
from a log file which matches a query I use 'swatch' and send the result
with 'send_nsca' to Nagios. In Nagios I have to define a passive service for
each message category. Eg. the following part of a swatch config matches all
lineprotocol down messages of cisco routers and call a script which sends
the proper message to Nagios:

watchfor = /(cisco[^ ]+) .* \%LINEPROTO.*UPDOWN.* Interface ([^ ,]+),
changed state to down/
	exec /root/messages/send_nsca.sh ${1} ${2} 2 $0

In Nagios I have to define a passive service check for each interface (${2})
of all routers (${1}) to accept the messages.

Hope this helps.

-vol




More information about the Help mailing list