Splunk Search

Search with like / only when more than one value

banzen
Engager

Hi,
I have troubles with a search. I want results ONLY when my "disconnected=" has a value besides blov6 berg

Unfiltered result:
Disconnected="[blov6 berg ] [dj7 berger]",

I would want to know about this..

Could look like this too

Disconnected="[blov6 berg ] [ejb7 rger] [rf34 reef]", 
Disconnected="[blov6 berg ] [dj7 berger] [l42 loop][ddd door]"

Would also want to know....

This I don't care about

Disconnected="[blov6 berg ]"

Here's what I am trying in my search

host=*  Disconnected | where disconnected !=""  | where NOT like(_raw, "%blov6%")

Suggestions?

Tags (1)
0 Karma

micahkemp
Champion

Try something like:

 host=* Disconnected Disconnected!="[blov6 berg ]"

Edit: do you need a partial match to be ignored as well?

Try this:

| rex field=Disconnected max_match=0 "\[(?<bracketed_value>[^\]]+)\]"
| search NOT bracketed_value="blov6 berg "
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...