Spice can be monitored with Grafana (opens in a new tab) using the Spice Metrics Endpoint (opens in a new tab) and pre-built dashboards available in the Spice repository (opens in a new tab).
Navigate to the Dashboards section in Grafana and click "New" > "Import".
Copy the dashboard JSON from monitoring/grafana-dashboard.json (opens in a new tab) into the Grafana import box.
Click "Load".
View the Kubernetes (opens in a new tab) deployment guide for configuring the Prometheus Operator to scrape metrics from the Spice instances in Kubernetes.
Configure a Prometheus instance to scrape metrics from the Spice runtimes.
This tutorial creates and configures Grafana and Prometheus locally to scrape and display metrics from several Spice instances. It assumes:
spiced-main and spiced-edge, are running on 127.0.0.1:9091 and 127.0.0.1:9092 respectively.Create a compose.yaml:
Create a prometheus.yaml to
Add a prometheus as a source to grafana. Create a .grafana/provisioning/datasources/prometheus.yml
Run the Docker Compose
Go to http://localhost:3000/dashboard/import and add the JSON from monitoring/grafana-dashboard.json (opens in a new tab).
The dashboard will have data from the Spice runtimes.