<?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: Why am I unable to apply proper parsing on an XML field tag with my current props.conf? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163940#M33205</link>
    <description>&lt;P&gt;I am able to strip out the non xml data from the events by using the following props. It worked fine. Thank You guys for your inputs:&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
TIME_PREFIX = &lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 150&lt;BR /&gt;
TRUNCATE = 1000000&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
SEDCMD-stripnonxml-1=s/^.*msg_body="// &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 06:59:51 GMT</pubDate>
    <dc:creator>OMohi</dc:creator>
    <dc:date>2020-09-29T06:59:51Z</dc:date>
    <item>
      <title>Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163934#M33199</link>
      <description>&lt;P&gt;Hi Everyone:&lt;/P&gt;

&lt;P&gt;I am facing an issue where I am unable to apply proper parsing for an XML tag. I want my event started at tag &amp;lt;v1:BusinessEventRequest&amp;gt; and line breaking at &amp;lt;/v1:BusinessEventRequest&amp;gt;&lt;/P&gt;

&lt;P&gt;Provided is the sample log file :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Thu Aug 06 11:47:02 EDT 2015 name="QUEUE_msg_received" event_id="ID:414d51204d514942513031202020202055bdd46020387541" msg_dest="QA.EA.ELOG.BUSINESSEVENT1" msg_body="&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&amp;lt;v1:BusinessEventRequest xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://schemas.humana.com/Infrastructure/Utility/Logging/BusinessEventRequest/V1.1"&amp;gt;;
&amp;lt;v1:BusinessEvent&amp;gt;&amp;lt;v1:BusinessEventMetaData&amp;gt;
&amp;lt;v1:BusinessEventTypeCode&amp;gt;BUSINESS_EVENT&amp;lt;/v1:BusinessEventTypeCode&amp;gt;
&amp;lt;v1:BusinessEventDateTime&amp;gt;2015-08-06T12:00:47Z&amp;lt;/v1:BusinessEventDateTime&amp;gt;
&amp;lt;/v1:BusinessEventMetaData&amp;gt;&amp;lt;v1:SourceApplicationInformation&amp;gt;
&amp;lt;v1:EAPMId&amp;gt;11111&amp;lt;/v1:EAPMId&amp;gt;&amp;lt;v1:HostMachineName&amp;gt;MQIBQ01&amp;lt;/v1:HostMachineName&amp;gt;
&amp;lt;v1:HostEnvironmentName&amp;gt;QA&amp;lt;/v1:HostEnvironmentName&amp;gt;&amp;lt;v1:AppEventCorrelationId/&amp;gt;
&amp;lt;v1:Component&amp;gt;&amp;lt;v1:ComponentId/&amp;gt;&amp;lt;v1:ComponentName/&amp;gt;&amp;lt;/v1:Component&amp;gt;
&amp;lt;/v1:SourceApplicationInformation&amp;gt;&amp;lt;v1:BusinessProcessInformation&amp;gt;&amp;lt;v1:ProcessName/&amp;gt;
&amp;lt;v1:EventModelXSDPath/&amp;gt;&amp;lt;EventInformation&amp;gt;&amp;lt;mstns:BAMEvent
xmlns:mstns="http://enrollmentservices.humana.com/Schema/BAMSchema/v1.0"&amp;gt;
&amp;lt;mstns:EventSource&amp;gt;FileIntake&amp;lt;/mstns:EventSource&amp;gt;
&amp;lt;mstns:Activity&amp;gt;FileIntakeActivity&amp;lt;/mstns:Activity&amp;gt;&amp;lt;mstns:EventTransactionId&amp;gt;40efe7da-4ef2-46b6-bea6-911a74db898e&amp;lt;/mstns:EventTransactionId&amp;gt;
&amp;lt;mstns:EventCorrelationID&amp;gt;354805729&amp;lt;/mstns:EventCorrelationID&amp;gt;&amp;lt;mstns:Milestone&amp;gt;
&amp;lt;mstns:MilestoneEvent&amp;gt;File upload requested&amp;lt;/mstns:MilestoneEvent&amp;gt;
&amp;lt;mstns:MilestoneState&amp;gt;Begin&amp;lt;/mstns:MilestoneState&amp;gt;&amp;lt;mstns:DataElements&amp;gt;&amp;lt;mstns:FileName/&amp;gt;
&amp;lt;mstns:FileSize&amp;gt;9008&amp;lt;/mstns:FileSize&amp;gt;&amp;lt;mstns:AdditionalInfo&amp;gt;File upload requested&amp;lt;/mstns:AdditionalInfo&amp;gt;&amp;lt;/mstns:DataElements&amp;gt;&amp;lt;/mstns:Milestone&amp;gt;&amp;lt;/mstns:BAMEvent&amp;gt;
&amp;lt;/EventInformation&amp;gt;&amp;lt;/v1:BusinessProcessInformation&amp;gt;&amp;lt;/v1:BusinessEvent&amp;gt;
&amp;lt;/v1:BusinessEventRequest&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my props.conf file :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mq_business_nonprod]
DATETIME_CONFIG = CURRENT
BREAK_ONLY_BEFORE = "&amp;lt;v1:BusinessEventRequest
SHOULD_LINEMERGE = true
MUST_BREAK_AFTER = &amp;lt;/v1:BusinessEventRequest&amp;gt;"
TRUNCATE = 1000000
disabled = false
pulldown_type = true
NO_BINARY_CHECK = 1
KV_MODE = xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Am I missing something? Please advise.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 15:55:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163934#M33199</guid>
      <dc:creator>OMohi</dc:creator>
      <dc:date>2015-08-07T15:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163935#M33200</link>
      <description>&lt;P&gt;Hi @OMohi,&lt;BR /&gt;
