When Druid is used for the database connection pool, the EDAS Druid database connection pool monitoring agent monitors the database connection pool and SQL execution.The monitored data is recorded once every 10 seconds and reset.
To use the Druid database connection pool, complete the following steps:
Log on to the EDAS console. In the left-side navigation pane, choose Application Management > Applications. On the Applications page, click the name of the target application.
On the Application Details page, click Application Diagnosis in the left-side navigation pane.
On the Application Diagnosis page, click the drop-down arrow on the right of ECS Instances (Instance ID/Name/IP), and select an ECS instance.
Click the Druid Database Connection Pool Monitor tab.
Click Start Monitoring.
Information about the database connection pool and SQL execution is displayed.The page is refreshed once every 10 seconds by default.
Note: When you click “Start Monitoring”, if StatFilter provided by the Druid database connection pool is not configured for the application, EDAS automatically adds StatFilter to the application.Given that this may slightly affect the performance, we strongly recommend that you manually add the StatFilter to your application.
Click Close to exit monitoring.
The monitoring information of the database connection pool includes the following:
- Database connection pool monitoring indicators include the database type, driver class, initial connection pool size, and maximum number of connections.
- Information of the database connection pool during running, including the size of available connections, peak size of available connections, and number of active connections.
The following table describes the Druid database connection pool monitoring indicators.
|DB Type||DB Type||Indicates the type of the database of the connected data source, for example, MySQL.|
|Driver Class||Driver Class||Indicates the class of the data driver.|
|User Name||User Name||Indicates the user of the database connection pool.|
|Init Size||Init Size||Indicates the initial size of the database connection pool.|
|Max Active||Max Active||Indicates the maximum number of connections in the database connection pool.|
|Pool Size||Pool Size||Indicates the number of available connections in the database connection pool.|
|Maximum Pool Size||Maximum Pool Size||Indicates the maximum number of available connections in the database connection pool.|
|Active Count||Active Count||Indicates the number of active connections in the database connection pool.|
The SQL execution information consists of the information of SQL statements executed in the last 10 seconds and the information of SQL statements whose maximum execution time exceeds 100 milliseconds.The monitoring indicators for both of these two parts are the same. They are described in the following table.
|SQL||SQL||Indicates the executed SQL statement.|
|Executed Count||Executed Count||Indicates the number of executions of this SQL statement.|
|Total Executed Time||Total Executed Time||Indicates the total execution time of this SQL statement.|
|Maximum Executed Time||Maximum Executed Time||Indicates them maximum execution time of this SQL statement.|
|Maximum Returned Rows||Maximum Returned Rows||Indicates the maximum number of returned rows of this SQL statement.|
|Monitor Time||Monitor Time||Indicates the recording time of this SQL record.|