Splunk Search

both stats and timechart gives different values

splunkuseradmin
Path Finder

Hi all
I was wondering if i can get some help in this. as I have some fields in stats and i want span=1w of that.
when I use ....|timechart sapn=1w give me different values than in stats.
I juss want those stats values to be shown by week.

thanks

Tags (1)
0 Karma

arjunpkishore5
Motivator

For binning stats, do this

|bucket span=1w _time
|stats your_aggregations by _time, your_grouping_fields

0 Karma

kmaron
Motivator

you can add a 1 week span to your stats like this

| bucket _time span=1w

and then add _time to the by callMediaType for your stats command.

also, your stats has a by callMediaType but you did not include that in your timechart. This in and of itself would make the results different. Is that on purpose?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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