<?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: Field extraction in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517725#M3232</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/86891"&gt;@mbasharat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;\&amp;lt;.*\&amp;gt;(?&amp;lt;Fieldtoextract&amp;gt;.*)\&amp;lt;.*\&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2020 13:22:45 GMT</pubDate>
    <dc:creator>manuelostertag</dc:creator>
    <dc:date>2020-09-03T13:22:45Z</dc:date>
    <item>
      <title>Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517622#M3220</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a need for field extraction. I have a sourcetype that has compliance related information for our use case. This data has field name "Text". This field has data coming in variations. Below are two of the many variations. I need the extraction via regex that can detect fields within tags and parse them out. Data cardinality will be by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;cm:compliance-check-id&amp;gt;36c4d07cc410439bf3bf79f7f5942672&amp;lt;/cm:compliance-check-id&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample: 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;cm:compliance-result&amp;gt;WARNING&amp;lt;/cm:compliance-result&amp;gt; 
&amp;lt;cm:compliance-actual-value&amp;gt;Error -- evaluation period has ended&amp;lt;/cm:compliance-actual-value&amp;gt; 
&amp;lt;cm:compliance-check-id&amp;gt;36c4d07cc410439bf3bf79f7f5942672&amp;lt;/cm:compliance-check-id&amp;gt; 
&amp;lt;cm:compliance-policy-value&amp;gt;WARNING&amp;lt;/cm:compliance-policy-value&amp;gt; 
&amp;lt;cm:compliance-check-name&amp;gt;Connection error&amp;lt;/cm:compliance-check-name&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sample: 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;compliance&amp;gt;true&amp;lt;/compliance&amp;gt; 
&amp;lt;cm:compliance-check-name&amp;gt;WN10-00-000005 - Domain-joined systems must use Windows 10 Enterprise Edition 64-bit version - 64-bit&amp;lt;/cm:compliance-check-name&amp;gt; 
&amp;lt;cm:compliance-audit-file&amp;gt;DISA_STIG_Windows_10_v1r20.audit&amp;lt;/cm:compliance-audit-file&amp;gt; 
&amp;lt;cm:compliance-check-id&amp;gt;55aeff4f26d6b8307f6f9672750a5548&amp;lt;/cm:compliance-check-id&amp;gt; 
&amp;lt;cm:compliance-actual-value&amp;gt;'64-bit'&amp;lt;/cm:compliance-actual-value&amp;gt; 
&amp;lt;cm:compliance-policy-value&amp;gt;'64-bit'&amp;lt;/cm:compliance-policy-value&amp;gt; 
&amp;lt;cm:compliance-info&amp;gt; Features such as Credential Guard use virtualization based security to protect information that could be used in credential theft attacks if compromised. There are a number of system requirements that must be met in order for Credential Guard to be configured and enabled properly. Virtualization based security and Credential Guard are only available with Windows 10 Enterprise 64-bit version. &amp;lt;/cm:compliance-info&amp;gt; 
&amp;lt;cm:compliance-result&amp;gt;PASSED&amp;lt;/cm:compliance-result&amp;gt; 
&amp;lt;cm:compliance-reference&amp;gt;800-171|3.4.1,800-53|CM-8,CAT|II,CCI|CCI-000366,CN-L3|8.1.10.2(a),CN-L3|8.1.10.2(b),CSF|DE.CM-7,CSF|ID.AM-1,CSF|ID.AM-2,CSF|PR.DS-3,ISO/IEC-27001|A.8.1.1,ITSG-33|CM-8,NESA|T1.2.1,NESA|T1.2.2,NIAv2|NS35,Rule-ID|SV-77809r3_rule,STIG-ID|WN10-00-000005,Vuln-ID|V-63319&amp;lt;/cm:compliance-reference&amp;gt; 
&amp;lt;cm:compliance-see-also&amp;gt;https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_MS_Windows_10_V1R20_STIG.zip&amp;lt;/cm:compliance-see-also&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in-advance!!!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 03:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517622#M3220</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-03T03:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517650#M3224</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/86891"&gt;@mbasharat&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe you're asking for a regex to just extract the compliance-check-id for the event.&amp;nbsp; Is this correct?&amp;nbsp; &amp;nbsp;There are a few ways to do this but if you just want that one field then this will work for you.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| rex "id&amp;gt;(?&amp;lt;complianceCheckID&amp;gt;[a-fA-F0-9]+)\&amp;lt;"
...&lt;/LI-CODE&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 06:43:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517650#M3224</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2020-09-03T06:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517717#M3230</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/158935"&gt;@yeahnah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Appreciate your support first of all. I need all the fields extracted that are coming in tags:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;cm:sample&amp;gt;sample&amp;lt;/cm:sample&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 12:49:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517717#M3230</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-03T12:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517725#M3232</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/86891"&gt;@mbasharat&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try this one:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;\&amp;lt;.*\&amp;gt;(?&amp;lt;Fieldtoextract&amp;gt;.*)\&amp;lt;.*\&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 13:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517725#M3232</guid>
      <dc:creator>manuelostertag</dc:creator>
      <dc:date>2020-09-03T13:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517816#M3246</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/86891"&gt;@mbasharat&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Ah OK.&amp;nbsp; &amp;nbsp;Have you looked at the &lt;STRONG&gt;xpath&lt;/STRONG&gt; command then.&amp;nbsp; &amp;nbsp;It should automatically be able to do this for you.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.6/SearchReference/Xpath" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.6/SearchReference/Xpath&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Otherwise, using transforms.conf and props.conf configuration can be used on your search head to auto extract these fields.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;For example, on the search head(s)&lt;/P&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
[xml-extract]
REGEX = ^&amp;lt;(?:cm:)*([^\&amp;gt;]+)&amp;gt;([^&amp;lt;]+)
FORMAT = $1::$2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf (references the transforms rule)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
[...your sourcetype...]
REPORT-extractXMLfields = xml-extract&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This can be done via the search head UI too.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 20:05:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/517816#M3246</guid>
      <dc:creator>yeahnah</dc:creator>
      <dc:date>2020-09-07T20:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/518257#M3279</link>
      <description>&lt;P&gt;Thanks you!!!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Sep 2020 14:41:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Field-extraction/m-p/518257#M3279</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-07T14:41:23Z</dc:date>
    </item>
  </channel>
</rss>

