Getting Data In

DB Connect not parsing timestamp properly

adityapavan18
Contributor

Hi ir-respective of what timestamp is present in timestamp column of my Oracle DB, the timestamp in the event is replaced to "1970-01-01 00:59:59".

In oracle DB the timestamp column contains data like 2013-09-19T14:31:12

and the configuration in my inputs.conf is

    [dbmon-tail://SAMPLE/SPLUNK_USER.SAMPLEINPUT]
host = testhost
interval = * * * * *
output.format = kv
output.timestamp = 1
output.timestamp.column = PAYLOADDATE
output.timestamp.parse.format = yyyy-MM-dd HH:mm:ss
sourcetype = test_st
table = SPLUNK_USER.SAMPLEINPUT
tail.rising.column = PAYLOADDATE
index = default
query = SELECT * FROM SAMPLEINPUT {{WHERE $rising_column$ > ?}}
output.timestamp.format = yyyy-MM-dd HH:mm:ss

Note: PAYLOADDATE column is a varchar2 type

Can you please highlight what i am doing wrong?

0 Karma
1 Solution

lukejadamec
Super Champion

For your output and output parse formats, have you tried:

yyyy-MM-dd'T'HH:mm:ss

View solution in original post

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

what is the column type in your database? have you tried adding a SQL cast or convert to your SQL statement?

0 Karma

lukejadamec
Super Champion

For your output and output parse formats, have you tried:

yyyy-MM-dd'T'HH:mm:ss
0 Karma

lukejadamec
Super Champion

You're welcome.

0 Karma

lukejadamec
Super Champion

??? When you save the input configuration it should reset the connection and create log entries. If there are no errors, then you should see something like:
INFO:TailDatabaseMonitor - Database monitor - your input - finshed with status=true resultCount=xxx in duration=xxxxms
and
Scheduler - Execution of input= your db input finished in duration=xxx with resultCount=xxx success=true continuemonitoring=true.
But that means it is working.

0 Karma

adityapavan18
Contributor

My mistake i used only T changed it to 'T' its working now thnx

adityapavan18
Contributor

there are no errors in dbx logs

0 Karma

lukejadamec
Super Champion

What is the error in the dbx log?

0 Karma

adityapavan18
Contributor

then nothing gets indexed

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...