Splunk Search

Unusual date parsing.

dcollette
New Member

Is it possible to have splunk parse the following date format? Year-Day-Hour_minute_Second

i.e. 2008-265-03:19:26 would be 2008/09/22 at 3:19:26.

What I want to do is make graphs based on the time in my data, and not based on the timestamp of my log files. Right now the time field is extracted but I don't know how to work with it.

Tags (1)
0 Karma

lukejadamec
Super Champion

If you are talking about a field in your data that you want to use as a timestamp for charts, then you do Not want to use props.conf. This document will tell you how to deal with time manipulation in a search:

http://docs.splunk.com/Documentation/Splunk/6.0.1/SearchReference/convert

From the sounds of it, you want to use mktime.

0 Karma

Leo
Splunk Employee
Splunk Employee

Also if your timestamp doesn't start from the very beginning of the line, you need to provide the TIME_PREFIX property, which is a regex for everything that precedes the timestamp.

0 Karma

MaverickT
Communicator

Ofcourse, this is the timeformat you should use for extraction:

%Y-%j-%H:%M:%S

MaverickT
Communicator

I haven't used it in production but it works in Data prewiev wizard. Did you try with it? Maybe try playing with MAX_TIMESTAMP_LOOKAHEAD setting (set it to 17)?

0 Karma

dcollette
New Member

I put the following into a props.config file.

[source::"nameoffile"]
TIME_FORMAT = %Y-%j-%H:%M:%S

It is still resolving to the default file timestamp. Any ideas?

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...