Learn how to set up a Prometheus exporter for your Cloud Databases and Analytics service so that a Prometheus server can collect metrics.
Requirements
- A Cloud Database or Analytics service up and running
- Access to the OVHcloud API
- A Prometheus server to collect metrics
Instructions
NOTE: We will be using MongoDB in the example API calls below. If you are using a different engine flavor, you must find the API calls for that specific service in the OVHcloud API.
Enable the Prometheus exporter for your service
You can enable a Prometheus exporter for your service using the API endpoint:
The boolean property enablePrometheus
should be set to true
to activate the Prometheus exporter for your service.
Retrieve the Prometheus exporter access info
Use the following API endpoint to get the data needed to access the Prometheus exporter:
You will also need to reset the credentials to obtain the password required for access:
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
Cloud Databases and Analytics offer service metrics via Prometheus for the following engines:
- Caching
- Cassandra
- Kafka
- Kafka Connect
- Kafka MirrorMaker
- MongoDB
- MySQL
- OpenSearch
- PostgreSQL
Prometheus endpoints are subject to the same networking limitations as the associated service. 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.
Go further
For more information and tutorials, please see our other Managed Databases & Analytics or Platform as a Service guides. You can also explore the guides for other OVHcloud products and services.
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for a custom analysis of your project.