check_mysql not using ~nagios/.my.cnf on RHEL 4withNagios 2.10 (Dag repository RPM)

Goltz, Jim (NIH/NLM/LHC) [C] jgoltz at mail.nih.gov
Tue Feb 12 22:34:44 CET 2008


> I'm running Nagios 2.10 quite successfully on Red Hat Enterprise Linux
> 4.  However, I can't seem to get check_mysql to use the proper
> configuration files.

Problem resolved.  Apparently Nagios does not define the environment variable HOME for its plugins, so "~" does not get expanded to the home directory for user "nagios".

I changed the command definition for check_mysql:

was: 	$USER1$/check_mysql -H $HOSTADDRESS$
now: 	env HOME=/var/log/nagios $USER1$/check_mysql -H $HOSTADDRESS$

The plugin is able to connect successfully now.

--
Jim Goltz <jgoltz at mail.nih.gov>
Contractor, Lockheed Martin
National Library of Medicine

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list