Checks whether there are any data points in the specified time window.
- If there are no data points, returns 1.
- Otherwise, returns 0.
|timeWindow||Amount of time in the moving time window. You can specify a time measurement based on the clock or calendar (1s, 1m, 1h, 1d, 1w), the window length (1vw) of the chart, or the bucket size (1bw) of the chart. Default is minutes if the unit is not specified.|
|tsExpression||Expression describing the time series to be tested.|
Checks whether a time series returned data in a specified time window. For example
missing(5m, ts(my_metric)) returns 1 if
my_metric returned no data in the last 5 minutes.
mcount(<window>, <exp>) = 0 in a query gives you similar results, however, such a query does not work if the expression doesn’t exist at all. In contrast,
missing() works with non-existing metrics.
The exists() function returns 1 if any time series described by the expression exists, and returns 0 otherwise. That function doesn’t use a time window.