# Datadog

Spice Cloud can be monitored with Datadog using the [Metrics endpoint](https://docs.spice.ai/api/metrics) and a pre-built dashboard available in the [Spice repository](https://github.com/spiceai/spiceai/blob/trunk/monitoring/datadog-dashboard.json).

## Datadog Agent Configuration

**Prerequisite:** Datadog Agent version 6.5.0 or later is [installed](https://docs.datadoghq.com/agent/).

Configure the Datadog Agent to scrape your Spice Cloud metrics endpoint. Edit the `openmetrics.d/conf.yaml` file in the `conf.d/` folder at the root of your Agent's configuration directory:

```yaml
init_config:

instances:
  - prometheus_url: https://<app-cname>.spiceai.io/v1/metrics
    headers:
      X-API-Key: <API_KEY>
    namespace: spice
    metrics:
      - '*'
```

Replace `<app-cname>` with your app's CNAME (e.g. `us-west-2-prod-aws-data`) and `<API_KEY>` with your [app API key](https://docs.spice.ai/portal/apps/api-keys).

Restart the Agent to start collecting Spice metrics. Refer to [Prometheus and OpenMetrics metrics collection from a host](https://docs.datadoghq.com/integrations/guide/prometheus-host-collection/) for all available configuration options and supported parameters.

Open the Datadog **Metrics Explorer** and type `spice` to confirm Spice telemetry is successfully collected.

## Import Datadog Dashboard

1. In Datadog, create a **New Dashboard**
2. Click **Import dashboard JSON**
3. Upload the [`datadog-dashboard.json`](https://raw.githubusercontent.com/spiceai/spiceai/trunk/monitoring/datadog-dashboard.json) file

The dashboard provides panels for system health, query performance, data acceleration, caching, AI/ML operations, and Flight protocol metrics.

See also:

* [Metrics API](https://docs.spice.ai/api/metrics) - Endpoint reference and full list of available metrics
* [Grafana & Prometheus](https://docs.spice.ai/monitoring/monitoring/grafana) - Alternative monitoring with Grafana
