Description: To visualize the metrics and logs data, set up Grafana. LXD provides a Grafana dashboard that is configured to display the LXD metrics scraped by Prometheus and events sent to Loki. See the Grafana...

Hide navigation sidebar
Hide table of contents sidebar
Back to top
Toggle table of contents sidebar

# Set up a Grafana dashboard

To visualize the metrics and logs data, set up Grafana. LXD provides a Grafana dashboard that is configured to display the LXD metrics scraped by Prometheus and events sent to Loki.

Note

The dashboard requires Grafana 8.4 or later.

See the Grafana documentation for instructions on installing and signing in:

- Install Grafana

- Sign in to Grafana

Complete the following steps to import the LXD dashboard:

1. Configure Prometheus as a data source:

   1. From the Basic (quick setup) panel, choose Data Sources.

   2. Select Prometheus.

   3. In the URL field, enter the address of your Prometheus installation (`http://localhost:9090/`).

   4. Keep the default configuration for the other fields and click Save & test.

2. Configure Loki as another data source:

   1. Select Loki.

   2. In the URL field, enter the address of your Loki installation (`http://localhost:3100/`).

   3. Keep the default configuration for the other fields and click Save & test.

3. Import the LXD dashboard:

   1. Go back to the Basic (quick setup) panel and now choose Dashboards > Import a dashboard.

   2. In the Find and import dashboards field, enter the dashboard ID `19131`.

   3. Click Load.

   4. In the LXD drop-down menu, select the Prometheus and Loki data sources that you configured.

   5. Click Import.

You should now see the LXD dashboard. You can select the project and filter by instances.

At the bottom of the page, you can see data for each instance.