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!

Announcing Scheduled Export GA for Dashboard Studio

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

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...