Splunk Search

NOT like multiple values

rizwan0683
Path Finder

Looking to exclude certain values for field instance. How can I achieve this?
Propose code (not working)

index=abc sourcetype=xyz IncomingMessage
| rex field=source "/apps/prod/(?<instance>.*)/logs"   
| where NOT LIKE instance IN ("foo", "bar") 
Labels (2)
0 Karma
1 Solution

rizwan0683
Path Finder

thanks, this works
| where NOT LIKE(instance, "%foo%") AND NOT LIKE(instance, "%bar%")

View solution in original post

rizwan0683
Path Finder

thanks, this works
| where NOT LIKE(instance, "%foo%") AND NOT LIKE(instance, "%bar%")

to4kawa
Ultra Champion

I see, accept your answers.

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...