<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I make splunk universal forwarders treat each newline as a separate event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101306#M21218</link>
    <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2012 07:05:54 GMT</pubDate>
    <dc:creator>ilanz</dc:creator>
    <dc:date>2012-03-27T07:05:54Z</dc:date>
    <item>
      <title>How can I make splunk universal forwarders treat each newline as a separate event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101304#M21216</link>
      <description>&lt;P&gt;Hi, my setup is two nodes, each has a Splunk Universal Forwarder which reads a logs directory and sends those logs to a central Splunk indexer.&lt;/P&gt;

&lt;P&gt;Let's say I have a log file that looks like this:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;4:01:02.316 PM 2012-03-26 16:01:02,3[CLIENT,ALL][Thread:162] INFO  - {"JSON1":"hello"}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;5:02:02.316 PM 2012-03-28 17:00:02,3[CLIENT,ALL][Thread:162] INFO  - {"JSON2":"goodbye"}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;In the case above, each line if forwarded as a separate event,&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;Now, let's say I change my log file format, I'll remove the prefixed timestamps to make it loo like this:&lt;BR /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;{"JSON1":"hello"}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;STRONG&gt;{"JSON2":"goodbye"}&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;
In that case, splunk treats it as a &lt;STRONG&gt;single&lt;/STRONG&gt; event that is if I perform a search I actually get:&lt;/P&gt;

&lt;P&gt;{"JSON1":"hello"}{"JSON2":"goodbye"}&lt;/P&gt;

&lt;P&gt;How can I configure splunk correctly so it will treat each json entry in my log as a separate event, given my setup usage of universal forwarders.&lt;/P&gt;

&lt;P&gt;Thanks beforehand!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2012 15:49:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101304#M21216</guid>
      <dc:creator>ilanz</dc:creator>
      <dc:date>2012-03-26T15:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make splunk universal forwarders treat each newline as a separate event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101305#M21217</link>
      <description>&lt;P&gt;Hi, if your events are :&lt;BR /&gt;
 - really separated by a new line (in the file)&lt;BR /&gt;
 - or send to splunk one after the other (syslog by example)&lt;/P&gt;

&lt;P&gt;then the solution is to use a sourcetype that define the events are "singleline events"&lt;BR /&gt;
see SHOULD_LINEMERGE in &lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/Data/Indexmulti-lineevents"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/Data/Indexmulti-lineevents&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;example&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
inputs.conf&lt;BR /&gt;
[monitor:///var/log/json]&lt;BR /&gt;
sourcetype=myjson&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;props.conf (on the indexer)&lt;BR /&gt;
[myjson]&lt;BR /&gt;
SHOULD_LINEMERGE= false&lt;BR /&gt;
&lt;/P&gt;</description>
      <pubDate>Mon, 26 Mar 2012 16:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101305#M21217</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-03-26T16:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make splunk universal forwarders treat each newline as a separate event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101306#M21218</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2012 07:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-make-splunk-universal-forwarders-treat-each-newline-as/m-p/101306#M21218</guid>
      <dc:creator>ilanz</dc:creator>
      <dc:date>2012-03-27T07:05:54Z</dc:date>
    </item>
  </channel>
</rss>

