Splunk Search

Negate the field containing both the values in SPLUNK query

Janani_Krish
Path Finder

Hi,

I have written following query where a field consisting of 2 actions as below,

Query:
sourcetype="my_sourcetype" session_id="1011" |eval indicator=mvappend(src,dest)|mvexpand indicator|stats count values(action) by indicator,session_id

Result:

indicatorsession_idcountvalue(action)
23.45.6.7810112allowed
teared
23.45.6.7910452allowed

 

Now I want to negate the field which contain both allowed and teared. Please suggest any ideas.

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Like this, maybe?

sourcetype="my_sourcetype" session_id="1011" 
| eval indicator=mvappend(src,dest)
| mvexpand indicator
| stats count values(action) as actions by indicator,session_id
| where (isnull(mvfind(actions,"allowed")) AND isnull(mvfind(actions,"teared")))
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Customer Experience | Splunk 2024: New Onboarding Resources

In 2023, we were routinely reminded that the digital world is ever-evolving and susceptible to new ...

Celebrate CX Day with Splunk: Take our interactive quiz, join our LinkedIn Live ...

Today and every day, Splunk celebrates the importance of customer experience throughout our product, ...

How to Get Started with Splunk Data Management Pipeline Builders (Edge Processor & ...

If you want to gain full control over your growing data volumes, check out Splunk’s Data Management pipeline ...