Splunk Search

How to plot a line graph to display state change of machines based on timestamp?

rakes568
Explorer

We have a list of machines in our system with their state change as On or Off along with timestamp.

2017-07-11 12:39:01 M1  Up
2017-07-11 12:25:39 M2  Down
2017-07-11 10:58:27 M1  Down
2017-07-11 10:44:32 M3  Down
2017-07-11 10:27:33 M3  Up
2017-07-11 09:47:52 M3  Down

Is there a way to plot a line graph of state change for all machines based on their timestamp?
I tried following query using timechart, but it displays dotted values with 0 and 1, instead of a continuous linechart.

mysearch| eval State=if(state="Up",1,0) | timechart span=5m max(State) by machine
0 Karma
1 Solution

s2_splunk
Splunk Employee
Splunk Employee

Here's a screenshotalt text

View solution in original post

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

Here's a screenshotalt text

0 Karma

s2_splunk
Splunk Employee
Splunk Employee

You can specify the formatting options for the line chart in the UI such that the dots are connected for missing values, have you tried that?

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...