Monitoring MySQL Servers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Monitoring MySQL Servers

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring MySQL Servers

Post 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?
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Monitoring MySQL Servers

Post 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)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring MySQL Servers

Post 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.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Monitoring MySQL Servers

Post by MSPk »

here it is...
MySQL config-nsf.txt
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring MySQL Servers

Post by slansing »

Does your username / password contain any special characters? The rest of the definition looks fine to me.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring MySQL Servers

Post by lmiltchev »

What is the version of Nagios XI that you are using?
Be sure to check out our Knowledgebase for helpful articles and solutions!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Monitoring MySQL Servers

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring MySQL Servers

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Monitoring MySQL Servers

Post 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.
Locked