How to perform SQL monitoring to MySQL environment
Today’s article will introduce you how to perform SQL monitoring to MySQL environment.
<Preparation ① Environment and JDBC Driver>
Prepare the following:
・Environment with Hinemos Manager
・Environment with Hinemos Client (Web or Rich Client)
・Environment with MySQL
・JDBC Driver for MySQL 
*1 The required JDBC Driver will vary depending on the version of Hinemos Manager installed to the environment. Please select the appropriate JDBC Driver by referring to the Administrator’s Guide.
This time, since the version of Hinemos (for Linux) is 6.2.1, we will be using a JDBC Driver which runs on Java Runtime Environment 8.0.
Reference: Hinemos ver.6.2 Administrator’s Guide (Linux Manager) Section 6.1.1 “Adding a Monitoring Target RDBMS”
you will need to prepare a JDBC Driver which works with the RDBMS when adding the corresponding RDBMS for SQL Monitor. (This is a JDBC Driver which operates in Java Runtime Environment 8.0)
<Preparation ② Adding a JDBC Driver to RDBMS>
●Reason to add a JDBC Driver to RDMS
The SQL Monitor feature executes SQL statements on a DB server (RDBMS) via a JDBC Driver and monitors the execution results.
PostgreSQL and SQL Server are available in Linux Hinemos Manager and Windows Hinemos Manager by default.
To select MySQL or Oracle as a monitor target, installing a JDBC Driver is required.
We will install the JDBC Driver mentioned in ① to specify MySQL as a monitor target this time.
For how to add a JDBC Driver, please refer to Administrator’s Guide for the version of Hinemos you are using.
This time, we will perform SQL monitoring using Hinemos ver.6.2.1 Linux Manager. Therefore, we will add a JDBC Driver, with reference to “6.1.1 Adding a Monitoring Target RDBMS” of Hinemos ver.6.2 Administrator’s Guide (Linux Manager).
- Procedure for adding a JDBC Driver to RDBMS
1. Install the JDBC Driver mentioned in ① under [Hinemos Manager installation directory]/hinemos/plugins/.
- Restart Hinemos Manager.
This completes the procedure for adding a JDBC Driver to RDMS.
Now, let’s configure SQL Monitor settings!
The SQL Monitor feature provides two types of monitoring – numeric and string monitoring.
This time, we will perform both types of monitoring.
Now, let’s configure an SQL (Numeric) Monitor setting first.
*In the images below, IP addresses are blacked out.
Although no special setting is required, you need to keep in mind the following 3 points.
・Enter【jdbc:mysql://<MySQL server’s IP address>/<Name of database where SQL statements will be executed>】in the Manager URL field
・Specify MySQL in the Connecting DB field
・Specify MySQL server in the Scope field.
Next, configure an SQL (String) Monitor setting.
No special setting is required, either. You need to keep in mind the same points as SQL (Numeric) Monitor.
Now that the configuration is completed, let’s confirm the results quickly!
Confirm the result of SQL (Numeric) monitoring first.
Since SQL monitoring was successful, the result of SQL sentence execution has been output!
Next, confirm the result of SQL (String) monitoring.
Since SQL monitoring was successful here, too, the result of SQL statement execution has been output.
In this article, we explained how to monitor a MySQL server.
If we get a chance, we will introduce you how to monitor Oracle Database, which is also related to SQL Monitor, next time!
Thank you for reading!