VMware Cloud Community
ccliver
Contributor
Contributor

Problem Monitoring MySQL Server with Multiple Instances

I haven't been able to find anything about this searching the forums so I'm posting in hopes that somebody has solved this problem before. I tested Hyperic HQ on a MySQL database server running a single, default instance on port 3306. Now that I'm trying to set it up in our production environment I'm having a problem connecting to MySQL servers running multiple instances on different ports. The server is running Ubuntu 8.04 and 2 MySQL 5.0 servers, 1 on port 10003 and 1 on port 10004. When I try to configure the MySQL server properties with this jdbc connector: jdbc:mysql://localhost:10003, I get this error:


The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: Failed to invoke getProcMem[State.Name.eq=mysqld,Args.*.ct=/usr/local/mysql,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=mysql,Args.*.ct=/usr/local/mysql/data10003/db.pid10003,Args.*.ct=10003,Args.*.ct=/tmp/mysql.sock10003,Args.*.ct=1,Args.*.ct=slow-queries.log,Args.*.ct=15,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=1,Args.*.ct=32M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=1024,Args.*.ct=256M,Args.*.ct=128,Args.*.ct=38,Args.*.ct=96M,Args.*.ct=2M,Args.*.ct=500,Args.*.ct=1800,Args.*.ct=1800,Args.*.ct=10,Args.*.ct=INNODB,Args.*.ct=ibdata1:200M:autoextend,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=1G,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=8,Args.*.ct=24M,Args.*.ct=1,Args.*.ct=READ-COMMITTED,Args.*.ct=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION]: Missing '=': State.Name.eq=mysqld,Args.*.ct=/usr/local/mysql,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=mysql,Args.*.ct=/usr/local/mysql/data10003/db.pid10003,Args.*.ct=10003,Args.*.ct=/tmp/mysql.sock10003,Args.*.ct=1,Args.*.ct=slow-queries.log,Args.*.ct=15,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=1,Args.*.ct=32M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=1024,Args.*.ct=256M,Args.*.ct=128,Args.*.ct=38,Args.*.ct=96M,Args.*.ct=2M,Args.*.ct=500,Args.*.ct=1800,Args.*.ct=1800,Args.*.ct=10,Args.*.ct=INNODB,Args.*.ct=ibdata1:200M:autoextend,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=1G,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=8,Args.*.ct=24M,Args.*.ct=1,Args.*.ct=READ-COMMITTED,Args.*.ct=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Shared



I've also tried configuring the jdbc connector with the IP of the server: jdbc:mysql://10.10.10.163:10003, but then I get a different error:

The configuration has not been set for this resource due to : Invalid configuration: Error retrieving value: Service mysqlstats:query=show /*!50002 global */ status,key=variable_name,value=value:Created_tmp_files not found


Using these same connection parameters I can manually connect to the MySQL instances on this server from the hyperic server and locally on the server. Neither of these error messages are helping me determine what's going on. Has anybody experienced a similar problem?
Reply
0 Kudos
7 Replies
ccliver
Contributor
Contributor

Nobody is using hyperic to monitor multiple instances of MySQL on 1 server?
Reply
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

what is your process.query for your second MySQL server ?
Could you please make sure, that your database user for the second MySQL instance has the right credentials ?

Cheers,
Mirko
Reply
0 Kudos
ccliver
Contributor
Contributor

Here's the process.query:

State.Name.eq=mysqld,Args.*.ct=/usr/local/mysql,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=mysql,Args.*.ct=/usr/local/mysql/data10003/db.pid10003,Args.*.ct=10003,Args.*.ct=/tmp/mysql.sock10003,Args.*.ct=1,Args.*.ct=slow-queries.log,Args.*.ct=15,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=1,Args.*.ct=32M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=2M,Args.*.ct=1024,Args.*.ct=256M,Args.*.ct=128,Args.*.ct=38,Args.*.ct=96M,Args.*.ct=2M,Args.*.ct=500,Args.*.ct=1800,Args.*.ct=1800,Args.*.ct=10,Args.*.ct=INNODB,Args.*.ct=ibdata1:200M:autoextend,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=/usr/local/mysql/data10003,Args.*.ct=1G,Args.*.ct=16M,Args.*.ct=256M,Args.*.ct=8,Args.*.ct=24M,Args.*.ct=1,Args.*.ct=READ-COMMITTED,Args.*.ct=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

The user is root and is allowed to login from any host.
Reply
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

why do you use such a long process query ?
This one should be sufficient:
State.Name.eq=mysqld,Args.*.ct=/usr/local/mysql/data10003/db.pid10003

Which HQ version are you running ? The MySQL plugin has been replaced with an updated plugin in 4.1

Cheers,
Mirko
Reply
0 Kudos
ccliver
Contributor
Contributor

The process query was auto-generated by Hyperic.

It turned out that the problem was the 'hyperic' user that I created on the server didn't have access to the MySQL directory (/usr/local/mysql), so it couldn't read the pid file or the slow query log. As a work around I'll be adding the 'hyperic' user to the 'mysql' group on all of our DB servers.
Reply
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

you do not necessarily enable read permission on the MySQL directory to monitor your MySQL instance, only if you want to enable log or configuration tracking.

Cheers,
Mirko
Reply
0 Kudos
MadMe
Contributor
Contributor

Check what the real procesname is for MySQL. On my Machine it was not the mysqld-nt.exe but mysql.exe. When i changed that it worked
Reply
0 Kudos