## TL;DR

Use timestamp() and unless() with a 5-minute offset to spot gaps: query the metric and take the complement of the same metric offset by 5 minutes.

## Fix

1. Use timestamp() and unless() with a 5-minute offset to spot gaps: query the metric and take the complement of the same metric offset by 5 minutes.
   Expected: you can confirm this matches your situation.

## When to use

- You are setting up or using this Chronosphere feature.
- The symptom matches: finding flapping Prometheus endpoints with a PromQL gap pattern.

## When NOT to use

- Unrelated Chronosphere issues (different feature, different failure).
- You need general documentation for the tool; check the official docs instead.

## Compatibility

Reported against Chronosphere. Source: https://docs.chronosphere.io/investigate/querying/metrics/troubleshooting.

## Variant phrasings

### finding flapping Prometheus endpoints with a PromQL gap pattern

## Why it happens

Metrics go missing intermittently and you need a repeatable way to see when a Prometheus endpoint stopped emitting.

## Edge cases

- If your error message differs even slightly, this is probably a different issue; search the exact text.
- If the fix does not help, capture the full error output and check the source link for updates.

## Source

https://docs.chronosphere.io/investigate/querying/metrics/troubleshooting