Custom Business Monitoring

Custom Monitoring Based on Prometheus

Kato has added a custom business monitoring function since V5.3, and supports users to implement custom business monitoring based on Prometheus through a custom Exporter plug-in. This operation requires users to have a systematic understanding of the Prometheus monitoring system.

MySQLD Exporter

As an example, Kato V5.3 comes with MySQLD Exporter plug-in after installation, which is implemented based on the standard MySQLD Exporter. Kato’s own Prometheus monitoring system rbd-monitor will collect the data in the Exporter and display it through the monitoring panel.

Plug-in Installation

Click the Plugins tab to open the MySQLD Exporter plugin.

After opening the plug-in, check the configuration to confirm whether the DATA_SOURCE_NAME (MySQL connection information) is correct.

After confirming that it is correct, follow the prompt Update Mysql service component to start collecting the metrics provided by MySQLD Exporter.

View Monitoring

This plug-in has been configured with commonly used monitoring charts by default, you can directly view it.

Click Monitor —— Business Monitoring to see the corresponding monitoring chart:

The MySQLD business monitoring data items displayed in the default monitoring chart include:

Monitoring item
Slow query
OPS
Disk Read Rate
Disk write rate
Byte receiving rate
Byte sending rate
InnoDB buffer pool size
Peak connection threads
Running thread peak
Average running threads
Table Lock lmmediate
Table Lock Waited

Manage Monitoring Points

By clicking on the Management Monitoring Point at the top right of the business monitoring panel, you can define monitoring point information, which defines the source of monitoring indicators.

The MySQLD Exporter plug-in has defined a set of monitoring point configurations. This set of configurations contains the following elements, all of which are required:

  • Configuration name: customize the name of this group of configurations

  • Collection task name: custom

  • Path: The source path of the indicator, according to the design of Exporter, you need to fill in the appropriate path

  • Port: The port that Exporter listens to

  • Collection interval: How often is the indicator collected

Monitoring points can be added with multiple groups of configurations, and users need to configure themselves according to their own designed Exporter.

Add Monitoring Chart

If we want to add a monitoring chart to show the current number of database connections, please follow the steps below:

Click Add Chart at the top of the business monitoring panel

After entering the new title and the corresponding query condition mysql_global_status_threads_connected, click Query. If the graph is returned normally, the query conditions are correct. The definition of the title should be as clear as possible, and the unit should be clarified if necessary.

After clicking Add, the new monitoring chart can be added to the business monitoring panel. The newly added monitoring chart will be placed at the end.

Access port 9104 of the Mysql service component, you can view all the monitoring items available for graphing under the /metrics path.

Custom Monitoring of Other Types of Business

For JAVA applications built from source code, we integrate the exporter in the construction process, and refer to the best practices for its usage: Customized monitoring for JAVA applications