Annotation in range

Hi, I’m trying to use the annotations in Grafana. I have managed to show the annotation in a certain timestamp.

However, I want to know if I can show a annotation in a range to see when the alarm starts and ends.

I hope someone knows if it can be done or not.

Pd: I’m using Flux

Best regards

Hello @JMU,
This sounds like more of a grafana question
Have you tried asking here?

Hi Anais,

Yes I tried, but no one is answered me. That is why I have tried in this community because you have solved some problem for me in the past.

@Jay_Clifford uses grafana more than i maybe he can help? Thank you!!

Ah! might be a little out of my knowledge range. Will have a play on my end and see if I can figure out something.

Yes you can work with ranges if your query provides corresponding output, as you can see in the form you can optionally select a column for “timeEnd” and if you do so, and the time value differs from “time”, you will get a range annotation for each row/event.

To try it out, you could duplicate the _time column in your query and add a fixed duration to it.

In my scenario, I store two fields “begin” and “end” in the measurement that I use as my annotation source. So I write the timestamps explicitely and “begin” just happens to be the same as “_time” for convenience in querying. But, you could also use join() to get a single row out of two queries which provide the time for begin, and end, respectively.

But how do I get the next rows time column?

I would like to add the next _time column if the value is different. I mean, the first row would have _time: 2022-02-15T17:25:38 and add a _time2 column for example with 2022-02-15T17:25:43.

What the query would be like?

Hey @JMU,

I think that this topic Find timerange based on the change of a value solves the problem you are referring to.

2 Likes