<?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 change sourcetype to XML in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182546#M36591</link>
    <description>&lt;P&gt;I'm on Splunk 6.2 at the moment.&lt;BR /&gt;
I've specified a folder to monitor to collect NPS logs from a Windows 2012 server.&lt;BR /&gt;
The files are stored as .log but the content is XML. So the fields aren't getting extracted properly. &lt;/P&gt;

&lt;P&gt;How do I force the Universal forwarder to specify the data as XML?  &lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2015 07:39:46 GMT</pubDate>
    <dc:creator>amal4885</dc:creator>
    <dc:date>2015-08-21T07:39:46Z</dc:date>
    <item>
      <title>change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182546#M36591</link>
      <description>&lt;P&gt;I'm on Splunk 6.2 at the moment.&lt;BR /&gt;
I've specified a folder to monitor to collect NPS logs from a Windows 2012 server.&lt;BR /&gt;
The files are stored as .log but the content is XML. So the fields aren't getting extracted properly. &lt;/P&gt;

&lt;P&gt;How do I force the Universal forwarder to specify the data as XML?  &lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2015 07:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182546#M36591</guid>
      <dc:creator>amal4885</dc:creator>
      <dc:date>2015-08-21T07:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182547#M36592</link>
      <description>&lt;P&gt;How did you define your data input? Did you specify &lt;CODE&gt;KV_MODE = xml&lt;/CODE&gt; for the sourcetype?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2015 07:45:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182547#M36592</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-08-21T07:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182548#M36593</link>
      <description>&lt;P&gt;I don't believe I have. &lt;/P&gt;

&lt;P&gt;So is it just a matter of adding the following lines props.conf on the server?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::.../mylogs/*.log]
KV_MODE = xml
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2015 02:05:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182548#M36593</guid>
      <dc:creator>amal4885</dc:creator>
      <dc:date>2015-08-26T02:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182549#M36594</link>
      <description>&lt;P&gt;Dont forget you will probably have to specify the BREAK_ONLY, BREAK_BEFORE, BREAK_AFTER settings within the stanza for the sourcetype to prevent it from being a giant blog.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182549#M36594</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2020-09-29T07:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182550#M36595</link>
      <description>&lt;P&gt;By the way this is one of the lines from my log file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Event&amp;gt;&amp;lt;Timestamp data_type="4"&amp;gt;08/18/2015 17:22:56.609&amp;lt;/Timestamp&amp;gt;&amp;lt;Computer-Name data_type="1"&amp;gt;NUCLEUS&amp;lt;/Computer-Name&amp;gt;&amp;lt;Event-Source data_type="1"&amp;gt;IAS&amp;lt;/Event-Source&amp;gt;&amp;lt;Acct-Session-Id data_type="2"&amp;gt;7282B03F&amp;lt;/Acct-Session-Id&amp;gt;&amp;lt;Packet-Type data_type="0"&amp;gt;4&amp;lt;/Packet-Type&amp;gt;&amp;lt;Reason-Code data_type="0"&amp;gt;0&amp;lt;/Reason-Code&amp;gt;&amp;lt;/Event&amp;gt;

 [source::.../mylogs/*.log]
TIME_PREFIX = \Timestamp data_type="4"&amp;gt;
BREAK_ONLY_BEFORE = ^&amp;lt;Event&amp;gt;
SHOULD_LINEMERGE = False
MUST_BREAK_AFTER = \/Event&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2015 02:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182550#M36595</guid>
      <dc:creator>amal4885</dc:creator>
      <dc:date>2015-08-26T02:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182551#M36596</link>
      <description>&lt;P&gt;I don't think this would work - you specified &lt;CODE&gt;SHOULD_LINEMERGE = false&lt;/CODE&gt; but specified your line breaking settings via line merging options. Either use &lt;CODE&gt;SHOULD_LINEMERGE = false&lt;/CODE&gt; with &lt;CODE&gt;LINE_BREAKER = regex&lt;/CODE&gt;, something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ([\r\n]+)&amp;lt;Event&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in your case, or use &lt;CODE&gt;SHOULD_LINEMERGE = true&lt;/CODE&gt; with any of the other line breaking settings such as &lt;CODE&gt;BREAK_ONLY_BEFORE&lt;/CODE&gt; or &lt;CODE&gt;MUST_BREAK_AFTER&lt;/CODE&gt; (see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/propsconf"&gt;props.conf&lt;/A&gt; and search for &lt;CODE&gt;SHOULD_LINEMERGE&lt;/CODE&gt; for details).&lt;BR /&gt;
You can verify your settings by using the "Add Data" wizard with one of your files (go to Settings -&amp;gt; Add Data -&amp;gt; Upload). This will show you the effect of the settings on your data before indexing it. &lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2015 07:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182551#M36596</guid>
      <dc:creator>jeffland</dc:creator>
      <dc:date>2015-08-26T07:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: change sourcetype to XML</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182552#M36597</link>
      <description>&lt;P&gt;Perfect.. that helped.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2015 00:43:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-sourcetype-to-XML/m-p/182552#M36597</guid>
      <dc:creator>amal4885</dc:creator>
      <dc:date>2015-08-27T00:43:12Z</dc:date>
    </item>
  </channel>
</rss>

