You can monitor multiple MySQL instances using a single plugin. You can configure the input data like the MySQL hostname, password, and other details in the mysql.cfg file. This enables multiple instance monitoring using the same plugin without changing the plugin script.
To monitor multiple instances of MySQL using the MySQL plugin, follow the steps below:
Download and install the latest version of the Site24x7 Linux agent.
Download the mysql.py and mysql.cfg files from the GitHub repository.
Configure the host, port, username, and password in your mysql.cfg file.
Then, add a new section with the instance name for identification in the mysql.cfg file.
[instance_name]
host = localhost
port = 3306
username = test
password = your_password
host = localhost
port = 3306
username = test
encrypted password = hash_for_your_password_created_by_site24x7
The agent will start executing the plugin with the defined configuration setup of mysql.cfg. For each configuration, the agent will add a MySQL plugin monitor for each MySQL instance. You can find the instances of MySQL by their respective instance names appended to the plugin monitor name.