i'm facing a nightmarishly hard problem to solve for something that seems so trivial. Ultimately, i'm trying to detect a single increment of a counter metric in PromQL when there was no data previously in order to trigger an alert.
I've hit a dead-end in PromQL and the only other solution seems to be to initialise a counter to 0 using Benthos (i.e serve the counter as a value as 0, even though it's not been incremented in the processor pipeline). Is this possible? if it is, it would allow me to detect a change from 0 -> 1 instead of [no-data] -> 1.
Any guidance would be much appreciated
One way around it is to use a mix of
sequenceandgenerateinputs:The message created by the
generateinput is used to set thattestmetric and then it's discarded.