4.02L Create a singlestat panel - MartinWong06/grafana GitHub Wiki

create a singlestat chart in Grafana:

  1. Click on the "Add" button in the Grafana dashboard, then select "Visualization" from the dropdown menu.

  2. Select "Singlestat" as the panel type.

  3. 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.

  4. For example, sum(rate(prometheus_http_requests_total[1m])).

  5. In the "Panel" tab, you can customize the visualization by selecting the appropriate options, such as changing the unit, decimal precision, and thresholds.

  6. 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}
⚠️ **GitHub.com Fallback** ⚠️