Splunk Search

How to create a Timechart that spans 1 week, starts from Monday 00:00

JacobWrdz
Explorer

Hello,

I couldn't find sufficient solution at documentation nor community.

I have to setup timechart, where span=1w, to start at particular day: Monday 00:00.

The query looks like this (I am sorry, I had to anonymity sensitive information):

index=XXX sourcetype= YYY
| eval Alrt_lvl = B_Lvl + Prio_diff
| timechart span=1w count(Alrt_lvl) by Alrt_lvl

Kindly please advise.

Labels (1)
Tags (1)
0 Karma
1 Solution

JacobWrdz
Explorer

@gcusello 

Your advise helped, but with a bit modification. Simple:
| timechart span=1w@w1
works.

Thank you!!!

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @JacobWrdz,

there's a workaround that should run but I never tested,  

index=XXX sourcetype= YYY
| eval Alrt_lvl = B_Lvl + Prio_diff, _time = relative_time(_time,"@w0")
| timechart span=1w count(Alrt_lvl) by Alrt_lvl

 Ciao.

Giuseppe

JacobWrdz
Explorer

@gcusello 

Your advise helped, but with a bit modification. Simple:
| timechart span=1w@w1
works.

Thank you!!!

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!

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...