<?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 to extract XMP, parse XML, and split it up with eval? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607433#M211180</link>
    <description>&lt;P&gt;If you don't have file system access then you won't be able to do much with props.conf.&amp;nbsp; You may have to stick with search-time extractions.&lt;/P&gt;&lt;P&gt;First, however, please share some sample data so we know what we're working with and have something with which to test.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jul 2022 12:03:50 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-07-29T12:03:50Z</dc:date>
    <item>
      <title>How to extract XMP, parse XML, and split it up with eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607424#M211177</link>
      <description>&lt;P&gt;I got some embedded XML in a Syslog message.&amp;nbsp; I have no access to get under the bonnet in an admin sense.&amp;nbsp; I need to "grok" the message - ideally into stages&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 - extract xml&lt;/P&gt;
&lt;P&gt;2 - parse xml, split up with eval or something&lt;/P&gt;
&lt;P&gt;I have seen a bunch of stuff around props.conf - but I guess I need to go to one of the "collector" nodes so it parses at source?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 21:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607424#M211177</guid>
      <dc:creator>splunkernator</dc:creator>
      <dc:date>2022-07-28T21:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract XMP, parse XML, and split it up with eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607433#M211180</link>
      <description>&lt;P&gt;If you don't have file system access then you won't be able to do much with props.conf.&amp;nbsp; You may have to stick with search-time extractions.&lt;/P&gt;&lt;P&gt;First, however, please share some sample data so we know what we're working with and have something with which to test.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 12:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607433#M211180</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-07-29T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract XMP, parse XML, and split it up with eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607456#M211191</link>
      <description>&lt;P&gt;Hi thanks - I have had to basically make this up, so the shape of the data below is broadly the same, but utterly fabricated to protect my client.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2019-07-29T05:29:26.762Z DEBUG &amp;lt;foo-5-thread-2&amp;gt; [BarAgent] The asynchronousNotification message is: &amp;lt;TERMINALRESPONSE&amp;gt;   &amp;lt;SERVERDN&amp;gt;cn=00e5934f-12be-4cbf-8608-a75905dadbe7,ou=foo,dc=bar,dc=hyper,dc=out&amp;lt;/SERVERDN&amp;gt;   &amp;lt;SERVERPOOLDN&amp;gt;cn=foo-bar-agent,ou=server groups,dc=bar,dc=hyper,dc=out&amp;lt;/SERVERPOOLDN&amp;gt;   &amp;lt;SERVERDNSNAME&amp;gt;FOO-FB02Z-BAR019&amp;lt;/SERVERDNSNAME&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;What is interesting it the data doesn't seem "clean" - that there is no closing tag for &amp;lt;foo-5-thread-2&amp;gt; (i.e. no &amp;lt;/foo-5-thread&amp;gt; ; and in other instances there is - if you can provide an example, I can take this away and work on it, much appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 05:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607456#M211191</guid>
      <dc:creator>splunkernator</dc:creator>
      <dc:date>2022-07-29T05:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract XMP, parse XML, and split it up with eval?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607519#M211228</link>
      <description>&lt;P&gt;I agree that appears to be poorly-formatted XML.&amp;nbsp; Unfortunately, Splunk's &lt;FONT face="courier new,courier"&gt;spath&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;xpath&lt;/FONT&gt; commands will only parse properly formatted XML.&amp;nbsp; I'm afraid that means you'll have to use a series of rex commands to extract the desired fields.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\&amp;lt;SERVERDN&amp;gt;(?&amp;lt;SERVERDN&amp;gt;[^\&amp;lt;]+)"
| rex "\&amp;lt;SERVERPOOLDN&amp;gt;(?&amp;lt;SERVERPOOLDN&amp;gt;[^\&amp;lt;]+)"
and so on&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 29 Jul 2022 12:25:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-XMP-parse-XML-and-split-it-up-with-eval/m-p/607519#M211228</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-07-29T12:25:49Z</dc:date>
    </item>
  </channel>
</rss>

