Multiple MySQL instances

Monitor multiple MySQL instances from one plugin

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: 

  1. Download and install the latest version of the Site24x7 Linux agent

After successful installation, you will see the Linux server monitor in the Site24x7 Control Panel. This confirms that the agent can communicate with our data center.

  1. Download the mysql.py and mysql.cfg files from the GitHub repository.

  2. Configure the host, port, username, and password in your mysql.cfg file.

  3. 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

Any field with a name password will be automatically encrypted once the server agent picks it up. The field will subsequently change to an encrypted password.
      [instance_name]

      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.