I’m after some help, I’m a newbie big time sor sorry if this is a simple issue.
I’m using the latest grafana build, self-hosted build.
I have data stored in a mysql database, to keep the explanation simple, the data is monitoring a system when the system is good a 0 (zero) is dropped into the database and bad 1(one) is dropped into the database. Each time the data is written to the database it is written with a timestamp also. In this instance the data is captured ever 5 secs, but i dont want to rely on that 5 secs, as this can be changed at any time. The data points 0 & 1 can change at anytime. I have created a timeline of the data, no problem and set the thresholds so red if 1and green if 0. I have selected to merge if consecutive data points are the same, so when hovering over the are you can see the total duration of the reds & green as you hover along the bar.
What i was to output is a hours value based on the duration set on the view ie 7 days etc. For example 7hr 24mins in red (1) over that selected period.
How do I do this as i need to create some sort of calculation / query that considers each time the data point changes…