MySQL Integration

MySQL Integration for Watchlog

The MySQL integration allows you to monitor one or more MySQL databases in real-time. Watchlog collects essential metrics such as active connections, query operations (INSERT, UPDATE, DELETE, SELECT), slow queries, opened tables, and more. These insights help you ensure performance, stability, and optimize resource usage in your MySQL environments.

Step 1: Install the Watchlog Agent

If you haven't already installed the Watchlog Agent, download and install it on your server. Refer to the installation guide for detailed instructions.

Step 2: Configure MySQL in integration.json

Locate the integration.json file and enable MySQL integration by adding or updating the following configuration:

  {
      "service": "mysql",
      "monitor": true,
      "host": "localhost",
      "port": "3306",
      "username": "root",
      "password": "",
      "database": ["mydb"]
  }
                

Replace the username, password, and database fields with your actual MySQL credentials and the list of databases you want to monitor.

On an Ubuntu Agent, this file is typically located at /opt/watchlog-agent/integration.json.

For the Source Agent, it is found in the Watchlog Agent directory.

Step 3: Restart Watchlog Agent

Restart the Watchlog Agent to apply the changes:

  sudo pm2 reload watchlog-agent
                

Step 4: Verify Integration

Log in to the Watchlog panel and navigate to the MySQL integration section. Verify that metrics from your MySQL databases are being collected and displayed correctly.