Splunk Search

Unexplained: Inconsistent/incomplete transaction eventcount when using maxevents with startswith

collinrice
Explorer

I am getting an inconsistent number of events in a transaction, relative to the value specified for maxevents=x:

| transaction ComputerName startswith=(EventCode=1100) maxevents=x

Here are the eventcounts for each ComputerName where x=[10, 20, 30, 40], and maxevents undefined (i.e. not included in the SPL).:

________________ x = 10_____20_____30_____40__Undefined
Computer1, txn A......3......3.....13.....23.....423
Computer1, txn B......5......5......5.....25.....705
Computer2.............5.....15.....15.....15.....855
Computer3.............6......6.....26.....26.....986
Computer4............10.....20.....30.....20.....100
Computer5, txn A......4.....14.....14.....14.....134
Computer5, txn B......6.....16.....16.....36.....836

Using maxspan and not maxevents consistently produces the expected results (verified by comparing the transaction'ed events to the list of raw events).

QUESTIONS: All computer have more than ten events that could be included in a transaction that starts with EventCode=1100, so why are there less than 10 events included in the transaction when maxevents=10? Shouldn't the transaction include (i.e. eventcount) up to then maxevent value when possible?

Why does the eventcount jump up inconsistently when maxevents is changed to different values?

Why does the eventcount for Computer4 actually decrease from 30 to 20 when maxevents is increased to 40?

0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...