Splunk Search

Why is the count field in this search not being written?

DerekKing
Path Finder

Hi,

I'm trying to collect the number of emails with the same subject line into a summary index. Problem is, whilst my search appears to work, the count field is not written. Could anyone tell me where i'm going wrong please ?

Search is
eventtype="cisco_esa" | transaction maxspan=10s maxpause=10s mid icid dcid | search direction=inbound | timechart span=1m limit=1 count by Subject usenull=f useother=f | collect index=summary-idx

All I get is the Subject field (plus the other stuff splunk puts in).

Any help appreciated
Thanks
Derek

0 Karma

linu1988
Champion

Then use stats rather than timechart..

eventtype="cisco_esa" | transaction maxspan=10s maxpause=10s mid icid dcid | search direction=inbound |bucket _time span=1m| stats count by _time,Subject 

DerekKing
Path Finder

Its the count column i'm trying to get.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You don't actually get a column called "count" though, so no field "count" is going to appear in the summary index.

0 Karma

DerekKing
Path Finder

Yes - I get a table format, with time & subject as columns, and the count in each row.

0 Karma

linu1988
Champion

before you go for the collection,do you get any result with the sample search?

eventtype="cisco_esa" | transaction maxspan=10s maxpause=10s mid icid dcid | search direction=inbound | timechart span=1m limit=1 count by Subject usenull=f useother=f

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

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