Alerting

Range map is not working properly in Splunk 6.5.3

ashikuma
Explorer

Range map is not working properly in Splunk 6.5.3. Below is my search query, When value is above 90 then it says green color which is correct, and when value is below 90 then other two defined (elevated & severe) are not working, if its (health field) range is between the two values then it's color getting merged, like green color is default there and when red color should come then it's getting merged and color showing is black

my search|rangemap field=Health low=90-100 elevated=70-89 severe=0-69

please do needful, is this due to decimal values which is coming for health field?
I tried to remove decimal values and kept above same range but still didn't work.

Tags (1)
0 Karma

niketn
Legend

@ashikuma can you try the following?
Set specific value for | eval Health= as per your use case. Currently it calculates a random percent with two digits precision.

| makeresults
| fields - _time
| eval Health=round((random()/random())*100,2), Health=case(Health>100,100,Health<0,0,isnull(Health),0,true(),Health)
| rangemap field=Health low=90-100 elevated=70-89.99 severe=0-69.99 default=severe

What is the reason for rangemap? If you are looking for Single value coloring with rangemap, you should better use UI Edit > Format Visualization> Color> Use Color> Color By Value option. Refer to documentation: https://docs.splunk.com/Documentation/Splunk/latest/Viz/SingleValueFormatting#Migration_for_rangemap...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...