This topic describes how to monitor OceanBase Cloud using Prometheus.
Background information
OBCloud Exporter is a database data processing tool provided by OceanBase Cloud. You can use this tool to complete database authentication and data acquisition, and then use the local Prometheus tool to monitor the database accordingly.
Prerequisites
To integrate monitoring data, you must have a self-managed Prometheus and satisfy the following requirements:
- Access the Prometheus integration page with the root account UID and generate the configuration file.
- Prometheus integration is available only for running clusters.
- The scraping frequency is 1 minute. Frequencies higher than this will trigger rate limiting.
Procedure
Obtain the Prometheus
scrape_configfile.Note
For security reasons, a newly generated scrape_config file is displayed only once. Please make sure to copy its content before closing the page.
Log in to the OceanBase Cloud console.
In the left navigation pane, choose Integrations > Prometheus Integration.
On the Prometheus Integration page, follow the on-screen instructions to click Generate File to generate and copy the
scrape_configfile. Record thecredentialsandtargetslists.Integrate it into Prometheus.
In the monitoring directory specified for your Prometheus service, locate the Prometheus configuration file, for example:
/etc/prometheus/prometheus.yml.In the Prometheus configuration file, find the scrape_config section, and then copy the content of the
scrape_configfile obtained in Step 1 to the Prometheus configuration file.In the Prometheus service, check Status > Targets to confirm that the new
scrape_configfile has been read. If it is not effective, you may need to restart the Prometheus service.Visualize metrics with Grafana
Download the Grafana dashboard JSON file.
Import this JSON file into Grafana GUI.
(Optional) Customize the dashboard as needed, such as adding or removing panels, modifying data sources, or adjusting display options. For details, see Grafana official documentation.
