Splunk Search

How do I use an If statement to set rangemap in Splunk?

karthi2809
Builder

how do I set if condition if the "failurepercentage" is greater than 10 as amber and greater than 20 should be severe.

eval failureStatus=if(failurePercentage < 10,"25",(if(failurePercentage>=3 AND failurePercentage<=10,"15","5"))) |rangemap field=failureStatus Low=0-10 Amber=11-20 Severe=21-30

Tags (2)
0 Karma

harsmarvania57
Ultra Champion

Hi

It looks like you used field=failureStatus instead of field=failurePercentage in rangemap.

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...