trouble with check_mysql and USER macros
Aleksey Tsalolikhin
aleksey.tsalolikhin at gmail.com
Thu Dec 1 03:23:26 CET 2005
Hi again.
I am trying to configure the check_mysql plugin to check my database.
In checkcommands.cfg, I've put the following command line for
check_mysql so I can specify
the IP address, database name, username and password:
command_line $USER1$/check_mysql -H $ARG1$ -d $ARG2$ -u
$ARG3$ -p $ARG4$
In services.cfg, I put the following in the service definition for this service:
check_command
check_mysql!192.168.160.2!mydbname!mydbusername!mydbpassword
and restarted Nagios, and it worked. The Nagios web page displayed
the database statistics.
However, when I tried changing that to
check_command
check_mysql!192.168.160.2!mydbname!mydbusername!$USER4$
and setting $USER4$ in resource.cfg, I get error
Access denied for user 'mydbusername'@'192.168.160.1' (using password: YES)
note: 192.168.160.1 is the ip address of the machine Nagios is running
on. Different from the machine that the database is on.
very strange that the ip address changed. I double checked
services.cfg and 192.168.160.2 is still in there.
Am I approaching this the right way in terms of configuring it? I am
going to replace check_mysql with a little script that logs the
arguments it is called with, so I can get a better idea of what's
happenning.
New Nagios User.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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