Monitoring Splunk

DBX TailDatabaseMonitor Error

domgkc
Explorer

I am receiving an error in the DB Connect application.
Was having issues with the timestamping and event breaking.
The database is Oracle, the DB Info section shows the timestamp field as a "DATE" object but only extracts the epoch value of the Date and not the full timestamp.

Change the table monitoring to use the extract time by omitting the timestamp field and now the extract fails with the following

2013-05-22 09:26:13.735 dbx3559:ERROR:TailDatabaseMonitor - Error while executing database monitor: java.lang.IllegalArgumentException: Illegal group reference
java.lang.IllegalArgumentException: Illegal group reference
at java.util.regex.Matcher.appendReplacement(Matcher.java:713)
at com.splunk.dbx.monitor.impl.TailDatabaseMonitor.buildSqlQuery(TailDatabaseMonitor.java:59)
at com.splunk.dbx.monitor.impl.TailDatabaseMonitor.performMonitoring(TailDatabaseMonitor.java:92)
at com.splunk.dbx.monitor.DatabaseMonitorExecutor.executeMonitor(DatabaseMonitorExecutor.java:126)
at com.splunk.dbx.monitor.DatabaseMonitorExecutor.call(DatabaseMonitorExecutor.java:102)
at com.splunk.dbx.monitor.DatabaseMonitorExecutor.call(DatabaseMonitorExecutor.java:37)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

1 Solution

ziegfried
Influencer

You can either use the column name directly or use literal $rising_column$ that is replaced with the value you entered in the rising column field for the input. So either of the following 2 queries should work:

SELECT TRANSACTION_ID, TRANSACTION_DATE, OTHER, FIELDS FROM MYSCHEMA.MY_TABLE  {{WHERE TRANSACTION_ID > ?}}

or

SELECT TRANSACTION_ID, TRANSACTION_DATE, OTHER, FIELDS FROM MYSCHEMA.MY_TABLE  {{WHERE $rising_column$ > ?}}

View solution in original post

ziegfried
Influencer

You can either use the column name directly or use literal $rising_column$ that is replaced with the value you entered in the rising column field for the input. So either of the following 2 queries should work:

SELECT TRANSACTION_ID, TRANSACTION_DATE, OTHER, FIELDS FROM MYSCHEMA.MY_TABLE  {{WHERE TRANSACTION_ID > ?}}

or

SELECT TRANSACTION_ID, TRANSACTION_DATE, OTHER, FIELDS FROM MYSCHEMA.MY_TABLE  {{WHERE $rising_column$ > ?}}

domgkc
Explorer

SELECT TRANSACTION_ID, TRANSACTION_DATE, OTHER, FIELDS FROM MYSCHEMA.MY_TABLE {{WHERE $TRANSACTION_ID$ > ?}}

I am doing this as the DB owners would prefer I didn't grab the entire row. I am not doing anything clever with the query just grabing a subset of the fields from a single table.

I am not doing any timestamping as the date field for some reason comes out as date only and no timestamp.

The DB is Oracle 10.2. and the JVM is Sun 1.6.

0 Karma

ziegfried
Influencer

Could you please provide the custom SQL query you are using?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...