Getting Data In

Unable to linebreak a forwarded json input but works when file monitored locally

Cuyose
Builder

This is odd, I have a json log file that can be copied and added manually or monitored locally from a standalone instance applying the my_json sourcetype. the only thing this sourcetype initially needed to work from the autoselected _json sourcetype is TRUNCATE = 0 and defining the timestamp field.

Everything looks perfect when manually indexing the file or when monitoring the file locally. However if I use a forwarder to send the data to the same exact server hat has no issues indexing the data manually, none of the events are broken out, nor are the timestamps found.

0 Karma
1 Solution

Cuyose
Builder

I figured this out, apparently some structured sourcetypes need to also have the props on the actual forwarder?! Even though this was an indexed extraction, specifying only truncate = 0 and the custom timestamp field json element attribute value, having the props on the indexer and search heads was not sufficient. Once the props.conf was also pushed to the forwarder sending the file it worked.

View solution in original post

0 Karma

Cuyose
Builder

I figured this out, apparently some structured sourcetypes need to also have the props on the actual forwarder?! Even though this was an indexed extraction, specifying only truncate = 0 and the custom timestamp field json element attribute value, having the props on the indexer and search heads was not sufficient. Once the props.conf was also pushed to the forwarder sending the file it worked.

0 Karma

Cuyose
Builder

Ill add the info I came across that describes this behavior

Since splunk 6, some sources can be parsed for structured data (like headers, or json) and be populated at the forwarder level. see http://docs.splunk.com/Documentation/Splunk/6.1.2/Data/Extractfieldsfromfileheadersatindextime#Forwa... Those setting have to be on the forwarders (and indexers if they monitor files)

Caveats
Splunk Enterprise does not parse structured data that has been forwarded to an indexer

When you forward structured data to an indexer, Splunk Enterprise does not parse this data once it arrives at the indexer, even if you have configured props.conf on that indexer with INDEXED_EXTRACTIONS. Forwarded data skips the following queues on the indexer, which precludes any parsing of that data on the indexer:

parsing
aggregation
typing

The forwarded data must arrive at the indexer already parsed. To achieve this, you must also set up props.conf on the forwarder that sends the data. This includes configuration of INDEXED_EXTRACTIONS and any other parsing, filtering, anonymizing, and routing rules. Universal forwarders are capable of performing these tasks solely for structured data. See "Forward data extracted from header files" earlier in this topic.

http://docs.splunk.com/Documentation/Splunk/6.1.2/Data/Extractfieldsfromfileheadersatindextime
http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F

0 Karma

adonio
Ultra Champion

where did you put your props.conf?

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!

Turn Cisco Telemetry Into Action with Cisco Data Fabric, powered by the Splunk ...

The surge in machine data is already hitting enterprise budgets, and the agentic era will only intensify it. ...

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...