Knowledge Management

Search Only Returning One Column

whod81
Explorer

Here is the search, putting results in a summary index.

sourcetype="SmtpPrevent_operational" dtime=*s | convert auto(dtime) | search dtime>=60 | sitimechart span=1h count(dtime>=60), count(dtime>=120), count(dtime>=180)

(longhand version)

sourcetype="SmtpPrevent_operational" dtime=*s | convert auto(dtime) | search dtime>=60 | sitimechart span=1h count(dtime>=60), count(dtime>=120), count(dtime>=180) | summaryindex spool=t uselb=t addtime=t index="dtime_plus_60" file="Summary Index DTime 60+,120+,180+ per Hour_1480261911.stash_new" name="Summary Index DTime 60+,120+,180+ per Hour" marker=""

Now here is what ends up being in the summary index:

10/18/2012 10:00:00, search_name="Summary Index DTime 60+,120+,180+ per Hour", search_now=1350576300.000, info_min_time=1350568800.000, info_max_time=1350572400.000, info_search_time=1350576324.840, psrsvd_gc=27, psrsvd_v=1
Tags (2)
0 Karma

Lucas_K
Motivator

If you just use a normal timechart command are you getting the expected results (3 groups) from your search?

Your summary index output seems to reflect only 1 count of results (no grouping!) being saved (as per your question).

edit: Actually, looking at your search I wouldn't have expected "count(dtime>=60), count(dtime>=120), count(dtime>=180)" to actually output anything.

So your original search needs to be fixed with something like this perhaps :

| eval dtime_group=case(dtime <= "60" , "less60", dtime >= "61" AND dtime <= "120", "lessthan120", dtime >="180", "lessthan180") | timechart count by dtime_group

0 Karma

whod81
Explorer

The non-si version of the search properly returns 3 columns.

sourcetype=\"SmtpPrevent_operational\" dtime=*s | convert auto(dtime) | search dtime>=60 | timechart span=1d count(eval(dtime>=60)) as 60+, count(eval(dtime>=120)) as 120+, count(eval(dtime>=180)) as 180+'

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...