<?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 Splunk splits multi-line log4j xml event in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149964#M9105</link>
    <description>&lt;P&gt;I get 2 events (one for the "event" part and 1 for the "message" part) instead of 1 event.&lt;/P&gt;

&lt;P&gt;Raw logged lines:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
&amp;lt;log4j:event category="com.myapp.shr.util.sql.SelectStatement" timestamp="1405542493235" level="DEBUG" thread="xxx"&amp;gt;&lt;BR /&gt;
&amp;lt;log4j:message xxxxCategory="1" messageKey="LOG_SELECTSTATEMENTEXECUTEQUERYRETURNED" arg1="jdbc:oracle:thin:@xxx:1521:yyy" arg2="Oracle" arg3="  0ms" arg4="SELECT  A,B,C FROM TABLE1" arg5="xxx" bracketingId=" "&amp;gt;&amp;lt;![CDATA[Duration:   0ms  SQL: SELECT  A,B,C FROM TABLE1&lt;BR /&gt;
 Server: jdbc:oracle:thin:@xxx:1521:yyy:&lt;BR /&gt;
 DB: Oracle&lt;BR /&gt;
 xxx] ]]&amp;gt;&amp;lt;/log4j:message&amp;gt;&lt;BR /&gt;
&amp;lt;/log4j:event&amp;gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;My C:\Program Files\Splunk\etc\system\local\props.conf contains:&lt;/P&gt;

&lt;PRE&gt;
[source::...\\logs\\YYY.log4j]
sourcetype = YYY
TIME_PREFIX = timestamp=
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)&amp;lt;log4j:event
&lt;/PRE&gt;

&lt;P&gt;YYY.log4j logfiles are getting sent via Splunk Universal Forwarder (tcp).&lt;/P&gt;

&lt;P&gt;Shouldn't the above settings combine the lines to create 1 event?&lt;/P&gt;</description>
    <pubDate>Sat, 19 Jul 2014 01:08:49 GMT</pubDate>
    <dc:creator>NK_1</dc:creator>
    <dc:date>2014-07-19T01:08:49Z</dc:date>
    <item>
      <title>Splunk splits multi-line log4j xml event</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149964#M9105</link>
      <description>&lt;P&gt;I get 2 events (one for the "event" part and 1 for the "message" part) instead of 1 event.&lt;/P&gt;

&lt;P&gt;Raw logged lines:&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
&amp;lt;log4j:event category="com.myapp.shr.util.sql.SelectStatement" timestamp="1405542493235" level="DEBUG" thread="xxx"&amp;gt;&lt;BR /&gt;
&amp;lt;log4j:message xxxxCategory="1" messageKey="LOG_SELECTSTATEMENTEXECUTEQUERYRETURNED" arg1="jdbc:oracle:thin:@xxx:1521:yyy" arg2="Oracle" arg3="  0ms" arg4="SELECT  A,B,C FROM TABLE1" arg5="xxx" bracketingId=" "&amp;gt;&amp;lt;![CDATA[Duration:   0ms  SQL: SELECT  A,B,C FROM TABLE1&lt;BR /&gt;
 Server: jdbc:oracle:thin:@xxx:1521:yyy:&lt;BR /&gt;
 DB: Oracle&lt;BR /&gt;
 xxx] ]]&amp;gt;&amp;lt;/log4j:message&amp;gt;&lt;BR /&gt;
&amp;lt;/log4j:event&amp;gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;My C:\Program Files\Splunk\etc\system\local\props.conf contains:&lt;/P&gt;

&lt;PRE&gt;
[source::...\\logs\\YYY.log4j]
sourcetype = YYY
TIME_PREFIX = timestamp=
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)&amp;lt;log4j:event
&lt;/PRE&gt;

&lt;P&gt;YYY.log4j logfiles are getting sent via Splunk Universal Forwarder (tcp).&lt;/P&gt;

&lt;P&gt;Shouldn't the above settings combine the lines to create 1 event?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jul 2014 01:08:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149964#M9105</guid>
      <dc:creator>NK_1</dc:creator>
      <dc:date>2014-07-19T01:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk splits multi-line log4j xml event</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149965#M9106</link>
      <description>&lt;P&gt;Try splitting up your props.conf like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::...\\logs\\YYY.log4j]
sourcetype = YYY

[YYY]
TIME_PREFIX = timestamp=
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)&amp;lt;log4j:event
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Jul 2014 09:58:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149965#M9106</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-19T09:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk splits multi-line log4j xml event</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149966#M9107</link>
      <description>&lt;P&gt;Adding the [YYY] stanza still makes Splunk use the old/default YYY split events. I tried using a new sourcetype name instead of YYY, and it does not get used. Should I be using a different props.conf file, or should I try to make Splunk "forget" that it ever saw a wrong YYY format?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Jul 2014 19:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149966#M9107</guid>
      <dc:creator>NK_1</dc:creator>
      <dc:date>2014-07-19T19:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk splits multi-line log4j xml event</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149967#M9108</link>
      <description>&lt;P&gt;Splunk had "learned" and cached some bad formats for sourcetype YYY in props.conf and sourcetypes.conf under etc\apps\learned\local\&lt;/P&gt;

&lt;P&gt;Clearing those out made the YYY stanza in props.conf under etc\system\local\ work properly.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jul 2014 23:05:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Splunk-splits-multi-line-log4j-xml-event/m-p/149967#M9108</guid>
      <dc:creator>NK_1</dc:creator>
      <dc:date>2014-07-20T23:05:17Z</dc:date>
    </item>
  </channel>
</rss>

