<?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: Dynamic field extraction with multiple values; Cisco ISE Posture checks in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139450#M38324</link>
    <description>&lt;P&gt;The following REX command should work to extract the data from the fields that you want (it could be simplified to just start from the "Passed_Conditions" portion if that makes sense for your data):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | rex field=_raw "PostureReport=([^;]+)\\;\w+\\;\(([^:]+):([^:]+):([^:]+):Passed_Conditions\[(?P&amp;lt;passedcond&amp;gt;[^\]]*)\]:Failed_Conditions\[({P&amp;lt;failedcond&amp;gt;[^\]]*)\]:Skipped_Conditions\[(?P&amp;lt;skippedcond&amp;gt;[^\]]*)\]\),"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It could also be modified to do a field extraction for the sourcetype.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Dec 2014 18:33:37 GMT</pubDate>
    <dc:creator>cpetterborg</dc:creator>
    <dc:date>2014-12-03T18:33:37Z</dc:date>
    <item>
      <title>Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139447#M38321</link>
      <description>&lt;P&gt;From our Cisco ISE we get Posture report events, each event can have multiple PostureReports. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PostureReport=Encase Service Policy\;Passed\;(Encase Service Status:Audit:Failed:Passed_Conditions[]:Failed_Conditions[Encase_Service_Check]:Skipped_Conditions[]),  PostureReport=Disk Encryption -- ActiveX Error\;Passed\;(Disk Encryption Status-ActiveX Error:Audit:Passed:Passed_Conditions[]:Failed_Conditions[Disk_Encryption_ActiveX_Error_x64:Disk_Encryption_ActiveX_Error:Disk_Encryption_ActiveX_Error_x86]:Skipped_Conditions[]),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've extracted the Status of each posture policy with a transforms.conf entry&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_posture_dynamic_ise] 
FORMAT = $1::$2 
MV_ADD = 1 
REGEX = \sPostureReport=([^\\;]+)\\;(\w+)\\;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that part works perfect. However, I now need to extract the status of the actual checks:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;;(Encase Service Status:Audit:Failed:Passed_Conditions[]:Failed_Conditions[Encase_Service_Check]:Skipped_Conditions[]),  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's what I tried doing in transforms.conf before I noticed the caveat that this won't work at search time:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[extract_posture_checks_ise]
MV_ADD=1
REGEX=\sPostureReport=([^\\;]+)\\;\w+\\;\(([^:]):([^:]):([^:]):Passed_Conditions\[(.*?)\]:Failed_Conditions\[(.*?)\]:Skipped_Conditions\[(.*)\]),
FORMAT=$2_Type::$3 $2_Status::$4  $2_Passed_Conditions::$5  $2_Failed_Conditions::$6  $2_Skipped_Conditions::$7
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can this be done through a different method? &lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 14:52:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139447#M38321</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2014-12-03T14:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139448#M38322</link>
      <description>&lt;P&gt;When you say "this won't work at search time," do you mean that you don't want to do it at indexing time, but you want to do either a field extraction, or use a rex command in the search?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 16:32:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139448#M38322</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2014-12-03T16:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139449#M38323</link>
      <description>&lt;P&gt;Correct, I'd rather not add an index time field extraction. &lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139449#M38323</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2014-12-03T18:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139450#M38324</link>
      <description>&lt;P&gt;The following REX command should work to extract the data from the fields that you want (it could be simplified to just start from the "Passed_Conditions" portion if that makes sense for your data):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | rex field=_raw "PostureReport=([^;]+)\\;\w+\\;\(([^:]+):([^:]+):([^:]+):Passed_Conditions\[(?P&amp;lt;passedcond&amp;gt;[^\]]*)\]:Failed_Conditions\[({P&amp;lt;failedcond&amp;gt;[^\]]*)\]:Skipped_Conditions\[(?P&amp;lt;skippedcond&amp;gt;[^\]]*)\]\),"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It could also be modified to do a field extraction for the sourcetype.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139450#M38324</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2014-12-03T18:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139451#M38325</link>
      <description>&lt;P&gt;The issue is that each event can have a dozen PostureReport lines,  which is why I need the fileds to be dynamically named based on the name of the check (capture group 2 in your example).    &lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139451#M38325</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2014-12-03T18:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139452#M38326</link>
      <description>&lt;P&gt;Can you provide an example?&lt;/P&gt;

&lt;P&gt;BTW - I have a typo in the rex - ({P should be (?P for the failedcond field.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139452#M38326</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2014-12-03T18:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic field extraction with multiple values; Cisco ISE Posture checks</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139453#M38327</link>
      <description>&lt;P&gt;The first box of code in my question, is an excerpt from a single event. It shows the PostureReport for two of the checks, there are about a dozen per event. The checks can be be added and removed based on policy, so the solution need to be dynamic to handle those changes.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 18:49:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamic-field-extraction-with-multiple-values-Cisco-ISE-Posture/m-p/139453#M38327</guid>
      <dc:creator>solarboyz1</dc:creator>
      <dc:date>2014-12-03T18:49:28Z</dc:date>
    </item>
  </channel>
</rss>

