10.3. Monitoring MySQL Databases.

What should you configure in osagent.conf.xml to monitor your MySQL Databases ?

10.3.1. Checks for monitoring MySQL Databases

  • Checking running background processes with PROC

  • Checking open sockets on port 3306 (default) with SOCKETS

  • Checking the my.log (MySQL log file) with LOGS

  • Checking the health of the database server with MYSQL

  • Checking free space with DISK

10.3.2. Example configuration for monitoring MySQL Databases

<!-- ... -->
      <!-- The mysql mountpoint -->
      <DESCRIPTION>This is the file system with the MySQL data files. 
        Maybe you want to resize this file system</DESCRIPTION>
    <!-- More filesystems to check -->

      <!-- MySQL Background processes (the names differ on some MySQL versions
      <DESCRIPTION>Some/All MySQL background processes are not running! 
        Please check this. You should take a look to /var/log/my.log and to the
        trace files.</DESCRIPTION>
      <NUMBER>2</NUMBER><!-- 2 Background processes -->


      <!-- log slow queries -->
        <REGEX>select * from very_big_table</REGEX>

      <NAME>Slow queries</NAME> <!-- one output of "mysqladmin status" -->

      <NAME>Queries per second avg</NAME>

  <!-- ... -->