Splunk Search

How do you use an aggregated value as a filter?

ygaluzo
New Member

Hello,

I need to use an aggregated value as a filter.

The search returns multiple rows, and I need only those with count > 30.

index=*production*  ERROR AND NOT DEBUG | eval svc=mvindex(split(index,"-"),4) | eventstats count as TOTAL_COUNT | stats latest(TOTAL_COUNT) as TC count by svc

Please kept.

Thank you

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@ygaluzo

Can you please try this?

index=*production* ERROR AND NOT DEBUG 
| eval svc=mvindex(split(index,"-"),4) 
| stats count as TC count by svc  | where TC > 30
0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...