Getting Data In

How do I control the trace line _time field

avitallange
Explorer

I have a log file with traces of the format:
[source name] [level] [id]: [Time] [trace message]

Splunk auto identifies the _time field and indexes my trace log according to it.

The problem is that this time is a UTC representation and Splunk identifies it as some other timezone. (my user timezone is configured to GMT)

Example:
The original trace line:
TestTraceSource Information: 0 : Time: 08/29/2013 10:16:52, message . . .

Is indexed as:
_time: 08/29/2013 07:16:52


Trace: TestTraceSource Information: 0 : Time: 08/29/2013 10:16:52, message . . .

Regards,
Avital

Tags (3)
0 Karma
1 Solution

kristian_kolb
Ultra Champion

_time is normally the parsed timestamp from a message, and it is adjusted for timezone.

If for some reason Splunk has got the wrong timezone set for a particular input, this can be corrected/specified in props.conf

[spec]
TZ = UTC

will instruct splunk to treat events of type spec as being in the UTC timezone. spec can be one of either sourcetype, source::your_source_name or host::your_host.

See the following docs for more info;

http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Aboutconfigurationfiles

/K

View solution in original post

kristian_kolb
Ultra Champion

_time is normally the parsed timestamp from a message, and it is adjusted for timezone.

If for some reason Splunk has got the wrong timezone set for a particular input, this can be corrected/specified in props.conf

[spec]
TZ = UTC

will instruct splunk to treat events of type spec as being in the UTC timezone. spec can be one of either sourcetype, source::your_source_name or host::your_host.

See the following docs for more info;

http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Propsconf
http://docs.splunk.com/Documentation/Splunk/latest/Admin/Aboutconfigurationfiles

/K

Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...