Pre-requisites for Monitoring the Maria Database Server

The eG agent is capable of monitoring the Maria Database server in both agent-based and agentless manner. For the eG agent to collect the required metrics, ensure that the following pre-requisites are fulfilled:

  1. The eG agent should be configured with the credentials of a user who has server-wide process and select privileges. For a detailed procedure, refer to Configuring the eG Agent with Access Privileges section .
  2. Enabling the performance_schema database.

    Note:

    Performance overheads are generally noticed when the performance_schema database is enabled. The performance overhead varies according to the transaction load and the size of the hardware installed in the target environment, version of the target Maria Database server installed etc. If you choose not to enable the performance_schema database, then, the following test will not report metrics:

    • Maria Connection Errors
    • Maria Files
    • Maria Locks
    • Maria Execution Statistics
    • Maria Event Stages
    • Maria Event Statements
    • Maria Thread Statistics and
    • Maria Wait Events
  3. Enabling the tables like setup_instruments and setup_consumers available in the Performance schema database.

Enabling the Performance Schema Database

To execute certain tests of the target Maria Database server, it is necessary that the performance_schema database on the Maria Database server is enabled. To enable the performance_schema database, do the following in the my.cnf/my.ini configuration files:

  • If the Maria Database Server is installed on Linux/Unix platforms, open the $MYSQL_HOME/my.cnf file. If the Maria Database Server is installed on Windows Platform, open the <MariaDB_INSTALL_DIR>\data\my.ini file.

    Note:

    There may be multiple my.ini files and my.cnf files in different directories of the target Maria Database server. To monitor the target Maria Database Server, it is necessary to enable the performance_schema database by editing the files available in the above-mentioned direcctories only.

  • Edit the [mysqld] section and include 'performance_schema' as shown in Figure 1.

    Enabling Performance Schema Database

    Figure 1 : Enabling the performance_schema database

  • Finally, save the file and restart the MYSQL SERVICE from the target Maria Database server.

Enabling the tables in the Performance Schema database

Some tests like Maria Event Stages test will execute and report metrics to the eG agent only when the setup_instruments and setup_consumers tables are enabled. To enable these tables, execute the following commands in the performance schema database:

--UPDATE setup_instruments SET ENABLED = 'YES', TIMED = 'YES';

--UPDATE setup_consumers SET ENABLED = 'YES' WHERE NAME LIKE '%stages%';