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!

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 ...