Dashboards & Visualizations

Too much annotations

wbolten
Path Finder

Hi,
I have created a bar chart that shows in my case example data on the CPU usage of a device with two overlays for inbound and outbound traffic.
alt text

When a certain combination of values is exceeded I want to place an annotation to highlight this. As shown in this example.
alt text

What I cannot seem to get rid off are the orange annotations that seem to be placed when the condition is not matched.

The search is as follows. In this I am evaluating and updating the label and the category.

<search type="annotation">
<query>index="bla" 
| timechart span=1m avg(inPercentUtil) as inPercentUtil avg(Percent_CPULoad) as Percent_CPULoad 
| eval critical=if(inPercentUtil>65 AND Percent_CPULoad>90,"Yes","No")
| eval annotation_category=case(critical="Yes","Critical")
| eval annotation_label=case(critical="Yes","Insert_Message")
 </query>

What should I do to stop the orange markers from showing? I don't even specify a color for the annotations.

<option name="charting.annotation.categoryColors">{"Critical":"0xe60000"}</option>
0 Karma
1 Solution

wbolten
Path Finder

Right, been staring at this for ages but it seems to be solved.

It was suggested to only select the moments to place the annotation from the search rather then look for them from the result.

Changed the annotation query to

index="bla" | search inPercentUtil>65 AND Percent_CPULoad>90
| eval annotation_category="Critical"
| eval annotation_label="Insert_Message"

Now it is working.

View solution in original post

0 Karma

wbolten
Path Finder

Right, been staring at this for ages but it seems to be solved.

It was suggested to only select the moments to place the annotation from the search rather then look for them from the result.

Changed the annotation query to

index="bla" | search inPercentUtil>65 AND Percent_CPULoad>90
| eval annotation_category="Critical"
| eval annotation_label="Insert_Message"

Now it is working.

0 Karma

nickhills
Ultra Champion

Great news!

I have converted your comment to an answer. Please accept it so others can see how you resolved your issue.

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

wbolten
Path Finder

Thank you, I have done so.

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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