Lab 11.2: Creating dashboards from Prometheus metrics
Add Prometheus Source To Grafana
1. Click the “add source” option from the Grafana homepage.
2. Add the source name, Prometheus endpoint details and save it.
Create Dashboards From Prometheus Source
1. Select the create dashboard option as shown below.
2. Select the graph type. You can select the type based on the type of visualization and dashboard you need.
3. Select the edit option from the panel top.
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.
You can find all the saved dashboards under the home option.
Also, you can organize your dashboards under different folders based on your needs.