Getting Data In

Error while searching using the value from the input

quintessence
New Member

I have the following dynamic options for my "consumer" multiselect:

index=$index$ |  fillnull value="not specified" "header" | dedup "header" | table "header" | rename "header" as "consumer"

And something like this for my chart where I'm trying to filter the data by the value from multiselect:

index=$index$ |  fillnull value="not specified" "header" | stats  count by  "header" | search "header"=$consumer$

The problem is when I'm trying to show data only for "not specified" consumers - it can't find anything.
The query is working if I change $consumer$ to "not specified", so the problem is in $consumer$.
Any advices?

0 Karma

somesoni2
Revered Legend

Try to add the filter before the stats and add quotes around the token (as it has spaces in the value)

index=$index$ |  fillnull value="not specified" "header"  | search "header"="$consumer$" | stats  count by  "header"

If it doesn't work, please share your multiselect xml.

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...