<?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: Ingest XML files, fields not being created in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458217#M79210</link>
    <description>&lt;P&gt;Hi Frank,&lt;/P&gt;

&lt;P&gt;thanks for your comments, i have tried what you suggested however the breaks and field ingest does not work.&lt;BR /&gt;
i still have fields that are based on elements with a =, but anything after SmartNoSubstitution is not extracting.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2019 07:51:17 GMT</pubDate>
    <dc:creator>ssaenger</dc:creator>
    <dc:date>2019-07-10T07:51:17Z</dc:date>
    <item>
      <title>Ingest XML files, fields not being created</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458215#M79208</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;i am trying to ingest XML files and split the elements in fields, my log files are;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;&amp;lt;SmartPanel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" DocumentCreationDate="2019-07-09T10:18:04" DocumentVersion="5" PanID="15" LogCreationDate="2019-07-08T18:45:32" TvID="0" xmlns="urn:nds:dyn:pms:Smart:v1" xsi:schemaLocation="urn:nds:dyn:pms:Smart:v1 /apps/WEB-INF/amsXmlSchema.xsd"&amp;gt;&amp;lt;Subscriber SubscriberID="126" DeviceID="2915"&amp;gt;&amp;lt;SmartNoSubstitution EventTime="2019-07-08T18:45:53"&amp;gt;&amp;lt;availId&amp;gt;175696022&amp;lt;/availId&amp;gt;&amp;lt;reason&amp;gt;0&amp;lt;/reason&amp;gt;&amp;lt;ServiceKey&amp;gt;4049&amp;lt;/ServiceKey&amp;gt;&amp;lt;/SmartNoSubstitution&amp;gt;&amp;lt;SmartNoSubstitution EventTime="2019-07-08T18:57:05"&amp;gt;&amp;lt;availId&amp;gt;175696024&amp;lt;/availId&amp;gt;&amp;lt;reason&amp;gt;0&amp;lt;/reason&amp;gt;&amp;lt;ServKey&amp;gt;4049&amp;lt;/ServKey&amp;gt;&amp;lt;/SmartNoSubstitution&amp;gt;&amp;lt;/Subscriber&amp;gt;&amp;lt;/SmartPanel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; &amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;&amp;lt;SmartPanel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" DocumentCreationDate="2019-07-09T11:18:04" DocumentVersion="5" PanID="5" LogCreationDate="2019-07-08T19:45:32" TvID="0" xmlns="urn:nds:dyn:pms:Smart:v1" xsi:schemaLocation="urn:nds:dyn:pms:Smart:v1 /apps/WEB-INF/amsXmlSchema.xsd"&amp;gt;&amp;lt;Subscriber SubscriberID="178" DeviceID="45615"&amp;gt;&amp;lt;/Subscriber&amp;gt;&amp;lt;/SmartPanel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;from other questions my props.conf and transform.conf are below&lt;BR /&gt;
props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[pms]
TIME_PREFIX=EventTime
TIME_FORMAT=%Y-%m-%dT%H:%M:%S 
SHOULD_LINEMERGE=false
TRUNCATE=100000
LINE_BREAKER=\&amp;gt;\s*(?=\)
REPORT-xmlext=xml-extr
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;BR /&gt;
transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xml-extr]
REGEX=&amp;lt;([^\s\&amp;gt;]*)[^\&amp;gt;]*\&amp;gt;([^&amp;lt;]*)\&amp;lt;\/\1\&amp;gt;
FORMAT=$1::$2 
MV_ADD=true
REPEAT_MATCH=true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however the only files being ingested are the second one and this is giving fields where there is an = &lt;/P&gt;

&lt;P&gt;i have tried to use KV_MODE=xml but this has not helped.&lt;/P&gt;

