4.02L Create a singlestat panel - MartinWong06/grafana GitHub Wiki
-
Click on the "Add" button in the Grafana dashboard, then select "Visualization" from the dropdown menu.
-
Select "Singlestat" as the panel type.
-
In the "Query" tab, select the Prometheus data source (or any other data source) and enter the PromQL query to retrieve the metric you want to display.
-
For example, sum(rate(prometheus_http_requests_total[1m])).
-
In the "Panel" tab, you can customize the visualization by selecting the appropriate options, such as changing the unit, decimal precision, and thresholds.
-
You can also add a title, description, and other options in the "General" and "Alert" tabs. Click on the "Save" button to save the singlestat panel to the dashboard.
Example
sum(prometheus_http_requests_total) by (handler)
up{job=prometheus}