<?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 data in xml  data format in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620423#M14499</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234209"&gt;@vineela&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;which sourcetype did you used for your data source?&lt;/P&gt;&lt;P&gt;if you are using one with the option "INDEXED_DATA = xml", you automatically have all the fields in your events.&lt;/P&gt;&lt;P&gt;otherwise you have to use some regexes to extract them:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\&amp;lt;EventCode\&amp;gt;(?&amp;lt;EventCode&amp;gt;[^\&amp;lt;]+).*\&amp;lt;Severity\&amp;gt;(?&amp;lt;Severity&amp;gt;[^\&amp;lt;]+).*&amp;lt;Text&amp;gt;(?&amp;lt;Text&amp;gt;.*)\&amp;gt;\&amp;lt;\/Text\&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/ZrYeyg/1" target="_blank"&gt;https://regex101.com/r/ZrYeyg/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 10 Nov 2022 13:03:07 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-11-10T13:03:07Z</dc:date>
    <item>
      <title>How to extract data in xml  data format?</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620407#M14498</link>
      <description>&lt;P&gt;I need to extract fields from log which is in xml format.&lt;BR /&gt;Below is the example:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Event&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;DateTime&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;2022-11-10T11:58:41.136Z&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/DateTime&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;IBIC8&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;CTBAAUSN&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/IBIC8&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;InstanceId&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;D&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/InstanceId&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;EventCode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;PAG.NTF.CRL_UPDATE_SUCCESS&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/&lt;SPAN class=""&gt;EventCode&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;CRL&lt;/SPAN&gt; &lt;SPAN class=""&gt;update&lt;/SPAN&gt; &lt;SPAN class=""&gt;succeeded&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/Name&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Severity&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;INFO&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/Severity&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Class&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;SECURITY&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/Class&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;Text&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&amp;lt;![&lt;/SPAN&gt;&lt;SPAN class=""&gt;CDATA&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;CRL&lt;/SPAN&gt; &lt;SPAN class=""&gt;was&lt;/SPAN&gt; &lt;SPAN class=""&gt;successfully&lt;/SPAN&gt; &lt;SPAN class=""&gt;downloaded&lt;/SPAN&gt; &lt;SPAN class=""&gt;and&lt;/SPAN&gt; &lt;SPAN class=""&gt;validated&lt;/SPAN&gt; &lt;SPAN class=""&gt;Context:&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;URL:&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;A href="https://crlcheck.common.sipn.swift.com:443/SWIFTCA1.crl" target="_blank" rel="noopener"&gt;https://crlcheck.common.sipn.swift.com:443/SWIFTCA1.crl&lt;/A&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Version:&lt;/SPAN&gt; &lt;SPAN class=""&gt;2&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Updated&lt;/SPAN&gt; &lt;SPAN class=""&gt;on:&lt;/SPAN&gt; &lt;SPAN class=""&gt;Thu&lt;/SPAN&gt; &lt;SPAN class=""&gt;Nov&lt;/SPAN&gt; &lt;SPAN class=""&gt;10&lt;/SPAN&gt; &lt;SPAN class=""&gt;21:57:53&lt;/SPAN&gt; &lt;SPAN class=""&gt;AEDT&lt;/SPAN&gt; &lt;SPAN class=""&gt;2022&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Valid&lt;/SPAN&gt; &lt;SPAN class=""&gt;till:&lt;/SPAN&gt; &lt;SPAN class=""&gt;Sun&lt;/SPAN&gt; &lt;SPAN class=""&gt;Nov&lt;/SPAN&gt; &lt;SPAN class=""&gt;13&lt;/SPAN&gt; &lt;SPAN class=""&gt;21:57:53&lt;/SPAN&gt; &lt;SPAN class=""&gt;AEDT&lt;/SPAN&gt; &lt;SPAN class=""&gt;2022&lt;/SPAN&gt; &lt;SPAN class=""&gt;-&lt;/SPAN&gt; &lt;SPAN class=""&gt;Issuer:&lt;/SPAN&gt; &lt;SPAN class=""&gt;o=swift&lt;/SPAN&gt;&lt;SPAN&gt;]]&amp;gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/Text&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt; &amp;lt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;/Event&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I need to extract fields like eventcode,severity,text .&lt;BR /&gt;&lt;BR /&gt;How can i extract it as statistical data either by using regular expression or how it is...or there is any way to extract the, Please suggest&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 15:35:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620407#M14498</guid>
      <dc:creator>vineela</dc:creator>
      <dc:date>2022-11-10T15:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data in xml  data format</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620423#M14499</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234209"&gt;@vineela&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;which sourcetype did you used for your data source?&lt;/P&gt;&lt;P&gt;if you are using one with the option "INDEXED_DATA = xml", you automatically have all the fields in your events.&lt;/P&gt;&lt;P&gt;otherwise you have to use some regexes to extract them:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "\&amp;lt;EventCode\&amp;gt;(?&amp;lt;EventCode&amp;gt;[^\&amp;lt;]+).*\&amp;lt;Severity\&amp;gt;(?&amp;lt;Severity&amp;gt;[^\&amp;lt;]+).*&amp;lt;Text&amp;gt;(?&amp;lt;Text&amp;gt;.*)\&amp;gt;\&amp;lt;\/Text\&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/ZrYeyg/1" target="_blank"&gt;https://regex101.com/r/ZrYeyg/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2022 13:03:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620423#M14499</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-10T13:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract data in xml  data format</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620725#M14503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234209"&gt;@vineela&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 10:55:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-extract-data-in-xml-data-format/m-p/620725#M14503</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-14T10:55:33Z</dc:date>
    </item>
  </channel>
</rss>

