Splunk Search

Calculate average number of calls by user

msarro
Builder

Here is our situation, we handle calls. Every call generates a record. We would like to find out, over the span of 1 month, what the average number of calls every customer makes. Logically you'd figure out the number of calls made by each customer every day for a month, and find the average. Then you'd find the average from each of the 30 days. I haven't been able to wrap my mind around a way to do this with splunk.

Any ideas on how to do this? I'd appreciate the help. Thanks!

Tags (1)
0 Karma

jonuwz
Influencer
search that returns customer and call data
| bin _time span=1d
| stats count as calls by _time,customer

Now you have the number of calls per customer per day

The key thing is bin - this massages the times to the closest day

Add the following for average calls / day per customer :

| eventstats avg(calls) as avg_calls by customer 

or if you don't need so much detail :

| stats avg(calls) as avg_calls by customer
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, ...