MySQL is one of the most popular open-source relational database management systems. Configure this plugin collects runtime metrics from MySQL or MariaDB servers. It collects information about Connections, Query performance, InnoDB performance on your database instance(s).

Setup & Configuration

The MySQL plugin is included with the Atatus Infra agent by default, please follow the below section to enable.

  1. Copy the mysql example configuration file.

    copy
    icon/buttons/copy
    cd /etc/atatus-infra-agent/conf.d/mysql.d/
    sudo cp mysql.yml.template mysql.yml
    
  2. Update the file /etc/atatus-infra-agent/conf.d/mysql.d/mysql.yml with below configurations.

    copy
    icon/buttons/copy
    #Metrics section
    metrics:
    
          # Host should be defined as username and password
        - hosts: ["username:password@tcp(127.0.0.1:3306)/"]
    
          # Username of hosts Empty by default.
          #username:
    
          # Password of hosts Empty by default.
          #password:
    
          # Enable database monitoring
          #dbm: true
    
  3. Restart the atatus infrastructure agent.

    copy
    icon/buttons/copy
    sudo service atatus-infra-agent restart
    

Metrics

Name Description Type
mysql.status.connections The rate of connections to the server. long
mysql.status.max_used_connections The maximum number of connections to the server. long
mysql.status.threads.running The number of running threads. long
mysql.status.threads.connected The number of connected threads. long
mysql.status.innodb.buffer_pool.pages.total The total size of the InnoDB buffer pool, in pages. long
mysql.status.innodb.buffer_pool.pages.free The number of free pages in the InnoDB buffer pool. long
mysql.status.innodb.buffer_pool.pages.data The number of pages in the InnoDB buffer pool containing data. long
mysql.status.command.select The number of SELECT queries since startup. long
mysql.status.command.update The number of UPDATE queries since startup. long
mysql.status.command.insert The number of INSERT queries since startup. long
mysql.status.command.delete The number of DELETE queries since startup. long
mysql.status.aborted.connects The number of failed attempts to connect to the MySQL server. long