There is no option to do that with absent
.
But you can do something similar with timeshift:
- create query which will group by selected labels for metric in the past (e. g. 1 hour shift)
- create query which will group by selected labels for current metric
- join these 2 queries and detect which timeseries are missing somehow - those are timeseries, which have disappeared meanwhile and you can alert on them
That’s a suggestion , which can be implemented in one PromQL query.