Deployment Architecture

timechart span not working

zachsisinst
Explorer
index="myindex" cluster="mycluster" http_request="/"
| bucket _time span=5m
| timechart count by x_forwarded_for useother=false span=5m

the time buckets i'm seeing on this |timechart are half hour buckets instead of 5m buckets. What am I doing wrong?

0 Karma

efavreau
Motivator

@zachsisinst I don't think you need line two, because the timechart command takes care of that for you.

###

If this reply helps you, an upvote would be appreciated.
0 Karma

MuS
Legend

Hi zachsisinst,

timechart seams to be very picky about the location of the span option, try this:

 | timechart span=5m count by x_forwarded_for useother=false 

Hope this helps ...

cheers, MuS

UPDATE:

it is right here https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/timechart

timechart [sep=<string>] [format=<string>] [partial=<bool>] [cont=<bool>] [limit=<int>]
[agg=<stats-agg-term>] [<bin-options>... ]
( (<single-agg> [BY <split-by-clause>] ) | (<eval-expression>) BY <split-by-clause> )
[<dedup_splitvals>]

That said the span= or bin option needs to be on the left side of the by split clause 🙂

cheers, MuS

MuS
Legend

See the updated post

cheers, MuS

Get Updates on the Splunk Community!

Splunk Platform | Upgrading your Splunk Deployment to Python 3.9

Splunk initially announced the removal of Python 2 during the release of Splunk Enterprise 8.0.0, aiming to ...

From Product Design to User Insights: Boosting App Developer Identity on Splunkbase

co-authored by Yiyun Zhu & Dan Hosaka Engaging with the Community at .conf24 At .conf24, we revitalized the ...

Detect and Resolve Issues in a Kubernetes Environment

We’ve gone through common problems one can encounter in a Kubernetes environment, their impacts, and the ...