Hi,
I would like to create a dashboard to display uptime. I have a CSV file where we have time field (15 mins bin) start at 00:00:00 to 23:45.. there is a value field had sum up to calculate outage time. how do we calculate uptime from outage time.
Let's imagine your data looks something like this:
| gentimes start="03/01/2020 0:00:00" end="03/02/2020" increment=15m
| streamstats count as id
| eval value = if(id<10, random() % 16, 0)
| rename starttime as _time
| table _time value
Then add a running total with streamstats like this:
| rename value as downtime_in_min
| eval uptime_in_min = 15 - downtime_in_min
| streamstats sum(downtime_in_min) as RUNNING_TOTAL_downtime_in_min, sum(uptime_in_min) as RUNNING_TOTAL_uptime_in_min
| table _time downtime* uptime* RUNNING_TOTAL*