I'm a tech writer here at Splunk. I work on simple xml docs and I'd like to help with your question. I'll reply shortly with some more information!&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
@frobinson_splunk&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 16:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163935#M33200</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2015-08-07T16:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163936#M33201</link>
      <description>&lt;P&gt;As a start, I'd suggest taking a look at this recent post here on Answers:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/201898/how-to-configure-splunk-to-read-xml-files-correctl.html" target="_blank"&gt;http://answers.splunk.com/answers/201898/how-to-configure-splunk-to-read-xml-files-correctl.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I took a look at the props.conf spec file for setting up parsing, and I believe you may have a conflict between the two line break rules here. You could try including only one of them to see if this fixes the behavior you're seeing.&lt;/P&gt;

&lt;H2&gt;Specifically, the two rules are: (from props.conf: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Admin/Propsconf" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Admin/Propsconf&lt;/A&gt;)&lt;/H2&gt;

&lt;P&gt;BREAK_ONLY_BEFORE = &lt;BR /&gt;
* When set, Splunk creates a new event only if it encounters a new line that matches the&lt;BR /&gt;
  regular expression.&lt;BR /&gt;
* Defaults to empty.&lt;/P&gt;

&lt;P&gt;MUST_BREAK_AFTER = &lt;BR /&gt;
 * When set and the regular expression matches the current line, Splunk creates a new event for&lt;BR /&gt;
  the next input line.&lt;BR /&gt;
 * Splunk may still break before the current line if another rule matches.&lt;BR /&gt;
 * Defaults to empty.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Let me know if this helps--we can continue troubleshooting if not &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
@frobinson_splunk&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163936#M33201</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2020-09-29T06:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163937#M33202</link>
      <description>&lt;P&gt;As a start, I'd suggest taking a look at this recent post here on Answers:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/answers/201898/how-to-configure-splunk-to-read-xml-files-correctl.html"&gt;http://answers.splunk.com/answers/201898/how-to-configure-splunk-to-read-xml-files-correctl.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You might need to check the settings for breaks in props.conf as you have multiple line break rules here.&lt;/P&gt;

&lt;P&gt;Let me know if this helps--we can continue troubleshooting if not &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Best,&lt;BR /&gt;
@frobinson_splunk&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 16:50:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163937#M33202</guid>
      <dc:creator>frobinson_splun</dc:creator>
      <dc:date>2015-08-07T16:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163938#M33203</link>
      <description>&lt;P&gt;The log entries that you're trying to parse are not true XML as they contain non-xml portion at the start. Do think we can get rid of that (if there are no useful information in there)? Once formatted to proper XML, your can configure XML Parsing/event breaking and it should work.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 17:08:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163938#M33203</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-07T17:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163939#M33204</link>
      <description>&lt;P&gt;The problem is your first double-quote; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;BREAK_ONLY_BEFORE = &amp;lt;v1:BusinessEventRequest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Be sure that you restart the Splunk instances on your Indexers (and/or Heavy Forwarders)? This is required.&lt;/P&gt;

&lt;P&gt;Also, I strongly advise against &lt;CODE&gt;DATETIME_CONFIG = CURRENT&lt;/CODE&gt; if you have a timestamp in your event. You are really looking for trouble doing this.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2015 18:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163939#M33204</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-07T18:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to apply proper parsing on an XML field tag with my current props.conf?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163940#M33205</link>
      <description>&lt;P&gt;I am able to strip out the non xml data from the events by using the following props. It worked fine. Thank You guys for your inputs:&lt;/P&gt;

&lt;P&gt;[sourcetype]&lt;BR /&gt;
TIME_PREFIX = &lt;BR /&gt;
SHOULD_LINEMERGE = true&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 150&lt;BR /&gt;
TRUNCATE = 1000000&lt;BR /&gt;
disabled = false&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
SEDCMD-stripnonxml-1=s/^.*msg_body="// &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:59:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-apply-proper-parsing-on-an-XML-field-tag-with/m-p/163940#M33205</guid>
      <dc:creator>OMohi</dc:creator>
      <dc:date>2020-09-29T06:59:51Z</dc:date>
    </item>
  </channel>
</rss>

