Splunk Search

How to add to search based on the token being set

amdosh
Explorer

I want to add a few rex statements to my existing search based on the token being set. Please see example below. 

ex:
| regex _raw="$token1$"
if($token2$){
| regex _raw!="abc"
| regex _raw!="xyz"
}

Please let me know if I can achieve this in some other way. Thanks!

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...