Getting Data In

Calculating bandwidth usage of Windows machines using WMI and Splunk

nk-1
Path Finder

In C:\Program Files\SplunkUniversalForwarder\etc\apps\Splunk_TA_windows\local\inputs.conf:

[perfmon://Network Interface]
counters = Bytes Received/sec;Bytes Sent/sec
instances = *
interval = 10
object = Network Interface
index = wmi

SplunkWeb Query:

earliest=-1d host=MyHost sourcetype="Perfmon:Network Interface" | eval MB_Usage=10*Value/1024/1024| timechart span=1h sum(MB_Usage)

(multiplying by 10 because interval=10 and WMI metric is Bytes/sec?)

Would that give me MB Usage by hour for the given host?

0 Karma

DalJeanis
Legend

Seems reasonable. I'd verify by doing something like this, and checking for reasonableness and number of events ...

earliest=-1d@d+600m latest=-1d@d+610m 
host=MyHost sourcetype="Perfmon:Network Interface" 
| eval MB_Usage=10*Value/1024/1024

You could also do this...

earliest=-1d host=MyHost sourcetype="Perfmon:Network Interface" 
| eval MB_Usage=3600*Value/1024/1024 
| timechart span=1h avg(MB_Usage)

If the value number is per second, then 3600 times that value number is the data per hour at that moment, and the average of those will approximate the total amount that particular hour.

0 Karma
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...