All Apps and Add-ons

Use two indexes in one search

numeroinconnu12
Path Finder

Good morning everyone,

This is my first search:

index=test_vpn toto_VPN_Role="AU_GUE_WEB"
|collecte eval=if(action = success, "No", "Yes") | table toto_VPN_Role collecte

and my second research:

index="app_gue"
|eval collecte=if(tag = success, "No", "Yes") | table index collecte

I would like to combine the two researches into one, is that possible?

thanks,

0 Karma
1 Solution

numeroinconnu12
Path Finder

Hello,
The best syntax it's:

index=test_vpn OR index=app_gue toto_VPN_Role="AU_GUE_WEB"

View solution in original post

0 Karma

numeroinconnu12
Path Finder

Hello,
The best syntax it's:

index=test_vpn OR index=app_gue toto_VPN_Role="AU_GUE_WEB"
0 Karma

numeroinconnu12
Path Finder

Hello,

It works, but I only get the events from the app_gue index but not the events of toto_vpn index .

0 Karma

vnravikumar
Champion

Hi

Try this

(index=test_vpn toto_VPN_Role="AU_GUE_WEB") OR (index="app_gue") 
| eval collecte =if((action == "success") OR (tag == "success"), "No", "Yes")
| table toto_VPN_Role index collecte
0 Karma

numeroinconnu12
Path Finder

Hello @vnravikumar

It works, but I only get the events from the app_gue index but not the events of toto_vpn index .

0 Karma

vnravikumar
Champion

its toto_vpn or test_vpn?

0 Karma

numeroinconnu12
Path Finder

sorry, it's test_vpn.

0 Karma

vnravikumar
Champion

Please check that index is having data for the selected time range.

0 Karma

numeroinconnu12
Path Finder

For the same time range, this search works:
index=test_vpn toto_VPN_Role="AU_GUE_WEB"
|collecte eval=if(action = success, "No", "Yes") | table toto_VPN_Role collecte

0 Karma

vnravikumar
Champion

check this |collecte eval=if(action = success, "No", "Yes") or | eval collecte =if(action = success, "No", "Yes")

0 Karma

numeroinconnu12
Path Finder

it's :

| eval collecte =if(action = success, "No", "Yes") 
0 Karma

vnravikumar
Champion

(index=test_vpn toto_VPN_Role="AU_GUE_WEB") OR (index="app_gue")
| eval collecte =if((action == "success") OR (tag == "success"), "No", "Yes")

0 Karma

numeroinconnu12
Path Finder

it's the same, not event of : (index=test_vpn toto_VPN_Role="AU_GUE_WEB")

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...