Page 2 of 2
Re: check_mysql_query
Posted: Mon Oct 12, 2015 11:57 am
by garazh317
hsmith wrote:Can you run a 'pre flight check?' /usr/lib64/nagios/bin/nagios -v /usr/lib64/nagios/etc/nagios.cfg
If that doesn't work, my paths may be slightly off. I am not used to that directory structure. How did you install Nagios? What OS is it running on?
Preflight has only 10 warnings about default contacts.
I have different directory structure. nagios -v /etc/nagios/nagios.cfg This path is right. And that grep '$USER1' /etc/nagios/private/resource.cfg.
Nagios installed on centos from yum.
Re: check_mysql_query
Posted: Mon Oct 12, 2015 5:10 pm
by ssax
Generally the only thing that would cause problems with this is special characters in the password, does your database have any special characters in it?
Did you copy and paste the check command from a document? You may want to check to make sure the dashes are really dashes and not converted to Microsoft's weird long dash. Every time I copy and paste I replace the dashes with a hand typed dash (or quote) just in case.
Thanks
Re: check_mysql_query
Posted: Tue Oct 13, 2015 7:14 am
by garazh317
Retyped all manually, the same problem.
Re: check_mysql_query
Posted: Tue Oct 13, 2015 5:13 pm
by hsmith
Let's enable debugging and then have you try to run the check again.
In your nagios.cfg file, change
debug_level=0 to debug_level=-1
debug_verbosity=1 to debug_verbosity=2
max_debug_file_size=1000000 to max_debug_file_size=10000000
Let us know if there are any clues in that output.
Thanks!