Splunk Search

Getting count and averages in same search

richnavis
Contributor

Hi,

I think this must be easy.. but I can't wrap my head around how to get this done... I want to gather multiple stats for a single query. Essentially, I want to gather the count and avg thruput for webpages from my iis logs...Essentially, something like this..

Page1.html count=10, avgtime=20

Page2.html count=17, avgtime=30

Any suggestions?

Tags (3)
0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

if avgtime represents the average of some field like say response_time, and if Page1.html and Page2.html are a field called filename, then you're looking at a simple stats clause of

| stats count avg(response_time) by filename

View solution in original post

sideview
SplunkTrust
SplunkTrust

if avgtime represents the average of some field like say response_time, and if Page1.html and Page2.html are a field called filename, then you're looking at a simple stats clause of

| stats count avg(response_time) by filename

richnavis
Contributor

:)... Cannot believe that I couldn't see that.. Thanks nick!

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...