Splunk Search

how to calculate fields total size and size used to get %used

nathanluke86
Communicator

I have two fields total_size and size_used

How can I calculate %used and output as a new field %used

TIA

0 Karma
1 Solution

nickhills
Ultra Champion

Hi @nathanluke86

Try this:
<your search>|eval used_perc=round((total_used/total_size)*100,2)

If my comment helps, please give it a thumbs up!

View solution in original post

nickhills
Ultra Champion

Hi @nathanluke86

Try this:
<your search>|eval used_perc=round((total_used/total_size)*100,2)

If my comment helps, please give it a thumbs up!

nathanluke86
Communicator

Great Thanks

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...