Hi, I don't know of any way to get the plugin to see/use the
/etc/my.cnf.  You could always just give your nagios mysql user very
limited rights - connection allowed only from your nagios host, status
query rights etc, etc, then use /usr/local/nagios/etc/resource.cfg to
"hide" the password  in $USER3$ or $USER4$ (or whatever you wanna call
it!).... Ie:

 

# resource.cfg 

$USER4$=somemysqlpassword

 

Then you could just use:

 

check_mysql -u nagios -p $USER4$ -H mysql.domain.com

 

in your service checks/commands.cfg, and at least the pass will not show
in nagios web/config view... 

 

Regards,

Jamie

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Goltz,
Jim (NIH/NLM/LHC) [C]
Sent: Tuesday, February 12, 2008 3:24 PM
To: nagios-users@lists.sourceforge.net
Subject: [Nagios-users] check_mysql not using ~nagios/.my.cnf on RHEL 4
withNagios 2.10 (Dag repository RPM)

 

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.

 

>From the command line everything works fine.  It reads the "[client]"
section of ~nagios/.my.cnf for the needed password.  However, it doesn't
seem to be using this config file when the plugin is run from Nagios
itself.

 

I could put the credentials into /etc/my.cnf, but I really don't want to
make them system-wide if I don't have to.  What's the proper way to get
the plugins to look in ~nagios/.my.cnf for MySQL config info?

 

--

 Jim Goltz <[EMAIL PROTECTED]>

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@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

Reply via email to