Splunk Search

How to use the field in search query EXTRACTED using REX command

rangineniarunku
Explorer

I have a field named "content" with multiple values to it as follows
content=value.deva
content=value.devb
" =value.devc ......
I have written a rex expression in my search query .........| rex field=Name ".(?.*)" to extract the Environment from the field content . Now I want to get the values in my result only for Environment=deva, how can I use the field Environment in my query?
I tried this way but it did not work ".........| rex field=content ".(?.)" | Environment=deva "

Can someone help me with this?

Tags (2)
0 Karma
1 Solution

DalJeanis
SplunkTrust
SplunkTrust

You are looking for the | where command.

| where Environment="myvalue" 

View solution in original post

DalJeanis
SplunkTrust
SplunkTrust

You are looking for the | where command.

| where Environment="myvalue" 

rangineniarunku
Explorer

It worked!!!

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