Page 1 of 3

Monitoring MySQL Servers

Posted: Tue May 14, 2013 9:13 am
by MSPk
Hi Team,

Do we have a guide detailing the process to be followed to monitor My SQL servers and if we need to install any pre-requisites before configuring any parameters.

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 9:54 am
by slansing
We do not have a guide for this as the connection is made from Nagios, so all configuration on the Nagios side is done in the wizard in an easy step by step process. Do you have a question on this?

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 9:59 am
by MSPk
I have jus added a MySQL server to the console and I get a message saying

"CRITICAL - cannot connect to mysql. Access denied for user 'username'@'ipaddress' (using password: YES)

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 10:48 am
by slansing
Is there any way you can share with us what the definition for this service looks like? You can do so by entering the CCM > Services > clicking the diskette icon next to this service.

You can block out any information you wish, but we need to see how you have the command string defined.

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 12:35 pm
by MSPk
here it is...
MySQL config-nsf.txt

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 1:18 pm
by slansing
Does your username / password contain any special characters? The rest of the definition looks fine to me.

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 1:23 pm
by lmiltchev
What is the version of Nagios XI that you are using?

Re: Monitoring MySQL Servers

Posted: Tue May 14, 2013 8:28 pm
by MSPk
User ID is Alphanumeric, while the pasword has special Characters like +,@

we are using the latest version on Nagios XI i.e 2012R1.8

Re: Monitoring MySQL Servers

Posted: Wed May 15, 2013 1:12 pm
by abrist
You may have issues with restricted/nasty meta characters in your password. To bypass the issue, you will have to utilize $USERn$ macros in the file /usr/local/nagios/etc/resource.cfg.
Edit the above file and add a new macro for your password. For example:

Code: Select all

$USER9$=sample_p@ssw+rd
Save out and restart nagios:

Code: Select all

service nagios restart
You will then reference the in place of the password by replacing your password with $USER9$ in the service check.

Re: Monitoring MySQL Servers

Posted: Thu May 16, 2013 4:18 am
by MSPk
Hi,

We are actually using a seperate SQL authentication as against the OS authentication on our other platform. I'm now able to monitor the MySQL parameters successfully with correct userid and password for this server.
e
The new issue I have is with multiple instances on a single server. we have a server where multiple MySQL databases are configured to listen on different ports (3306,3307,3308,3309). while configuring the DB's on ports 3307,3308,3309, if we use the respective Instance names I get an error, however if we use the name of the instance on port 3306 it works fine....I'm trying to understand if we are indeed getting the values from different databases from these checks or not.

The other issue is, we dont seem to get the slow_queries service created even if we check the box while configuring, seems to be an issue with the wizard itself. Please check and confirm.