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!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...