Instaclustr’s Monitoring API is designed to allow you to integrate the monitoring information from your Instaclustr managed cluster with the monitoring tool used for the entire application. Datadog (datadoghq.com) is a popular platform for monitoring a range of applications. This support documentation page will walk you through how to use the Instaclustr Monitoring API with Datadog.
At a high-level, the approach we will take in this page isto utilize a Prometheus server (for scraping the Instaclustr Prometheus service discovery endpoint) and Vector(to forward the data to the Datadog Metrics Explorer).
This API Key will be used later in the Vector section of this guide.
Once you have your Datadog API key, the next step is installing and configuring Vector. This will need to run continuously for metrics processing. It can be installed and configured on the same instance as your Prometheus server.
Using Vector with Docker:
Create a directory for holding your configuration files. For our examples we have used /etc/vector
Create a configuration file called vector.toml with the following contents:
This file contains 2 parts:
A source which pipes in your data from Prometheus, using a function called remote write.
A sink which sends the metrics from the transform to Datadog.
Optionally, in the middle of the source and sink, it can also have a transform which remaps and structures the data from the source. However, in this example it is not necessary.
Pull the latest Vector Docker container with the command:
docker pull timberio/vector:latest-debian
To simplify future commands with vector, it is recommended to use an alias:
aliasvector='docker run -i -e DATADOG_API_KEY_ENV_VAR="<Datadog Api Key>" -v /etc/vector/:/etc/vector/ --rm timberio/vector:latest-debian'
To check that Vector is now installed, run the command:
In order to proceed you will need a running and configured Prometheus server. For a guide on how to do this, please see the Instaclustr Prometheus Setup Guide. For simplicity, you could also configure Prometheus on the same server you are running Vector on.
In your prometheus.yml file, add the following section:
- url: "http://<VectorIP>:9091"
The <Vector IP> should be replaced with the routable IP address of your Vector container.
In your Vector terminal window, run your vector file with the command:
Note: for usage in production it is recommended to configure the Vector application through a service, such as Systemd.
Metrics should now be running in the Datadog Metrics Explorer. The names of Instaclustr’s metrics start with “ic_”, e.g., “ic_node_osload”.
If you wish, you can also link your Vector pipeline to Datadog’s Observability Pipelines tool. Observability Pipelines enables you to monitor all of your Vector pipelines.