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!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...