Getting Data In

LINE_BREAKER is being ignored

dolj
Explorer

Hi Community,

I have a JSON data source that I am trying to get into Splunk via a heavy Forwarder using a custom built app that uses an API call. For some reason my LINE_BREAKER seems to be getting ignored

every line ends and starts as follows. 

myemail@this-that-theother.co"},{"specialnumber":"number" 

the line break is the comma between the open and close curly braces..... IOW ,{

this is the line I am using in my props.conf

LINE_BREAKER = (\,)\{\"

for some reason the data continues to come in, in one big blob of multiple events. 

This is my props.conf

KV_MODE = json
SHOULD_LINEMERGE = 0
category = something
pulldown_type = 1
TZ = UTC
TIME_PREFIX=\"time\"\:\"
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_FORMAT =%Y-%m-%dT%H:%M:SZ
TRUNCATE = 999999
LINE_BREAKER = (\,)\{\"
EVENT_BREAKER_ENABLE = false

Time comes in as such "time":"2025-03-25T19:36:35Z"

Am I missing something? 

Labels (1)
0 Karma

dolj
Explorer

As mentioned above the events are coming in as one big blob not broken into separate events based on the line breaker above. 

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

Yes. I understand. The question is how your data is being ingested.

You said that you use a custom app querying an API endpoint. I assume therefore that said app has some modular input which produces data for the forwarder. But said data can be streamed to Splunk process in three ways. https://dev.splunk.com/enterprise/docs/developapps/manageknowledge/custominputs/modinputsscript#Stre...

If your data is streamed as XML and is being incorrectly (not) split into separate events by the modular input since it bypasses the line breaking part of ingestion pipeline completely your LINE_BREAKER settings don't matter.

Of course this is based on my assumption from what little you wrote about your custom ingestion method.

0 Karma

dolj
Explorer

Sorry for being vague I am trying to build the app using the Splunk Add-On-Builder using a rest api call. The problem I am having is the logs are coming in, in one big blob and I have tried multiple line_breaker options and tested them in regex101. 

With respect to the streaming mode. I checked all the .py files associated with the app and could not find any instances of 

<streaming_mode>xml</streaming_mode> 

or 

<streaming_mode>simple</streaming_mode> 

 in any of them. is it one of the cases where i have to add it?  Does Splunk default to XML?

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

By default it's supposed to be simple mode. But (and that's a big but), AOB might default to XML (and might not even be able to do it differently).

You can check it like this (an example from my home lab):

# /opt/splunk/bin/splunk cmd python /opt/splunk/etc/apps/TA-api-test/test_input_1.py --scheme

<scheme>
<title>test_input_1</title>
<description>Go to the add-on's configuration UI and configure modular inputs under the Inputs menu.</description>
<use_external_validation>true</use_external_validation>
<streaming_mode>xml</streaming_mode>
<use_single_instance>false</use_single_instance>
<endpoint>
<args>
<arg name="name">
<title>test_input_1 Data Input Name</title>
</arg>

<arg name="placeholder">
<title>placeholder</title>
<required_on_create>0</required_on_create>
<required_on_edit>0</required_on_edit>
</arg>

</args>
</endpoint>
</scheme>

As you can see - it's XML mode. And I'm not sure you can change that. At least I didn't see any option in AOB to change that. You might be able to fiddle with the input definition in AOB to see if it can explicitly break the REST results into separate events.

dolj
Explorer

Very helpful 

it is set to stream XML so I guess that is the issue and I need to either find a way to deal with it or modify the setting which as you mentioned looks easier said than done. 

 

0 Karma

PickleRick
SplunkTrust
SplunkTrust

If your input sends broken events in xml mode they are not broken again.

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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...