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!

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

Observability Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestSplunk APM's New Tag Filter ExperienceSplunk APM has updated ...

Security Newsletter Updates | March 2023

 March 2023 | Check out the latest and greatestUnify Your Security Operations with Splunk Mission Control The ...