|rex field=_raw "(?<message>OFF.*)|((?<sensor>Battery).*?(?<zone>\w+_ZONE))" |eval Device_ID=mvindex(split(source,"/"),5) |table Device_ID _time message sensor zone |where isnotnull(sensor) OR isnotnull(zone) OR isnotnull(message) |sort 0 Device_ID _time |streamstats current=f last(_time) as last_time1 last(zone) as last_zone by Device_ID |eval timestamp=strftime(last_time1,"%Y-%m-%d %H:%M:%S") |eval def=case(zone="INTERVENTION_ZONE" AND last_zone="SAFE_ZONE","Changed",zone="SAFE_ZONE" AND last_zone="INTERVENTION_ZONE","Changed",zone="LOWER_THRESHOLD_ZONE" AND last_zone="UPPER_THRESHOLD_ZONE","Changed") |eval time_off=if(message=="OFF",_time,null()) |filldown time_off | eval diff=if(def=="Changed",_time-time_off,null()) | chart sum(diff) by Device_ID, sensor This is the query I have tried. Expectation: Grouped bar plot showing the proportion/amount of time an individual handset's systems spends within each Thermal zone. X axis - Thermal zone (different zones) Y axis - proportion/amount of time spent in Thermal zone "x" Grouping - System being tracked (list of systems to the left) Include ability to filter/search for which device ID is being shown. I envision only one device able to be shown at once. Also want to be able to filter data by timeframe and/or ability to select individual inspections / boot cycles
... View more