Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Thresholds
Thresholds set the color of either the value text or the background depending on conditions that you define.
You can define thresholds one of two ways:
- Absolute thresholds are defined based on a number. For example, 80 on a scale of 1 to 150.
- Percentage thresholds are defined relative to minimum or maximum. For example, 80 percent.
You can apply thresholds to most, but not all, visualizations.
Default thresholds
On visualizations that support it, Grafana sets default threshold values of:
- 80 = red
- Base = green
- Mode = Absolute
The Base value represents minus infinity. It is generally the “good” color.
Add a threshold
You can add as many thresholds to a panel as you want. Grafana automatically sorts thresholds from highest value to lowest.
- Navigate to the panel you want to add a threshold to.
- Open the category Thresholds in the right side options pane.
- Click Add threshold.
- Grafana adds a threshold with suggested numerical and color values.
- Accept the recommendations or edit the new threshold.
- Edit color: Click the color dot you wish to change and then select a new color.
- Edit number: Click the number you wish to change and then enter a new number.
- Thresholds mode - Click the mode to change it for all thresholds on this panel.
- Click Save to save the changes in the dashboard.
Add a threshold to a Graph (old) panel
In the Graph panel visualization, thresholds allow you to add arbitrary lines or sections to the graph to make it easier to see when the graph crosses a particular threshold.
- Navigate to the graph panel you want to add a threshold to.
- On the Panel tab, click Thresholds.
- Click Add threshold.
- Fill in as many fields as you want. Only the T1 fields are required.
- T1 - Both values are required to display a threshold.
- lt or gt - Select lt for less than or gt for greater than to indicate what the threshold applies to.
- Value - Enter a threshold value. Grafana draws a threshold line along the Y-axis at that value.
- Color - Choose a condition that corresponds to a color, or define your own color.
- custom - You define the fill color and line color.
- critical - Fill and line color are red.
- warning - Fill and line color are yellow.
- ok - Fill and line color are green.
- Fill - Controls whether the threshold fill is displayed.
- Line - Controls whether the threshold line is displayed.
- Y-Axis - Choose left or right.
- T1 - Both values are required to display a threshold.
- Click Save to save the changes in the dashboard.
Delete a threshold
- Navigate to the panel you want to add a threshold to.
- Click the Field tab. (Or Panel tab for a graph panel.)
- Click the trash can icon next to the threshold you want to remove.
- Click Save to save the changes in the dashboard.