Splunk Search

timechart avg vs count

bowa
Path Finder

I would use the example on this page as the base for my question:

eventtype="CONTENT_EVENTS" | transaction accountNumber subscriberID maxspan=1m maxpause=30s | timechart span=1m avg(duration)

Averages are great ... but if there is a spike i would like to know the size of the sample the average was taken over.

So i would like to add to this timechart also the count of the number of transactions in that timeframe.

Anyone know if this is possible ?

Tags (1)
0 Karma
1 Solution

Ayn
Legend

The transaction command produces two fields, duration and eventcount. You could use eventcount in your chart to detect spikes, for instance by taking a sum of the total events within the timespan:

eventtype="CONTENT_EVENTS" | transaction accountNumber subscriberID maxspan=1m maxpause=30s | timechart span=1m avg(duration),sum(eventcount)

View solution in original post

Ayn
Legend

The transaction command produces two fields, duration and eventcount. You could use eventcount in your chart to detect spikes, for instance by taking a sum of the total events within the timespan:

eventtype="CONTENT_EVENTS" | transaction accountNumber subscriberID maxspan=1m maxpause=30s | timechart span=1m avg(duration),sum(eventcount)

bowa
Path Finder

Thanks a lot ! exactly what i needed

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...