Using the Instaclustr Monitoring API with Datadog

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 is to utilize a Prometheus server (for scraping the Instaclustr Prometheus service discovery endpoint) and Vector (to forward the data to the Datadog Metrics Explorer). 

This page assumes that you have already setup and configured a Prometheus server with Instaclustr’s Monitoring API, and are already ingesting relevant metrics from Instaclustr.

 Get Datadog API Key

  • Have Datadog working/installed. 
  • Signup to Datadog 
  • Navigate to Organization Settings
    Select the Organization Settings option in the sidebar
  • Go to the API Keys section and create a New Key.
    Select API Keys in the sidebar
  • This API Key will be used later in the Vector section of this guide.

Vector

 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:
  • To simplify future commands with vector, it is recommended to use an alias:
  • To check that Vector is now installed, run the command:

Prometheus

  • 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:

    The <Vector IP> should be replaced with the routable IP address of your Vector container.

    Use the Vector container IP address in the Prometheus remote_write section of your config file

  • 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”.
    See graphs of your metrics in the Metrics Explorer section

Observability Pipelines

  • 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. 
  • Visit this Datadog official documentation in order to set up Observability Pipelines.
  • The process will involve adding the following code to the top of your vector.toml file:

    Press the button to Get Started with Observability PipelinesSelect the TOML format for your Observability Pipelines configuration file
  • To view your pipeline, in Datadog, go to Integrations and then Observability Pipelines.
    Select the Observability Pipelines option within the Integrations section of the sidebar
  • Here you can view your pipeline and see if messages are in fact being sent through Vector from the Prometheus source, to the Datadog sink.
    Observe the flow of your data with Observability Pipelines
By Instaclustr Support
Need Support?
Experiencing difficulties on the website or console?
Already have an account?
Need help with your cluster?
Contact Support
Why sign up?
To experience the ease of creating and managing clusters via the Instaclustr Console
Spin up a cluster in minutes