Splunk Search

How to generate a line chart for disk space by server and hard drive?

jsndvl11
New Member

I'm new to Splunk and need some help with a chart for disk space usage. I'm getting the data already in Splunk Light and would like to do a line chart that displays ALL servers and ALL drives in the same chart.

Thanks for your help.

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Depends upon what you want to plot as x-axis value and what as series, try something like this (check the sourcetype name is correct or not)

host on x-axis, and one line for each drive

index=foo sourcetype="Perfmon:Logical Disk" 
| chart avg(Value) over host by instance limit=0

drive on x-axis, and one line for each host

index=foo sourcetype="Perfmon:Logical Disk" 
| chart avg(Value) over instance by host limit=0 | rename instance as drive

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Depends upon what you want to plot as x-axis value and what as series, try something like this (check the sourcetype name is correct or not)

host on x-axis, and one line for each drive

index=foo sourcetype="Perfmon:Logical Disk" 
| chart avg(Value) over host by instance limit=0

drive on x-axis, and one line for each host

index=foo sourcetype="Perfmon:Logical Disk" 
| chart avg(Value) over instance by host limit=0 | rename instance as drive

jsndvl11
New Member

Thanks for your help. This is what I was looking for.

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Sample events please.

DalJeanis
SplunkTrust
SplunkTrust

yes, please post what you have (code and a sample event) so we can be of most help.

0 Karma

jsndvl11
New Member

Regular events from perfmon for example:

collection="Free Disk Space"
object=LogicalDisk
counter="% Free Space"
instance=C:
Value=30.601598715187794
host = server1

collection="Free Disk Space"
object=LogicalDisk
counter="% Free Space"
instance=C:
Value=63.5187794
host = server2

server1 has 3 drive letters C:, E:, F:.
server 2 has 1 drive letter C:
server 3 has 3 drive letters C:, D:, E:

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...