<?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: Windows Event Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170378#M48744</link>
    <description>&lt;P&gt;Looks like there's twice as many backslashes as you need.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Aug 2014 06:59:42 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-08-05T06:59:42Z</dc:date>
    <item>
      <title>Windows Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170377#M48743</link>
      <description>&lt;P&gt;I am having a problem with field extraction of some Windows event logs. I have an example log below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;08/05/2014 09:59:00 AM
LogName=Security
SourceName=Microsoft Windows security auditing.
EventCode=4887
EventType=0
Type=Information
ComputerName=issuingca.my.domain
TaskCategory=Certification Services
OpCode=Info
RecordNumber=1981173
Keywords=Audit Success
Message=Certificate Services approved a certificate request and issued a certificate.

Request ID: 5001
Requester:  my\user1
Attributes: 
CertificateTemplate:DomainInternalIPSECv1 

ccm:issuingca.my.domain
Disposition:    3
SKI:    aa aa d2 64 ef a1 46 0f e2 2e 92 aa ce ec 1d 81 99 4b aa aa
Subject:    CN=TestSubject
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if I search for this and use rex to extract the fields I don't get any problem. Example below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="ca_logs" host="issuingca*" EventCode=4887 | rex "(?ms)EventCode=4887\s*\n.*Message=Certificate Services (?&amp;lt;action&amp;gt;.*?)[:\.]\s*\n.*?Requester:\s*(?&amp;lt;requester_domain&amp;gt;[^\\\\]+)\\\\(?&amp;lt;requester_name&amp;gt;.*?)\s*\n.*CertificateTemplate:(?&amp;lt;certificate_template&amp;gt;.*?)\s*\n.*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Running the above, I extract the fields I'm expecting. I get:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;action&lt;/LI&gt;
&lt;LI&gt;requester_domain&lt;/LI&gt;
&lt;LI&gt;requester_name&lt;/LI&gt;
&lt;LI&gt;certificate_template&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;So I then create a new field extraction on Splunk web. Settings &amp;gt; Fields &amp;gt; field extractions &amp;gt; New.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Destination app = activedirectory
Name = 4887-fields
Apply to = sourcetype = WinEventLog:Security
Type = inline
Extraction/Transform = (?ms)EventCode=4887\s*\n.*Message=Certificate Services (?&amp;lt;msad_action&amp;gt;.*?)[:\.]\s*\n.*?Requester:\s*(?&amp;lt;requester_domain&amp;gt;[^\\\\]+)\\\\(?&amp;lt;requester_name&amp;gt;.*?)\s*\n.*CertificateTemplate:(?&amp;lt;certificate_template&amp;gt;.*?)\s*\n.*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It creates a new rule called "WinEventLog:Security : EXTRACT-4887-fields". But when I search "index="ca_logs" host="issuingca*" EventCode=4887", I don't get the field extraction occurring. I've set the permissions so that its available to the activedirectory application (this app only instead of private). Can anyone shed light on what I'm doing wrong?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 01:15:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170377#M48743</guid>
      <dc:creator>conor_splunk</dc:creator>
      <dc:date>2014-08-05T01:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170378#M48744</link>
      <description>&lt;P&gt;Looks like there's twice as many backslashes as you need.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 06:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170378#M48744</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-05T06:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Event Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170379#M48745</link>
      <description>&lt;P&gt;How do I mark your comment as an answer?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Aug 2014 09:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Windows-Event-Field-Extraction/m-p/170379#M48745</guid>
      <dc:creator>conor_splunk</dc:creator>
      <dc:date>2014-08-05T09:06:49Z</dc:date>
    </item>
  </channel>
</rss>

