Getting Data In

Splunk doesn't recognize timestamp properly when importing data from DB

ArsenyKapralov
Path Finder

Hi

I'm importing simple events from Oracle table. I don't have specific field with timestamp in database table and while I'm trying to import data I have a GMT time in the timestamp except GMT+4 as my (and server) timezone should be.

I tried to fix this with such code in props.conf in etc/system/local but didn't succeed:

[sourcetype_name]
TZ=Europe/Moscow

How can I fix this and make correct timestamps?

0 Karma

pmdba
Builder

If your database is on the correct time zone and you haven't figured out any other way to get Splunk to adjust, I'd recommend adding the timestamp to your SQL query, based on sysdate, so that it comes into Splunk with the proper local timezone adjustment:

select to_char(sysdate,'DD-MM-YYYY HH24:MI:SS') "time", ... 
0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...