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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...