Fetch service metrics with Prometheus for Public Cloud Databases
Find out how to setup a Prometheus exporter for your Public Cloud databases service
Objective
Public Cloud databases allow you to export service metrics using Prometheus.
This guide explains how to setup a Prometheus exporter for your Public Cloud databases service so that a Prometheus server can collect metrics.
Requirements
- A Public Cloud databases service up and running,
- Access to the or to the ,
- A Prometheus server to collect metrics.
Instructions
Enable the Prometheus exporter for your service
In the left-hand menu of your Public Cloud project, click your engine under Databases, then click the name of your service.
Open the Configuration tab and locate the Prometheus integration section (the Configure link of the Prometheus block in the Observability tab leads to the same place). Click Enable Prometheus.
Enabling it may take a few minutes. Once ready, the credentials and endpoint appear in the section.
To stop the exporter later, click Disable Prometheus in the same section, then Confirm.
Retrieve the Prometheus exporter access info
In the Prometheus integration section of the Configuration tab, copy the access information:
- Username;
- for MongoDB, the SRV domain, which resolves to the nodes of the cluster;
- for the other engines, the Host and Port of each node: when the cluster has several nodes, select the node in the Prometheus target list to display its host and port.
To obtain the password, click Reset password, then Confirm. A new password is generated and the current one stops working immediately. Copy it right away: it cannot be shown again.
Configure your Prometheus server and start pulling metrics
Use the data from the previous state to configure your Prometheus server and start pulling metrics for your service. Here is an example of such a Prometheus configuration for a MongoDB service:
The other engines use a slightly different format:
Limitations
Public Cloud Databases offer service metrics via Prometheus for the following engines:
- Valkey
- MongoDB
- MySQL
- PostgreSQL
Prometheus endpoints are subject to the same networking limitations the associated service is. Thus, IP restrictions apply, and for services using private networking, the Prometheus exporter endpoint is only reachable from the private network your service is attached to.
We want your feedback!
We would love to help answer questions and appreciate any feedback you may have.
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Are you on Discord? Connect to our channel at https://discord.gg/ovhcloud and interact directly with the team that builds our databases service!