Page 1 of 1
How to upgrade to check_log2
Posted: Thu Mar 07, 2013 12:42 pm
by rellegib
Hi I'm newer to Nagios and would like to have the ability to ignore certain things from check_log that are picking up as crit or warn.
What is the best way to do this?
Should I upgrade all of the servers to check_log2? Is this something I can put in the plugins directory or do I need to install something?
Thanks
Re: How to upgrade to check_log2
Posted: Thu Mar 07, 2013 12:44 pm
by abrist
Which check_log plugin are you using? (there are a number of them)
Re: How to upgrade to check_log2
Posted: Thu Mar 07, 2013 1:20 pm
by rellegib
Whatever comes with nrpe 2.12
Re: How to upgrade to check_log2
Posted: Thu Mar 07, 2013 4:18 pm
by abrist
check_log is fairly basic. It will only return the last line of unmatched errors. You very well might want to move to one of the more robust log checkers.
Re: How to upgrade to check_log2
Posted: Fri Mar 08, 2013 9:16 am
by rellegib
Yes I understand that I need to move on to check_log2 which is the title of my post.
How do I go about doing so?
Thanks
Re: How to upgrade to check_log2
Posted: Fri Mar 08, 2013 10:27 am
by abrist
You need to download the new plugin to the remote host's plugin directory. Then create a new command definition and service check or change the previous check_log config to reflect the new plugin.
You can find *many* log checking scripts on the exchange:
http://exchange.nagios.org/index.php?op ... =check_log
Re: How to upgrade to check_log2
Posted: Tue Mar 19, 2013 8:45 am
by rellegib
I have the plugin working I believe. Here is the usage listed in the perl script:
Usage: check_log2 -l <log_file> -s <seek_file> -p <pattern> [-n <negpattern>]
I'm wanting to alert on anything with critical and warning but also negate anything with LDAP and NFS that is a crit or a warn.
Would this work or do I have to break up LDAP and NFS into seperate entries?
check_log2.pl -l /var/adm/messages -s /tmp/messages2.tmp -p "crit|warn" -n "LDAP|NFS" -C
Thanks
Re: How to upgrade to check_log2
Posted: Tue Mar 19, 2013 9:21 am
by slansing
Hmm, it would require some testing, or asking the designer of the plugin, it does not look like the usage output of that plugin was very helpful beyond flag usage. What do you get for an output when you run the plugin? You may need to break it up depending on how you want it to report.