Splunk Search

How to search average response + total application count for last 6 months with span of 1 month

ngaviran
New Member

I am trying to query and not able to get the output , only i am getting host names, Avg response , count , but need Span of 1 month also in the output .

below is the search queary where i expecting month on month column output also ...
sourcetype="ats_request" host!=dc* | stats avg(duration) as "Average App Response Time" count(sourcetype) as "Total Count" by host

Tags (1)
0 Karma

kmaron
Motivator

Try this

sourcetype="ats_request" host!=dc* 
| bucket _time span=1mon
| stats avg(duration) as "Average App Response Time" count(sourcetype) as "Total Count" by host _time
0 Karma

ngaviran
New Member

Thanks a lot, it works for me @kmaron

0 Karma

kmaron
Motivator

Since it worked for you please accept my answer so others know your question was answered.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...