Splunk Search

timechart for a time described in log file

linu1988
Champion

Hello,
i would like to know how can i draw a timechart using the log timestamps instead of the event timeStamp.

e.g. my log contains the list of events having its own timestamp. while monitoring the folder it will come in bulk which is not suitable for the timechart.

Any help or insight to the solution is much appreciated. Thank you all.

Tags (3)
0 Karma

Lucas_K
Motivator

You can also do it on the fly by reassigning the _time field to any other extracted or evaled time field. But it would be best to fix your original time stamps unless they are already used for something else.

0 Karma

Lucas_K
Motivator

Extract your time field (rex it or however) and then eval it to the _time value.

ie. eval _time=new_time_field

That is all there is to it. You may also need to play with the actual value if it is not in a time format that splunk natively understands.

Reassignment of the _time value is also how you can fold time series together. An example of this might be comparing last weeks events to this weeks events all on a single overlaping timechart (answers example here : http://splunk-base.splunk.com/answers/2712/line-chart-comparing-yesterdays-result-with-todays-result... )

0 Karma

linu1988
Champion

I could find the ways to extract the time-stamp fields/transform. But i am unable to think how do i assign it to actual event timings? Then use them to draw charts. Need assistance..

0 Karma

Ayn
Legend
0 Karma

linu1988
Champion

Any hint how can i achieve that?

0 Karma

Ayn
Legend

The best thing would probably be to configure your timestamp recognition so that the event's timestamp IS the log's timestamp.

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...