Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion hugo/content/en/monitors/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ For more information, see the guide on how to [Customize monitor evaluation freq

### Thresholds

Use thresholds to set a numeric value for triggering an alert. Depending on your chosen metric, the editor displays the unit used (`byte`, `kibibyte`, `gibibyte`, etc).
Use thresholds to define when a monitor triggers an alert. A static threshold compares the evaluated value to a fixed number. Metric monitors also support [relative thresholds (Preview)](#relative-thresholds), which adapt to a historical baseline. Depending on your chosen metric, the editor displays the unit used (`byte`, `kibibyte`, `gibibyte`, etc).

#### Static thresholds

Datadog has two types of notifications (alert and warning). Monitors recover automatically based on the alert or warning threshold but additional conditions can be specified. For additional information on recovery thresholds, see [What are recovery thresholds?][5]. For example, if a monitor alerts when the metric is above `3` and recovery thresholds are not specified, the monitor recovers once the metric value goes back below `3`.

Expand All @@ -157,13 +159,36 @@ As you change a threshold, the preview graph in the editor displays a marker sho

**Note**: When entering decimal values for thresholds, if your value is `<1`, add a leading `0` to the number. For example, use `0.5`, not `.5`.

#### Relative thresholds

{{< callout url="#" btn_hidden="true" header="Preview" >}}
Relative thresholds are in Preview for metric monitors.
{{< /callout >}}

A relative threshold uses historical data from the same monitor query as its baseline. Datadog applies an optional multiplier to the aggregated baseline to calculate the threshold. For monitors grouped by tags, each group has its own baseline and threshold.

To configure a relative threshold in **Set alert conditions**:

1. Select a relative threshold and choose the alert direction.
2. Select a historical aggregation and a lookback window from 1 week to 6 months. The historical window must be at least as long as the monitor's evaluation window.
3. Set the multiplier and, optionally, a critical recovery threshold. For example, alert above `1.5x` the historical average and recover at or below `1.2x` that average.

The evaluation and historical aggregations can differ, including percentile and average aggregations for distribution metrics. With a `p95:` metric variable, `.rollup("percentile")` calculates the p95 across the window's distribution data, while `.rollup("avg")` averages the p95 timeseries values. See [Percentile queries][8] for examples.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: This link goes to a section on another page, so the link text needs to name that page. Without the page name, readers expect a section on the page they're reading.

Suggested change
The evaluation and historical aggregations can differ, including percentile and average aggregations for distribution metrics. With a `p95:` metric variable, `.rollup("percentile")` calculates the p95 across the window's distribution data, while `.rollup("avg")` averages the p95 timeseries values. See [Percentile queries][8] for examples.
The evaluation and historical aggregations can differ, including percentile and average aggregations for distribution metrics. With a `p95:` metric variable, `.rollup("percentile")` calculates the p95 across the window's distribution data, while `.rollup("avg")` averages the p95 timeseries values. For examples, see the [Percentile queries][8] section of the Relative Thresholds guide.


Historical thresholds are recalculated daily at midnight UTC and remain constant between updates. The monitor's evaluation frequency continues to control how often Datadog compares current values to those thresholds.

Relative thresholds support critical threshold queries and critical recovery threshold queries. Relative warning thresholds are not supported in Preview, and static and relative thresholds cannot be combined in the same monitor.

For configuration examples, query syntax, and limitations, see the [Relative Thresholds guide][7].

[1]: /monitors/guide/monitor_aggregators/
[2]: /monitors/guide/as-count-in-monitor-evaluations/
[3]: https://docs.datadoghq.com/logs/log_configuration/indexes/#set-daily-quota
[4]: /monitors/guide/custom_schedules
[5]: /monitors/guide/recovery-thresholds/
[6]: /monitors/types/log/
[7]: /monitors/guide/relative-thresholds/
[8]: /monitors/guide/relative-thresholds/#percentile-queries
{{% /tab %}}
{{% tab "Check alert" %}}

Expand Down
1 change: 1 addition & 0 deletions hugo/content/en/monitors/guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cascade:
{{< whatsnext desc="Monitor configuration:" >}}
{{< nextlink href="monitors/guide/best-practices-for-live-process-monitoring" >}}Best practices for Live Process Monitoring{{< /nextlink >}}
{{< nextlink href="monitors/guide/non_static_thresholds" >}}How to monitor non-static thresholds{{< /nextlink >}}
{{< nextlink href="monitors/guide/relative-thresholds" >}}Relative thresholds (Preview){{< /nextlink >}}
{{< nextlink href="monitors/guide/anomaly-monitor" >}}Anomaly monitors{{< /nextlink >}}
{{< nextlink href="monitors/guide/monitoring-sparse-metrics" >}}Monitoring Sparse Metrics{{< /nextlink >}}
{{< nextlink href="monitors/guide/monitor-arithmetic-and-sparse-metrics" >}}Monitor arithmetic and sparse metrics{{< /nextlink >}}
Expand Down
23 changes: 21 additions & 2 deletions hugo/content/en/monitors/guide/non_static_thresholds.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: How to monitor non-static thresholds
description: "Monitor variable thresholds using seasonal patterns, reference metrics, and composite monitors for dynamic alerting scenarios."
description: "Monitor variable thresholds using relative thresholds (Preview), seasonal patterns, reference metrics, and composite monitors."
further_reading:
- link: "/monitors/types/composite/"
tag: "Documentation"
Expand All @@ -16,10 +16,27 @@ A typical metric monitor triggers an alert if a single metric goes above a speci

Watchdog powered monitors (namely [anomaly][1] and [outlier][2]) are particularly useful when there isn't an explicit definition of your metric being off-track. However, when possible, you should use regular monitors with tailored alert conditions to maximize precision and minimize time-to-alert for your specific use case.

This guide covers common use cases for alerting on non-static thresholds:
Choose an approach based on the comparison you need:
- [Use a **relative threshold (Preview)** to compare a metric to its historical baseline](#relative-thresholds)
- [Alert on a metric that goes off track outside of **seasonal variations**](#seasonal-threshold)
- [Alert based on the value of another **reference** metric](#reference-threshold)

## Relative thresholds

{{< callout url="#" btn_hidden="true" header="Preview" >}}
Relative thresholds are in Preview for metric monitors.
{{< /callout >}}

A relative threshold compares the evaluated value of a metric monitor to a historical baseline from the same query. Datadog calculates a separate threshold for each group, so one monitor can cover resources with different normal values.

For example, alert when the average job duration over five minutes exceeds `1.5x` its average over the last week.

The current value and historical baseline can use different aggregations. For distribution metrics, compare a percentile to a historical percentile or to a historical average. With a `p95:` metric variable, an `avg` rollup averages the p95 timeseries values. See [Percentile queries][7] for all three comparison examples.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: This link goes to a section on another page, so the link text needs to name that page.

Suggested change
The current value and historical baseline can use different aggregations. For distribution metrics, compare a percentile to a historical percentile or to a historical average. With a `p95:` metric variable, an `avg` rollup averages the p95 timeseries values. See [Percentile queries][7] for all three comparison examples.
The current value and historical baseline can use different aggregations. For distribution metrics, compare a percentile to a historical percentile or to a historical average. With a `p95:` metric variable, an `avg` rollup averages the p95 timeseries values. For all three comparison examples, see the [Percentile queries][7] section of the Relative Thresholds guide.


Choose a historical aggregation and a lookback window from 1 week to 6 months. Historical thresholds are recalculated daily at midnight UTC and remain constant between updates. The monitor continues evaluating current values at its configured evaluation frequency.

For configuration steps, query syntax, critical recovery thresholds, and Preview limitations, see the [Relative Thresholds guide][6].

## Seasonal threshold

### Context
Expand Down Expand Up @@ -187,3 +204,5 @@ The last monitor is a Composite monitor, which sends an alert only if the two pr
[3]: /integrations/nginx/?tab=host#data-collected
[4]: /account_management/billing/usage_metrics/#types-of-usage
[5]: /logs/log_configuration/logs_to_metrics/#logs-usage-metrics
[6]: /monitors/guide/relative-thresholds/
[7]: /monitors/guide/relative-thresholds/#percentile-queries
Loading
Loading