2020-05-19 09:08:24 -05:00
+++
2020-05-06 11:45:55 -05:00
title = "Thresholds"
type = "docs"
[menu.docs]
identifier = "thresholds"
parent = "panels"
weight = 300
+++
# 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:
2020-10-02 13:02:11 -05:00
- **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.
2020-05-06 11:45:55 -05:00
You can apply thresholds to the following visualizations:
2020-05-15 15:58:39 -05:00
- [Bar gauge ]({{< relref "visualizations/bar-gauge-panel.md" >}} )
- [Gauge ]({{< relref "visualizations/gauge-panel.md" >}} )
- [Graph ]({{< relref "visualizations/graph-panel.md" >}} )
- [Stat ]({{< relref "visualizations/stat-panel.md" >}} )
2020-09-23 12:48:30 -05:00
- [Table ]({{< relref "visualizations/table/_index.md" >}} )
2020-05-06 11:45:55 -05:00
## Default thresholds
On visualizations that support it, Grafana sets default threshold values of:
2020-10-02 13:02:11 -05:00
- 80 = red
- Base = green
- Mode = Absolute
2020-05-06 11:45:55 -05:00
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.
> **Note:** These instructions apply only to the Stat, Gauge, Bar gauge, and Table visualizations.
1. Navigate to the panel you want to add a threshold to.
1. Click the **Field** tab.
1. Click **Add threshold** .
1. Grafana adds a threshold with suggested numerical and color values.
1. Accept the recommendations or edit the new threshold.
2020-10-02 13:02:11 -05:00
- **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.
2020-05-06 11:45:55 -05:00
1. Click **Save** to save the changes in the dashboard.
## Add a threshold to a Graph 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.
1. Navigate to the graph panel you want to add a threshold to.
1. On the Panel tab, click **Thresholds** .
1. Click **Add threshold** .
1. Fill in as many fields as you want. Only the **T1** fields are required.
2020-10-02 13:02:11 -05:00
- **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** .
2020-05-06 11:45:55 -05:00
1. Click **Save** to save the changes in the dashboard.
## Delete a threshold
1. Navigate to the panel you want to add a threshold to.
1. Click the **Field** tab. (Or **Panel** tab for a graph panel.)
1. Click the trash can icon next to the threshold you want to remove.
1. Click **Save** to save the changes in the dashboard.