Exclusion

Exclude null

FunctionDescriptionExample
exclude_null()Remove groups with N/A tag values from your graph or top list.exclude_null(avg:system.load.1{*} by {host})

For example, say you have a metric with two tags: account and region. account has three possible values (prod, build and N/A) while region has four possible values (us-east-1, us-west-1, eu-central-1, and N/A).

When you graph this metric as a timeseries, you would have 3 x 4 = 12 lines on your graph. Applying exclude_null() removes lines with tag combinations containing any N/A values, leaving you with 2 x 3 = 6 groups.

Clamp

FunctionDescriptionExample
clamp_min()Set any metric values under a threshold value to equal that value.clamp_min(avg:system.load.1{*}, 100)
clamp_max()Set any metric values over a threshold value to equal that value.clamp_max(avg:system.load.1{*}, 100)

The clamp_min() and clamp_max() functions take one parameter:

  • THRESHOLD: the threshold value you’ve specified.
    • clamp_min() sets all datapoints below the threshold to equal that value, while clamp_max() limits datapoints above the threshold.

Cutoff

FunctionDescriptionExample
cutoff_min()Remove metric values under a threshold value.cutoff_min(avg:system.load.1{*}, 100)
cutoff_max()Remove metric values over a threshold value.cutoff_max(avg:system.load.1{*}, 100)

The cutoff_min() and cutoff_max() functions take one parameter:

  • THRESHOLD: the threshold value you’ve specified.
    • cutoff_min() removes all metric values lower than this threshold value from your graph, while cutoff_max() removes all metric values higher than this threshold value.

The cutoff functions do not remove values that are equal to the threshold value.

In addition, the functions do not delete datapoints from Datadog entirely; it only removes them from your visualization. Disabling the function brings your datapoints back.

Tip: For both the clamp and cutoff functions, it may be helpful to see the threshold value you have chosen. You can set a horizontal marker in Dashboards to indicate this value.

Other functions