Plot step function to display state change of machines based on timestamp
Hi,
Assume I have a table like this:
Time Machine State
====================================
10/07/2017 5:15:00 PM M1 On
11/07/2017 5:50:00 PM M1 Off
11/07/2017 6:05:00 PM M2 On
11/07/2017 9:15:00 PM M2 Off
11/07/2017 9:25:00 PM M2 On
I want to plot a linechart telling status of each machine at interval of every 5 minutes.
I tried this query:
mysearch
| timeslice 5m
| parse "machine=* " as machine
| parse "state=* " as state
| if(state="On",1,0) as State
| last(State) as StateChange by _timeslice,machine
| transpose row _timeslice column machine
But this just connects all dots as 1 and 0 and creates a seasaw kind of graph.
I want to display a square wave with states filled with last available state for each machine at interval of 5 minutes.
-
Official comment
Hi Rakesh - Currently the Sumo Logic service doesn't support step-line chart visualisations in the logging component of our service, however you may want to see whether the use case you're exploring can be addressed with our metrics capability (which does support step line graphs) or using another visualisation option.
Here's an example of a metrics visualisation using the step line chart.
I've also added an idea (LINK) for our Product Management team to add step line charts to our logging service. Please feel free to add your comments on how this would be useful to you and vote accordingly!
Comment actions
Please sign in to leave a comment.
Comments
1 comment