Splunk Search

Negate the field containing both the values in SPLUNK query

Path Finder


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

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




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

Labels (1)
Tags (1)
0 Karma


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!

Splunk Forwarders and Forced Time Based Load Balancing

Splunk customers use universal forwarders to collect and send data to Splunk. A universal forwarder can send ...

NEW! Log Views in Splunk Observability Dashboards Gives Context From a Single Page

Today, Splunk Observability releases log views, a new feature for users to add their logs data from Splunk Log ...

Last Chance to Submit Your Paper For BSides Splunk - Deadline is August 12th!

Hello everyone! Don't wait to submit - The deadline is August 12th! We have truly missed the community so ...