Checking log files ...
Carroll, Jim P [Contractor]
jcarro10 at sprintspectrum.com
Tue Jan 21 17:39:14 CET 2003
I'm using check_log2, but I also created a check_log3 based on it. The
latter is a CRITICAL version of the former. (I know, this is a kludge, it
should really be rewritten to accept either a -w and/or a -c switch.) To
wit:
$ diff check_log2 check_log3
146c146
< exit $ERRORS{'WARNING'};
---
> exit $ERRORS{'CRITICAL'};
Here are a couple sample snippets from my nrpe.cfg:
command[linux_log_warn]=/home/nagios/libexec/check_log2 -l /var/log/messages
\
-s /home/nagios/.messages_warn.seek -p "WARN|Warn|warn|httpd.conf"
command[linux_log_err]=/home/nagios/libexec/check_log3 -l /var/log/messages
\
-s /home/nagios/.messages_err.seek \
-p "ERR|Err|err|PANIC|Panic|panic|File system full" \
-n " nrpe| sshd|httpd.conf"
[Pardon the linewrap.]
The reason I created a CRITICAL based on the WARNING version should be
self-evident. Page me and e-mail me if it's critical, just e-mail me if
it's a warning.
HTH.
jc
> -----Original Message-----
> From: Jan-Hendrik Palic [mailto:jhp at addix.net]
> Sent: Tuesday, January 21, 2003 8:45 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Checking log files ...
>
>
> Hi ..
>
> I just want to ask, how your experiences with checking the
> logfiles are
> ...
>
> I played around with check_log and check_log2 from
> nagiosplugins-1.3/contrib
> but I cannot check my logs sensefully ...
>
> We are goingt to drop logwatch from our server and check the logs with
> nagios.
>
> I just looked for a intro for using check_log*, but did not find
> anything except --help.
>
> Are you using check_log and how? What is the best way?
>
> Thnx for your hints ... :)
>
>
> Jan
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Scholarships for Techies!
> Can't afford IT training? All 2003 ictp students receive scholarships.
> Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
> www.ictp.com/training/sourceforge.asp
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
>
-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
More information about the Users
mailing list