Splunk Search

Count the number of events in between a recurring event

myli12
Path Finder

I have an event "trans" occurs from time to time, I want to be able to count the number of another type of events (say "down") occur in between this recurring event "trans".

What I tried is

link OR down | transaction endswith="trans" | stats count

Which actually gives me counts of transactions, rather than number of "down" events in between "trans" events.

Tags (1)
0 Karma
1 Solution

David
Splunk Employee
Splunk Employee

The transaction command adds the eventcount field. I'd try:

link OR down | transaction endswith="trans" | stats avg(eventcount)

Or if you like:

link OR down | transaction endswith="trans" | table _time duration eventcount

View solution in original post

0 Karma

David
Splunk Employee
Splunk Employee

The transaction command adds the eventcount field. I'd try:

link OR down | transaction endswith="trans" | stats avg(eventcount)

Or if you like:

link OR down | transaction endswith="trans" | table _time duration eventcount
0 Karma
Get Updates on the Splunk Community!

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...