archiecobbs/logwarn

check_logwarn reports UNKNOWN - Logwarn error

Closed this issue · 7 comments

What steps will reproduce the problem?
1. Monitor a MySQL instance that has no activity and no connections to the 
instance
2. Verify that the error.log file has zero bytes
3. Plugin reports "UNKNOWN - Logwarn error"

You can also duplicate by doing a "flush logs" on the MySQL instance.

What is the expected output? What do you see instead?

I expect that the Nagios plug-in will report OK, since there is no errors in 
the log, and the MySQL instance is running normally, just nothing logged to the 
instance.

What version of the product are you using? On what operating system?

1.0.3 on CentOS release 5 (Final)

Please provide any additional information below.


Original issue reported on code.google.com by leepara...@gmail.com on 16 Dec 2011 at 8:38

You should only get UNKNOWN if logwarn fails for some reason, e.g., a system 
error.

Try running the plugin directly from the command line as the same user that 
Nagios is running it. You should see the error.

My guess is your nagios user doesn't have permission to open the log file.

Original comment by archie.c...@gmail.com on 16 Dec 2011 at 8:50

  • Changed state: Feedback
We do have permissions as the error.log file has world read permissions.  The 
nagios user is able to run the script and output a state file, it is just 
returning UNKNOWN on all our instances where the log file is zero bytes (after 
flush logs) and logs have been rotated.

Original comment by leepara...@gmail.com on 16 Dec 2011 at 9:25

Try doing this and send me the output (replace filenames if needed):

$ /bin/bash -x /usr/lib/nagios/plugins/check_logwarn /var/log/mysql/error.log


Original comment by archie.c...@gmail.com on 16 Dec 2011 at 11:06

We're executing via NRPE, but getting this:

-bash-3.2$ /opt/nagios/libexec/check_nrpe -H dev-bwe-01.1515.mtvi.com -c 
check_mysql_logwarn -a dev-bwe-01 -t 15
UNKNOWN - Logwarn error|logwarn: 
/opt/mysql/instance/dev-bwe-01/admin/log/error.log: Success 

Original comment by leepara...@gmail.com on 16 Dec 2011 at 11:50

This is the same bug as described in issue #2.

You need to upgrade to a newer version of logwarn. The latest is 1.0.8.


Original comment by archie.c...@gmail.com on 19 Dec 2011 at 3:27

  • Changed state: Duplicate
The latest on the downloads tab is 1.0.7.  Is there somewhere else to download 
1.0.8?

Original comment by leepara...@gmail.com on 20 Dec 2011 at 3:47

Sorry, my mistake... 1.0.8 has not been released yet. 1.0.7 should work fine.

Original comment by archie.c...@gmail.com on 20 Dec 2011 at 4:02