Splunk Search

Outer query should display the results based on the inner query count

sravankaripe
Communicator

i want to display the events based on subquery's count(say Mycount) .
please help me with search query.

index=abc sourcetype=xyz [search index=pqr sourcetype=pqrs | return 100 $ID|eventstats count as MyCount]
| where MyCount>0

0 Karma
1 Solution

somesoni2
Revered Legend

Something like this??

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count as query]>0

View solution in original post

0 Karma

somesoni2
Revered Legend

Something like this??

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count as query]>0
0 Karma

sravankaripe
Communicator

index=abc sourcetype=xyz | where [search index=pqr sourcetype=pqrs | return 100 $ID | stats count|return 1 $count]>0

its working like this

0 Karma
Get Updates on the Splunk Community!

.conf23 Registration is Now Open!

Time to toss the .conf-etti 🎉 —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...

Don't wait! Accept the Mission Possible: Splunk Adoption Challenge Now and Win ...

Attention everyone! We have exciting news to share! We are recruiting new members for the Mission Possible: ...

Unify Your SecOps with Splunk Mission Control

In today’s post, I'm excited to share some recent Splunk Mission Control innovations. With Splunk Mission ...