Splunk Search

Line graph by instance and time

danroberts
Explorer

Hello, 

I have the below Splunk search and I want to put the results into a line graph so I can compare all of the disk instances e.g. C, D , F over a period of time. 

The search that I am using is: 

index=windows_perfmon eventtype="perfmon_windows" Host="XXXX" object="LogicalDisk" counter="% Disk Write Time" instance="*" AND NOT instance=_Total AND NOT instance=Hard* | stats latest(Value) as Value by _time, instance | eval Value=round(Value, 2)

Any advise as I would like to create this in a line graph visualisation with the instances on different lines so you can do trend analysis on the Disk Write Time.  

The results I am getting are: 

_time instance value

2023-11-15 15:28:02C:2.83
2023-11-15 15:28:02D :0.01
2023-11-15 15:33:02C:4.10
2023-11-15 15:33:02😧0.01
2023-11-15 15:38:02C:2.59
2023-11-15 15:38:02😧0.01
2023-11-15 15:43:02C:1.98
2023-11-15 15:43:02😧0.01
2023-11-15 15:48:02C:2.81
2023-11-15 15:48:02😧0.01
2023-11-15 15:53:02C:2.51
2023-11-15 15:53:02😧0.01
Labels (3)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

Use timechart

index=windows_perfmon eventtype="perfmon_windows" Host="XXXX" object="LogicalDisk" counter="% Disk Write Time" instance="*" AND NOT instance=_Total AND NOT instance=Hard* 
| timechart latest(Value) as Value by instance 
| foreach * [ eval "<<FIELD>>"=round('<<FIELD>>', 2) ]

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

Use timechart

index=windows_perfmon eventtype="perfmon_windows" Host="XXXX" object="LogicalDisk" counter="% Disk Write Time" instance="*" AND NOT instance=_Total AND NOT instance=Hard* 
| timechart latest(Value) as Value by instance 
| foreach * [ eval "<<FIELD>>"=round('<<FIELD>>', 2) ]
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...