mysql user in resources.cfg

Chantal Rosmuller chantal at antenna.nl
Tue Apr 18 08:07:18 CEST 2006


Hi everyone, I have a question,

I want to monitor mysql service on a remote machine, so I created a mysql user 
that is allowed to log in from the nagios server

when I add the following to checkcommands.cfg 

# 'check_mysql' command definition
	define command{
        	command_name    check_mysql
       	        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u 
username -p password
        }


It works but when I want to add username and password to resources.cfg like 
this:

$MYSQLUSER$=username
$MYSQLPASSWORD$=password

and add this to checkcommands.cfg:


# 'check_mysql' command definition
	define command{
        	command_name    check_mysql
        	command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $MYSQLUSER$ 
-p $MYSQLPASSWORD$
                }


it doesn't work, in fact I get the following message

user "$"@server is not allowed to log in

Can anyone point me in the right direction?

Regards, Chantal


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
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