&lt;P&gt;i have used regex101 to validate the regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Match 1
Full match  451-479 &amp;lt;availId&amp;gt;175696022&amp;lt;/availId&amp;gt;
Group 1.    452-459 availId
Group 2.    460-469 175696022
Match 2
Full match  479-497 &amp;lt;reason&amp;gt;0&amp;lt;/reason&amp;gt;
Group 1.    480-486 reason
Group 2.    487-488 0
Match 3
Full match  497-526 &amp;lt;ServiceKey&amp;gt;4049&amp;lt;/ServiceKey&amp;gt;
Group 1.    498-508 ServiceKey
Group 2.    509-513 4049
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;does any body have any advice?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 13:34:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458215#M79208</guid>
      <dc:creator>ssaenger</dc:creator>
      <dc:date>2019-07-09T13:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest XML files, fields not being created</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458216#M79209</link>
      <description>&lt;P&gt;Few comments:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;why not set &lt;CODE&gt;TIME_PREFIX=EventTime="&lt;/CODE&gt; (probably also works with just &lt;CODE&gt;TIME_PREFIX=EventTime&lt;/CODE&gt;, but better be as specific as possible I would say.&lt;/LI&gt;
&lt;LI&gt;That LINE_BREAKER seems strange. Is there something missing? It doesn't include the mandatory capture group. Your intention is to break on every &lt;CODE&gt;&amp;lt;SmartNoSubstitution&lt;/CODE&gt;?&lt;/LI&gt;
&lt;LI&gt;If you don't want automatic key=value extraction to kick in: add &lt;CODE&gt;KV_MODE = none&lt;/CODE&gt; in props.conf&lt;/LI&gt;
&lt;LI&gt;Where have you deployed this config? For the extractions to work, it must be on your search heads as well.&lt;/LI&gt;
&lt;LI&gt;There is no point in specifying &lt;CODE&gt;REPEAT_MATCH=true&lt;/CODE&gt;, since that setting only applies to index time extractions&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458216#M79209</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-09T14:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest XML files, fields not being created</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458217#M79210</link>
      <description>&lt;P&gt;Hi Frank,&lt;/P&gt;

&lt;P&gt;thanks for your comments, i have tried what you suggested however the breaks and field ingest does not work.&lt;BR /&gt;
i still have fields that are based on elements with a =, but anything after SmartNoSubstitution is not extracting.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 07:51:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458217#M79210</guid>
      <dc:creator>ssaenger</dc:creator>
      <dc:date>2019-07-10T07:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest XML files, fields not being created</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458218#M79211</link>
      <description>&lt;P&gt;What linebreaker are you now using? Because what you have doesn't make much sense to me as I said and I didn't suggest anything else yet.&lt;/P&gt;

&lt;P&gt;Then I guess the first thing to do is some troubleshooting to confirm whether Splunk is really using the configuration at all.&lt;/P&gt;

&lt;P&gt;Check (e.g. using btool) that the indexers / heavy forwarders have the configuration for the index time things (line breaking, timestamping). Have you restarted them after making the changes? Make sure when testing that you are actually looking at freshly ingested events, otherwise you're not going to see the effect of any changes to index time config.&lt;/P&gt;

&lt;P&gt;Check the Search Heads have the field extraction config (e.g. confirm it is present from the GUI Settings -&amp;gt; Fields and has appropriate permission and sharing settings to make the config available in the app where you run the search).&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 07:58:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458218#M79211</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-07-10T07:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ingest XML files, fields not being created</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458219#M79212</link>
      <description>&lt;P&gt;Your question is very unclear.  The settings that you have will work correctly for the first case and &lt;CODE&gt;KV_MODE=auto&lt;/CODE&gt; will work for the 2nd case.  So what &lt;EM&gt;EXACTLY&lt;/EM&gt; is your problem here?  As far as &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;, we cannot help you unless you show us multiple events exactly the way that they are in the file (with all variations).&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jul 2019 22:38:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingest-XML-files-fields-not-being-created/m-p/458219#M79212</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-27T22:38:23Z</dc:date>
    </item>
  </channel>
</rss>

