The Gauge widget displays a single number, useful for displaying the number of errors per day or the number of active connections to a system.
The Gauge widget can display any data with at least one field containing a number. It multiple rows are present in the input, the first element is used. If multiple number fields are present, the field is unspecified.
Using the widget’s Style editor, you can configure the widget to assume different colors for different value ranges. For example, you could make the background yellow if the value is >100, and red if it is >500.
If we wanted to show the number of errors in a system, we could count them using:
loglevel = /error/i | count()
This produces a single result with a field
_count. If the Gauge widget is
selected, it will automatically select the first field it sees and use it as
the value to display.