Lab 11.2: Creating dashboards from Prometheus metrics


Add Prometheus Source To Grafana

1. Click the “add source” option from the Grafana homepage.

prometheus grafana add source

2. Add the source name, Prometheus endpoint details and save it.

prometheus grafana source

Create Dashboards From Prometheus Source

1. Select the create dashboard option as shown below.

prometheus grafana create dashboard

2. Select the graph type. You can select the type based on the type of visualization and dashboard you need.

prometheus graph selection

3. Select the edit option from the panel top.

grafana edit panel

4. Select the Prometheus data source and enter the Prometheus expression that has to be graphed under the metrics tab. You can preview the graph using the preview button. Under the general tab, you can assign a name for the dashboard. Save the dashboard after preview.

In the following example, we have given the expression for calculating CPU seconds every minute.

prometheus dashboard source and preview

You can find all the saved dashboards under the home option.

grafana saved dashbaords

Also, you can organize your dashboards under different folders based on your needs.

grafana create folders