I am trying to create a stat panel which shows how much time is passed sence ifOperStatus is changed from 1 to 2 or reverse.
Ive try time() - timestamp(ifOperStatus{stuff, stuff}) and chose from Value Options Calculation - last* and Fields - time but it did not work as expected.
Hi, I think you need some changes() function around your series selector. Something like time() - timestamp(changes(ifOperStatus{stuff, stuff}[$__range]) > 0). Keep in mind Prometheus won’t return any data if the change happened outside the range of your query, so plan it accordingly
When i change the query to your suggested method time() - timestamp(changes(ifOperStatus{ stuff, stuff}[$__range]) > 0) while in format: table im seeing this