How Does eG Enterprise Monitor MySQL Cluster Database Server?

eG Enterprise monitors MySQL Cluster database server in an agentless manner. All that is required for this is an eG agent needs to be deployed on a remote Windows host in the environment.

Pre-requisites for Monitoring the MySQL Cluster Database Server

To execute the tests of the MySQL Cluster component, the eG agent should be configured with the credentials of a user who has server-wide process and select privileges. If such a user does not pre-exist, then, in the user table of the mysql database available in the primary instance of the target MySQL Cluster server, you need to manually create a user account with the aforesaid privileges. To create and configure such a user, follow the procedure discussed below:

  1. To create a new user account, you must first connect to the primary instance of the MySQL cluster server as the MySQL root user. For that, first login to the MySQL Cluster host, and at the command prompt, issue the following command:

    mysql -u root 

    If you have assigned a password to the root account, you will also need to supply a - password or -p option, as shown below:

    mysql -u root -pegurkha

  2. After successfully logging into the primary instance of the MySQL Cluster server, issue the following statement to access the mysql cluster database, which holds the user table:

    use mysql

  3. Then, at the MySQL prompt, issue the following command to create a user:

    CREATE USER ‘<username>’@’<IP_address_of_eG_agent>’ IDENTIFIED BY ‘<password>’;

    GRANT PROCESS,SELECT ON . TO ‘<username>’@’<IP_address_of_eG_agent>’;

    For instance, to ensure that user john (with password john) is able to connect to the MySQL Cluster database server (being monitored) from the eG agent host,  192.168.8.91, the following command is to be issued:

    CREATE USER ‘john’@’192.168.8.91’ IDENTIFIED BY ‘john’;

    GRANT PROCESS,SELECT ON . TO ‘john’@’192.168.8.91’;

    This will ensure that the user is created on the primary instance of the target MySQL Cluster database server.

    Note:

    1. The CREATE and GRANT commands are case-sensitive; therefore, take care while specifying the user name, password, and privileges.
    2. Only the IP address of the eG agent's host can be provided as part of the CREATE command's syntax; the host name of the eG agent cannot be provided instead.
  4. To ensure that the external agent is able to execute the MySQL Network test, make sure that you create a user with the same credentials (i.e., name and password) and privileges as above and map that user to the IP address of the external agent. For instance, in the example above, to enable the external agent at IP address 192.168.8.92 to run the MySQL Network test, your command should be:

    CREATE USER ‘john’@’192.168.8.92’ IDENTIFIED BY ‘john’;

    GRANT PROCESS,SELECT ON . TO ‘john’@’192.168.8.92’;

  5. Once the above-mentioned commands execute successfully, the user table will be updated with two records for the user account that was newly created - one mapped to the internal/remote agent’s IP address and another mapped to the external agent’s IP address.  

Once the pre-requisites are set, manage the target MySQL Cluster server using the procedure explained in the Managing MySQL Cluster Database Server topic. The MySQL Cluster database sserver should be added/managed in the eG administrative interface using its IP address only, and not its host name. Then, proceed to configure the tests. While doing so, remember to configure the user name and password parameters with the name and password (respectively) that corresponds to the eG agent’s IP address in the user table.