4.03L Create gauge panel - MartinWong06/grafana GitHub Wiki

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

  2. Select "Gauge" as the panel type.

  3. In the Metrics tab, select the data source and enter the PromQL query for the metric you want to display. For example, to display the CPU usage as a percentage, you could use the query:

    100 - (avg(irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
    This query calculates the average CPU usage over the last 5 minutes and subtracts it from 100 to get the percentage of CPU usage.
  4. In the Options tab, you can configure the appearance of the gauge chart, such as the minimum and maximum values, the color thresholds, and the gauge type.

  5. Click on "Apply" to save the panel and view the gauge chart in the dashboard.

The resulting gauge chart will show the current value of the metric as a pointer on a circular gauge, with color zones indicating the different levels of the metric.

⚠️ **GitHub.com Fallback** ⚠️