OceanBase Cloud Platform (OCP) allows you to monitor the performance and resource usage of OceanBase clusters, OceanBase Database tenants, OBProxy clusters, and OBProxy hosts. You can view the monitoring data to learn about the status, performance, and resource usage of each monitored object. This way, you can ensure the availability of follow-up businesses by adjusting resource allocation in time. You can also troubleshoot business exceptions based on the monitoring data.
Introduction
The following table lists the four dimensions from which a metric and its sub-metrics are described.
| Dimension | Description |
|---|---|
| Definition | A brief introduction to the statistics monitored by the metric. |
| Description | The information that further describes the metric. The following three parts are included: |
| Calculation expression | Specifies how monitoring data is generated. |
| Collection SQL | The SQL statements for metric collection. The SQL statements for metric collection vary in OceanBase Database of different versions.
|
Monitoring principles
The following figure shows the sources and destinations of monitoring data.

Monitoring data is collected by the ocp_exporter process of OCP Agent based on metrics.
OCP-Server triggers data collection based on the instances in ocp_exporter_address. The collected data is saved in MonitorDB.
The collected data is aggregated and calculated based on the specified calculation expression to generate the statistics to be displayed on console pages. Here is an example:
sum(rate(ob_sysstat{stat_id="40000",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40002",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40004",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40006",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40008",@LABELS}[@INTERVAL])) by (@GBLABELS) + sum(rate(ob_sysstat{stat_id="40018",@LABELS}[@INTERVAL])) by (@GBLABELS)LABELS: the labels based on which the data is filtered.GBLABELS: the dimension from which the selected data is aggregated.INTERVAL: the granularity of data aggregation. The value is determined by the statistical granularity that you specified.
The generated data is carried by metrics and is displayed in the form of trend charts in the OCP console.
If a metric has sub-metrics, the data is carried by the sub-metrics to the OCP console.
View monitoring data
You can specify a time window, a statistical granularity, and a statistical scope on a monitoring data page in the OCP console to query specific data as needed. Take note of the following considerations about monitoring data:
OCP supports the execution of asynchronous background tasks to calculate the monitoring data in advance and avoid real-time query for each collection. This reduces the peak CPU workload and accelerates the loading of monitoring APIs. You can specify whether to enable the asynchronous calculation feature by using the
ocp.metric.async-compute.enabledparameter. For more information, see Modify system parameters.OCP will aggregate the collected raw data to reduce the data volume and extend the storage duration based on the downsampling logic, which downsamples the second-level data to the minute-level, and the minute-level data to the hourly-level. This way, OCP can improve the query speed while retaining as much as possible the trend and characteristics of the monitoring data. By default, the system implements the downsampling logic by using the maximum values. Specifically, the maximum value of the second-level data in a minute is used as the minute-level data for this minute. You can specify to use averages or initial values by modifying the
ocp.monitor.metric.collect.rollup.typeparameter.
View the monitoring data of an OceanBase cluster
Method 1:
Log in to the OCP console.
In the
Clusters list on theClusters page, find the target cluster and click its name.In the left-side navigation pane on the page that appears, click
Performance Monitoring .Log in to the OCP console.
In the left-side navigation pane, click Performance Monitoring. The OceanBase Cluster tab automatically appears.
In the left-side navigation pane, choose
Performance Monitoring . By default, the OceanBase Clusters tab appears.
You can view the cluster monitoring data on the Database Performance and
View the monitoring data of an OceanBase Database tenant
Method 1:
Log in to the OCP console.
In the left-side navigation pane, click
Tenants .In the
Tenants list, find the target tenant and click its name.In the left-side navigation pane on the page that appears, click
Performance Monitoring .
Method 2:
Log in to the OCP console.
In the left-side navigation pane, choose
Performance Monitoring . The OceanBase Clusters tab appears.Click the
OceanBase Database Tenant tab.
You can view the tenant monitoring data on the Performance and SQL,
Transactions , and Storage and Cache tabs. For more information, see View performance and SQL monitoring data, View transaction performance data, and View storage and cache monitoring data.You can view the tenant monitoring data on the Performance and SQL, Transactions, and Storage and Cache tabs. For more information, see View the performance and SQL monitoring data of a tenant, View transaction performance data, and View storage and cache monitoring data.
View the monitoring data of an OBProxy cluster
Method 1:
Log in to the OCP console.
In the left-side navigation pane, click OBProxy.
In the
Clusters list, find the target cluster and click its name.In the left-side navigation pane on the page that appears, click
Performance Monitoring .
Method 2:
Log in to the OCP console.
In the left-side navigation pane, choose
Performance Monitoring . The OceanBase Clusters tab appears.Click the
OBProxy Cluster tab.
You can view the monitoring data of the OBProxy cluster on the
View the monitoring data of a host
Log in to the OCP console.
In the left-side navigation pane, click
Hosts .In the
Hosts list, find the target host and click its name.Click the
Monitoring tab.
You can view the host monitoring data on the
Concepts
Collection granularity: the frequency at which the ocp_exporter process collects data from the monitored objects. Data can be collected at a granularity of one or more seconds, minutes, or hours, depending on the metric type.
Time window: the time range of the monitoring data displayed in the OCP console.
Statistical granularity: the granularity at which OCP aggregates the collected data. The granularity can be 1 minute or 1 second. If you set the granularity to 1 minute, minute-level statistics are displayed. If you set the granularity to 1 second, second-level statistics are displayed.
Statistical scope: the scope of displayed monitoring data. OceanBase Database is a distributed database service. The overall monitoring data of a cluster or a tenant is obtained by aggregating the monitoring data of all zones or OBServer nodes of the cluster or tenant. By default, the OCP console displays the overall monitoring data of a cluster or a tenant. You can set the statistic scope to a single zone or OBServer node. Then, only the monitoring data within the specified scope is displayed.