gauge command transforms results into a format suitable for display by the gauge chart types.
Each argument must be either a real number or the name of a numeric field.
If range values are provided there must be two or more. The gauge will begin at the first value provided and end at the final value provided. Intermediate range values will be used to split the total range into sub-ranges. These sub-ranges will be visually distinct.
If no range values are provided, the range will default to a low value of 0 and a high value of 100.
A single range value is meaningless and will be ignored.
The output of the
gauge command is a single result, where the value is in a field called x and the ranges are expressed as a series of fields called y1, y2, and so on.
The gauge chart types enable you to see a single numerical value mapped against a range of colors. These colors could have particular business meaning or business logic. As the value changes over time, the gauge marker changes position within this range.
gauge command enables you to indicate the field. The field value will be tracked by the gauge chart. You can define the overall numerical range represented by the gauge and you can define the size of the colored bands within that range. If you want to use the color bands, you can add four "range values" to the search string. These range values indicate the beginning and end of the range. These range values also indicate the relative sizes of the color bands within this range.
For more information about using the
gauge command with the gauge chart type, see the Visualization Reference's subsection about Charts in the Data Visualization Manual.
gauge <value> [<range_val1> <range_val2>...]
- Description: A numeric field or literal number to use as the current value of the gauge. A named field will retrieve the value from the first input result.
- range_val1 range_val2...
- Description: A space-separated list of two or more numeric fields or numbers to use as the displayed range of the gauge. Each parameter can independently be a field name or a literal number. Field names are retrieved from the first input result. The total range of the gauge will be from the first
range_valto the last
range_val. If there are more than three
range_valparameters, the ranges between each set of values will be visually distinguished in the output.
- Default range: 0 to 100.
Count the number of events and display the count on a gauge with 4 regions, where the regions are 0-750, 750-1000, 1000-1250,1250-1500.
index=_internal | stats count as myCount | gauge myCount 750 1000 1250 1500
There are three types of gauges that you can choose from: radial, filler, and marker. For more information about using the
gauge command with the gauge chart type, see the Gauges section in Dashboard and Visualizations.
Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the gauge command.
This documentation applies to the following versions of Splunk Cloud™: 7.0.0, 6.5.1, 6.5.1612, 6.6.0, 6.6.1, 6.6.3, 6.5.0