Menu

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.

Grafana Cloud Enterprise Open source

Configure thresholds

This section includes information about using thresholds in your visualizations. You’ll learn about thresholds, their defaults, how to add or delete a threshold, and adding a threshold to a legacy panel.

About thresholds

A threshold is a value that you specify for a metric that is visually reflected in a dashboard when the threshold value is met or exceeded.

Thresholds provide one method for you to conditionally style and color your visualizations based on query results. You can apply thresholds to most, but not all, visualizations. For more information about visualizations, refer to Visualization panels.

You can use thresholds to:

There are two types of thresholds:

  • Absolute thresholds are defined by 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.
Give it a try using Grafana Play
Give it a try using Grafana Play

With Grafana Play, you can explore and see how it works, learning from practical examples to accelerate your development. This feature can be seen on Threshold example.

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 or delete a threshold

You can add as many thresholds to a panel as you want. Grafana automatically sorts thresholds values from highest to lowest.

Delete a threshold when it is no longer needed. When you delete a threshold, the system removes the threshold from all visualizations that include the threshold.

  1. To add a threshold:

    a. Edit the panel to which you want to add a threshold.

    b. In the options side pane, locate the Thresholds section and click + Add threshold.

    c. Select a threshold color, number, and mode. Threshold mode applies to all thresholds on this panel.

    d. For a time-series panel, select a Show thresholds option.

  2. To delete a threshold, navigate to the panel that contains the threshold and click the trash icon next to the threshold you want to remove.

Add a threshold to a legacy graph panel

In the Graph panel visualization, thresholds enable you to add lines or sections to a graph to make it easier to recognize when the graph crosses a threshold.

  1. Navigate to the graph panel to which you want to add a threshold.
  2. On the Panel tab, click Thresholds.
  3. Click Add threshold.
  4. Complete the following fields:
    • 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 - Toggle the display of the threshold fill.
    • Line - Toggle the display of the threshold line.
    • Y-Axis - Choose to display the y-axis on either the left or right of the panel.
  5. Click Save to save the changes in the dashboard.