Splunk Search

Problem with Tailing events from Splunk DB connect

alenseb
Communicator

Hi guys,

I have indexed a table from a DB using Splunk DB Connect.

It's got 2 Million records, i have given a column(ID) as the Rising Column.

But when i look at the data which has come in, sometimes 2 events gets accumulated together into one, sometimes 3 events gets together.

Is this a specific Splunk DB Connect or am i missing something?

Please help.
Thanks!

0 Karma
1 Solution

Dan
Splunk Employee
Splunk Employee

Hi alenseb,

The problem is that Splunk has certain heuristics for linebreaking. Normally, log file data has timestamps for each event. Splunk understands that well. If you have timestamps in your database rows, then you shouldn't have line breaking issues. Just be sure to set output timestamp and specify as timestamp column the column that, you know, has the timestamp.

If you don't have timestamps in your database rows, you have two options:

1. Click output timestamp and leave the timestamp column blank. Splunk will output the current time when indexing.

2. Use the default sourcetype in the input config. Just leave it blank and Splunk DB Connect will use dbmon:kv as the sourcetype (in the normal case where you're using the key-value output format). However, if you put something custom in the sourcetype field, you should then tell Splunk how to linebreak for that sourcetype. You can just copy over the props.conf settings for the default stanzas - specifically, add "SHOULD_LINEMERGE = false".

Hope this helps. If you can tell me which of these paths you went down to cause/solve the problem, it will help me set the product roadmap around this feature.

Cheers,

Dan Goldburt

dan@splunk.com

Product Manager, DB Connect

View solution in original post

Dan
Splunk Employee
Splunk Employee

Hi alenseb,

The problem is that Splunk has certain heuristics for linebreaking. Normally, log file data has timestamps for each event. Splunk understands that well. If you have timestamps in your database rows, then you shouldn't have line breaking issues. Just be sure to set output timestamp and specify as timestamp column the column that, you know, has the timestamp.

If you don't have timestamps in your database rows, you have two options:

1. Click output timestamp and leave the timestamp column blank. Splunk will output the current time when indexing.

2. Use the default sourcetype in the input config. Just leave it blank and Splunk DB Connect will use dbmon:kv as the sourcetype (in the normal case where you're using the key-value output format). However, if you put something custom in the sourcetype field, you should then tell Splunk how to linebreak for that sourcetype. You can just copy over the props.conf settings for the default stanzas - specifically, add "SHOULD_LINEMERGE = false".

Hope this helps. If you can tell me which of these paths you went down to cause/solve the problem, it will help me set the product roadmap around this feature.

Cheers,

Dan Goldburt

dan@splunk.com

Product Manager, DB Connect

srevelle16
Engager

Dan - Using a custom sourcetype in props.conf with "SHOULD_LINEMERGE = False" worked for me.

0 Karma

alenseb
Communicator

Thanks a lot Dan! 🙂

Since i wasn't using a default sourcetype, i went for the Timestamp solution where i specified a timestamp column & the required format.

Looking forward for a better version soon!
Good luck!

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...