Skip to main content

Datadog

Spice can be monitored with Datadog using the Spice Metrics Endpoint.

Metrics Endpoint Configuration​

The metrics endpoint uses port 9090 by default. The metrics endpoint configuration is logged at startup.

2024-07-15T21:48:00.158267Z  INFO spiced: Metrics listening on 127.0.0.1:9090

Pass the --metrics parameter to bind to a specific port. For example, to bind to port 9091:

 spiced --metrics 0.0.0.0:9091

or when using Docker:

FROM spiceai/spiceai:latest

# Docker configuration ...

# Configure the metrics endpoint on port 9090
CMD ["--metrics", "0.0.0.0:9090"]
EXPOSE 9090

Configuration of the metrics endpoint can be verified using a HTTP GET request, for example:

curl http://localhost:9090/metrics

# TYPE spiced_runtime_http_server_start counter
spiced_runtime_http_server_start 1

# TYPE spiced_runtime_flight_server_start counter
spiced_runtime_flight_server_start 1

# TYPE datasets_count gauge
datasets_count{engine="None"} 1
datasets_count{engine="arrow"} 1
...

Datadog Agent Configuration​

Prerequisite: Datadog Agent version 6.5.0 or later is installed.

Configure the Datadog Agent to scrape the Spice metrics endpoint:

  1. Edit the openmetrics.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory:
init_config:

instances:
- prometheus_url: SPICE-METRICS-ENDPOINT>/metrics # for example http://localhost:9090/metrics
namespace: spice
metrics:
- '*'
  1. Restart the Agent to start collecting Spice metrics.
  2. Refer to Prometheus and OpenMetrics metrics collection from a host for all available configuration options and supported parameters.
  3. Open Datadog Metrics Explorer and type spice to confirm Spice telemetry information is successfully collected.

Import the Spice Datadog Dashboard​

  1. Create New Datadog Dashboard
  1. Click Import dashboard JSON and drag and drop monitoring/datadog-dashboard.json file
  1. Dashbord is now configured to display Spice.ai OSS key performance metrics