Splunk Search

Timechart /Timewrap - change in the x axis

Veeruswathi
Explorer

Hi all,

I am using the timechart graph to represent number of apples every week over last 28 days and compare it to previous other weeks using timewrap command , The problem here is i see that the latest dates and weekdays (Eg:Sun Jun 10) are visible on xaxis. Is there any possiblity that i get on week days (Eg: Sun) instead of date??

Any help on this would be much appreciated.

Thanks,
Swathi

niketn
Legend

@Veeruswathi, you can try the following run anywhere search.

index=_internal sourcetype=splunkd log_level!=INFO earliest=-28d@d latest=now
| timechart span=1d count as ERROR
| timewrap 1w
| eval Time=strftime(_time,"%a")
| field - _*
| table Time *

_time field is removed and retained columns are Time (as first column) followed by other fields created by timechart followed by timewrap commands.

alt text

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

Sukisen1981
Champion

something like this?index="_audit" | timechart count | eval time=strftime(_time, "%a") | fields time,count | fields - _time

I am not clear on your requirements but use this code as it is(sine this runs on the default _audit index it will give an output for you as well), the x axis will come only as day names. I do not understand however how just having the day names help you in this case, however that is your use case

0 Karma

Veeruswathi
Explorer

Any help on this would be much appreciated

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...