Hi, there. I just installed the Percona plugins for Cacti. I followed the Percona instructions to install the PHP script and XML file into Cacti system. I created a new device to use this plugin. But, It doesn’t work properly. I attach the Log of this plugin.
05/16/2013 07:45:02 AM - CMDPHP: Poller[0] Host[2] DS[9] WARNING: Result from CMD not valid. Partial Result: MySQL: Can’t connect
Did you perform the section on configuring the username and password in the data pull scripts? The error looks like it is complaining about not being able to connect to a server it is trying to pull. So I’d check your config, and then check the server you are trying to monitor to make sure the username/password you specified works on it and that it allows connections from the Cacti host. Easy way to test that is to attempt to connect manually from the Cacti host to the server you are trying to monitor using the specified username and password. If that works, then it should work from Cacti if configured correctly. If that does not work, then you have an issue with your credentials.
Likely place to start is the /scripts/ss_get_mysql_stats.php file, or /scripts/ss_get_mysql_stats.php.cnf if you put them in a separate file.
Did you try connecting manually from the Cacti host to the server you are attempting to monitor using the same credentials you have configured in Cacti?
Scott, I couldn’t connect to the remote host using the same credentials that I configured in the PHP script. I tried using mysql commands. After I decided to monitoring mysql at localhost but I still have the same problem.
Debugging mode information.
/usr/share/cacti/site/scripts/ss_get_mysql_stats.php --host 127.0.0.1 --items ip,iq,ir,iu,ix,iz --user --pass --port , output: MySQL: Can’t connect to MySQL server on ‘127.0.0.1’ (111
Hi, gmouse, thanks for your help. I can see more info related with my problem.
I want to fix this problem. Question:
Do I need to do something specific in mysql configuration to access remotely?
If you cannot connect to the database manually using the credentials, then neither can Cacti.
From the debug message you posted, it looks like Cacti is attempting to connect with no username or password. Verify that your credentials are in /usr/share/cacti/site/scripts/ss_get_mysql_stats.php and that they are in the correct format and everything based on what the manual says.