Splunk Search

I would like to use field value * as regex to match all values in my search

TMazurek
New Member

Hello,

I have dashboard with drop-down button. Token for button is named Area. Values are:
Name - Value:
All Areas - All
Business Critical - Critical
Public - Public
Internal - Internal

I have following query:

index=main sourcetype=source1 | rename Computer.SWArea as SWArea | eval variable=case("$Area$" == "All","*","$Area$" == "Critical","Critical","$Area$" == "Public","Public","$Area$" == "Internal","Internal") | search SWArea=variable |

The problem I faced is that when I choose All on my drop-down button it matches 0 events instead of all. The issue is that despite new field variable contains * this doesnt match as any in search section. Any ideas why ?

0 Karma
1 Solution

sundareshr
Legend

Change the value for All Areas to *. Like this

Name - Value:
All Areas - *
Business Critical - Critical
Public - Public
Internal - Internal

And you search to

index=main sourcetype=source1 Computer.SWArea="$Area$

View solution in original post

0 Karma

sundareshr
Legend

Change the value for All Areas to *. Like this

Name - Value:
All Areas - *
Business Critical - Critical
Public - Public
Internal - Internal

And you search to

index=main sourcetype=source1 Computer.SWArea="$Area$
0 Karma
Get Updates on the Splunk Community!

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

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...