How to upgrade to check_log2

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rellegib
Posts: 6
Joined: Fri Nov 04, 2011 2:43 pm

How to upgrade to check_log2

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to upgrade to check_log2

Post by abrist »

Which check_log plugin are you using? (there are a number of them)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rellegib
Posts: 6
Joined: Fri Nov 04, 2011 2:43 pm

Re: How to upgrade to check_log2

Post by rellegib »

Whatever comes with nrpe 2.12
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to upgrade to check_log2

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rellegib
Posts: 6
Joined: Fri Nov 04, 2011 2:43 pm

Re: How to upgrade to check_log2

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to upgrade to check_log2

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rellegib
Posts: 6
Joined: Fri Nov 04, 2011 2:43 pm

Re: How to upgrade to check_log2

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to upgrade to check_log2

Post 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.
Locked