Splunk Search

help for displaying events that have collected in one index but never in other

jip31
Motivator

hi
I tried to find host from my csv file which have connected in one specific index but never in others
I have done the search below but its what i need because it just exclude events from others indexes
how to do this please??

 index="tutu*" 
| search NOT (index="toto*" OR index="tata*" OR index="titi*") 
    [| inputlookup host.csv 
    | table host] 
| dedup host 
| table host
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi jip31,
try something like this:

(index="tutu*" OR index="toto*" OR index="tata*" OR index="titi*") [| inputlookup host.csv | table host] 
| stats values(index) AS index count BY host
| eval check=if(index="tutu*","only toto","also others")
| search check="only toto"
| table host

Ciao.
Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi jip31,
try something like this:

(index="tutu*" OR index="toto*" OR index="tata*" OR index="titi*") [| inputlookup host.csv | table host] 
| stats values(index) AS index count BY host
| eval check=if(index="tutu*","only toto","also others")
| search check="only toto"
| table host

Ciao.
Giuseppe

0 Karma

jip31
Motivator

perfect thanks

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...