Splunk Search

Calculate a % based on two Windows Perfmon Counters

chrismor
Explorer

I am trying to calculate the percentage usage of disk from an application based on it's perfmon counters. Unfortunately it doesn't give me this value as a counter. I have "Data File Size" and "Data File Space Used". But as a newbie, how to do take the Value fields into something I can use?

Thanks!

Tags (1)
0 Karma

cphair
Builder

I can't tell from the counter names what the difference is between them, so my formula may be off, but I got something like the following to work:

index=perfmon counter="Data File Size" | stats avg(Value) as Avg1 by host | join host [search index=perfmon counter="Data File Space Used" | stats avg(Value) as Avg2 by host] | eval Ratio=Avg1/Avg2 | fields host,Ratio

I feel like there should be a solution that doesn't run a join, but if your data isn't too extensive this might work. Let me know if that helps.

http://docs.splunk.com/Documentation/Splunk/4.3.1/SearchReference/Eval

Get Updates on the Splunk Community!

Streamline Data Ingestion With Deployment Server Essentials

REGISTER NOW!Every day the list of sources Admins are responsible for gets bigger and bigger, often making the ...

Remediate Threats Faster and Simplify Investigations With Splunk Enterprise Security ...

REGISTER NOW!Join us for a Tech Talk around our latest release of Splunk Enterprise Security 7.2! We’ll walk ...

Introduction to Splunk AI

WATCH NOWHow are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. ...