Monitor Multple MySQL serveres with MySQL Plugin for Cacti

I’m just looking for some clarification on the configuration of monitoring more than one mysql server or instance. I’m pretty new to Cacti as well so I’m working through all of it. I have set up the config.php for cacti with the mysql parameters for the local mysql db which is also the cacti server as well. In the mysql script provided for the percona plugin it says just above the argument variables that I can leave the configuration in the config.php blank otherwise it will override what is in the ss_get_mysql_stats.php script. My questions is if I was to do that wouldn’t this cause a problem with how cacti access the local mysql db or could i just change the global.php for that purpose?

I see now that I don’t need to worry about that after fiddling around some more

ss_get_mysql_stats.php or its config ss_get_mysql_stats.php.cnf contains mysql password needed for the script itself to collect mysql stats from local/remote servers and it has nothing to do with how cacti accesses its local db.

How can I customize a single cacti monitoring server to use a different port than 3306? Meaning, we have one public MySQL server on a different port than 3306 and need to configure the port for that cacti device’s Percona MySQL checks separately. How can I do this?

jtnix, hmm, to change the port globally it’s easy in the config file but for a certain server - it’s an issue.
Theoretically, it’s possible to edit every single mysql data template and tick “Use Per-Data Source Value (Ignore this Value)” next to the port field under custom data.
Then after creating graphs you will be asked to fill in the port around 43 times :slight_smile: And it will work this way.
One thing I am not sure, whether after the templates update this tick clears and whether it has an effect on the actual data sources already created earlier.

Also I am thinking may be it makes sense to add the support to PMP for devices with hostnames like “ip : port” or “host : port” (w/o spaces). Cacti UI allows you to set such string.