Feedback
Got feedback? We want it! Submit your comments and suggestions for our community here.

show percentage

ELADMIN
Explorer

Hi, I would like to fix this alert to show the results in the value columm as a double digit percentage and have the percent sign after the number. for example  27%.  Thank you in advance for your help. 

MY SPL

index=perfmon object=Memory "% Committed Bytes In Use"
| where Value < 25
| table _time, host, Value, date
| dedup host

 

My Result. 

ELADMIN_0-1702390069307.png

 

0 Karma
1 Solution

dtburrows3
Builder

Performing this eval anytime after the where clause should do it.

index=perfmon object=Memory "% Committed Bytes In Use"
    | where Value < 25
    | table _time, host, Value, date
    | dedup host
    | eval Value=round(Value, 0)."%"



View solution in original post

dtburrows3
Builder

Performing this eval anytime after the where clause should do it.

index=perfmon object=Memory "% Committed Bytes In Use"
    | where Value < 25
    | table _time, host, Value, date
    | dedup host
    | eval Value=round(Value, 0)."%"



ELADMIN
Explorer

Yes, that works. thank you dtburrows3.

0 Karma
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...