# How to set up Digibee API metrics with Datadog

**Datadog** is a monitoring platform that provides extensive visibility into the performance and health of various aspects of a company’s IT infrastructure, applications, and services.

It has built-in integrations with several other resources such as cloud services, programming languages, etc. For an overview of all available integrations, see [Datadog Integrations](https://docs.datadoghq.com/integrations/).

## Requirements

* Datadog Agent Version >= 6.6.0.
* Feature enabled for your realm.&#x20;
* **Username,** **Password** and **API Key** generated on the [Digibee APIs](https://docs.digibee.com/documentation/developer-guide/platform-administration/digibee-apis) menu.
* Connection between your Datadog Platform and Digibee Integration Platform cluster.

## Example of usage

### **Configuration**

Create or edit the file [openmetrics.d/conf.yaml](https://docs.datadoghq.com/integrations/openmetrics/#setup) in the root of your Agent’s configuration directory. Use the configuration below:

```yaml
## Digibee + Datadog Configuration
instances:
  # Add instances as much as you have/need
  - openmetrics_endpoint: <DIGIBEE_SERVICES_API_URL>/metrics/openmetrics_raw?environment=<ENVIRONMENT>
    namespace: "<REALM>-<ENVIRONMENT>"
    metrics:
      - <METRIC_NAME>
    headers:
      apikey: <DIGIBEE_SERVICES_API_APIKEY>
    auth_type: basic
    username: <DIGIBEE_SERVICES_API_USERNAME>
    password: <DIGIBEE_SERVICES_API_PASSWORD>
```

{% hint style="info" %}
Add your username using the format: \<realm>-\<username>, as shown in [Digibee APIs](https://docs.digibee.com/documentation/developer-guide/platform-administration/digibee-apis).
{% endhint %}

### **VPN configuration**

Create or edit the file [openmetrics.d/conf.yaml](https://docs.datadoghq.com/integrations/openmetrics/#setup) in the root of your Agent’s configuration directory. Use the configuration below:

```yaml
## Digibee + Datadog Configuration
instances:
  # Add instances as much as you have/need
  - openmetrics_endpoint: <DIGIBEE_SERVICES_API_URL>/metrics/openmetrics_raw?>
    namespace: "<REALM>"
    metrics:
      - <METRIC_NAME>
    headers:
      apikey: <DIGIBEE_SERVICES_API_APIKEY>
    auth_type: basic
    username: <DIGIBEE_SERVICES_API_USERNAME>
    password: <DIGIBEE_SERVICES_API_PASSWORD>
```

## **Variables**

{% hint style="warning" %}
The ENVIRONMENT variable is **NOT** used for VPN metrics.
{% endhint %}

<table><thead><tr><th width="138.33333333333331">#</th><th>Variable Name</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>DIGIBEE_SERVICES_API_URL</td><td>URL displayed on the APIs credentials page after setting up a credential.</td></tr><tr><td>2</td><td>REALM</td><td>Your realm’s name.</td></tr><tr><td>3</td><td>ENVIRONMENT</td><td>Environment to collect metrics from.</td></tr><tr><td>4</td><td>DIGIBEE_SERVICES_API_APIKEY</td><td>Generated after setting up a username and password on the Digibee APIs menu.</td></tr><tr><td>5</td><td>DIGIBEE_SERVICES_API_USERNAME</td><td>Username created/configured on the Digibee APIs menu.</td></tr><tr><td>6</td><td>DIGIBEE_SERVICES_API_PASSWORD</td><td>Password created/configured on the Digibee APIs menu.</td></tr><tr><td>7</td><td>METRIC_NAME</td><td>List of metric names (one per line) according to the table below.</td></tr></tbody></table>

## Visualizing your data in Datadog

When the Agent is set up to collect metrics, you can use them to create comprehensive Datadog alerts, charts, and dashboards.

<figure><img src="https://content.gitbook.com/content/jvO5S91EQURCEhbZOuuZ/blobs/tmVH2IIeVAWkLvOY0iVF/Datadog%202.png" alt=""><figcaption><p><em>Source: Datadog</em></p></figcaption></figure>

## Metrics

<table data-full-width="true"><thead><tr><th>Metric Name</th><th>Description</th><th>Type</th></tr></thead><tbody><tr><td><strong>jvm_memory_bytes_committed</strong></td><td>Committed (bytes) of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_bytes_init</strong></td><td>Initial bytes of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_bytes_max</strong></td><td>Maximum (bytes) of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_bytes_used</strong></td><td>Used bytes of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_pool_bytes_committed</strong></td><td>Committed bytes of a given JVM memory pool.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_pool_bytes_init</strong></td><td>Initial bytes of a given JVM memory pool.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_pool_bytes_max</strong></td><td>Maximum bytes of a given JVM memory pool.</td><td>Gauge</td></tr><tr><td><strong>jvm_memory_pool_bytes_used</strong></td><td>Used bytes of a given JVM memory pool.</td><td>Gauge</td></tr><tr><td><strong>pipeline_all_hung</strong></td><td>Boolean indicating if all pipeline consumers are hung.</td><td>Gauge</td></tr><tr><td><strong>pipeline_cached_bytes</strong></td><td>Total cached bytes.</td><td>Summary</td></tr><tr><td><strong>pipeline_component_executions_total</strong></td><td>The total number of executions per component.</td><td>Counter</td></tr><tr><td><strong>pipeline_component_processi_latency_seconds</strong></td><td>Component processing latency in seconds.</td><td>Summary</td></tr><tr><td><strong>pipeline_inflight</strong></td><td>Number of currently running (inflight) pipelines.</td><td>Gauge</td></tr><tr><td><strong>pipeline_inflight_reported_by_camel</strong></td><td>Number of currently running (inflight) pipelines reported by Camel.</td><td>Gauge</td></tr><tr><td><strong>pipeline_jvm_memory_bytes_max</strong></td><td>Maximum (bytes) of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>pipeline_jvm_memory_bytes_used</strong></td><td>Used bytes of a given JVM memory area.</td><td>Gauge</td></tr><tr><td><strong>pipeline_message_error_rate_in_sec</strong></td><td>Message error rate per seconds (integer number).</td><td>Gauge</td></tr><tr><td><strong>pipeline_message_monitoring_processor_latency_seconds</strong></td><td>Message monitoring processor latency in seconds.</td><td>Summary</td></tr><tr><td><strong>pipeline_message_processing_latency_seconds</strong></td><td>Duration that a message is executed within a replica (Pipeline response time)</td><td>Summary</td></tr><tr><td><strong>pipeline_message_rate_in_sec</strong></td><td>Message rate per seconds (integer number).</td><td>Gauge</td></tr><tr><td><strong>pipeline_message_size_bytes</strong></td><td>Message size in bytes.</td><td>Summary</td></tr><tr><td><strong>pipeline_process_cpu_seconds_total</strong></td><td>Total user and system CPU time spent in seconds.</td><td>Counter</td></tr><tr><td><strong>pipeline_redeliveries</strong></td><td>Total number of messages redelivered.</td><td>Counter</td></tr><tr><td><strong>rabbitmq_queue_messages</strong></td><td>Number of messages in the queue in a given time.</td><td>Gauge</td></tr></tbody></table>

### VPN Metrics

<table data-full-width="true"><thead><tr><th>Metric name</th><th>Description</th><th>Type</th></tr></thead><tbody><tr><td>ipsec_tunnel_bytes_in</td><td>Total amount of data received through the tunnel in bytes.</td><td>Counter</td></tr><tr><td>ipsec_tunnel_bytes_out</td><td>Total amount of data sent through the tunnel in bytes.</td><td>Counter</td></tr><tr><td>ipsec_tunnel_nat_status</td><td>Indicates the status of Network Address Translation (NAT).</td><td>Gauge</td></tr><tr><td>ipsec_tunnel_status</td><td>Current tunnel status (up or down).</td><td>Gauge</td></tr><tr><td>ipsec_tunnel_status_last_run</td><td>Timestamp of the last execution of the tunnel status check.</td><td>Counter</td></tr><tr><td>ipsec_tunnel_vpncheck_status</td><td>Indicates the status of the service that collects VPN metrics.</td><td>Gauge</td></tr></tbody></table>
