<?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 write a search to extract an IP address after a line within a Windows security event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-extract-an-IP-address-after-a-line/m-p/128400#M34850</link>
    <description>&lt;P&gt;Use a Regex, like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bla "something to search" | rex field=_raw "x-ms-forwarded-client-ip (?P&amp;lt;clientIP&amp;gt;(\d{1,3}\.){3}\d{1,3})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you can see that a new field, named &lt;CODE&gt;clientIP&lt;/CODE&gt;, will be available for you.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;</description>
    <pubDate>Fri, 21 Nov 2014 01:10:34 GMT</pubDate>
    <dc:creator>musskopf</dc:creator>
    <dc:date>2014-11-21T01:10:34Z</dc:date>
    <item>
      <title>How to write a search to extract an IP address after a line within a Windows security event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-extract-an-IP-address-after-a-line/m-p/128399#M34849</link>
      <description>&lt;P&gt;Hello, I have the following:&lt;/P&gt;

&lt;P&gt;11/20/2014 11:04:58 AM &lt;BR /&gt;
LogName=Security &lt;BR /&gt;
SourceName=AD FS 2.0 Auditing &lt;BR /&gt;
EventCode=501&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
&lt;A href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip&lt;/A&gt; &lt;BR /&gt;
1.1.1.1&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;/P&gt;

&lt;P&gt;How can I construct a query to get the IP address in the result ?  I am looking for a way to get data in the line after &lt;A href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip"&gt;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-forwarded-client-ip&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 00:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-extract-an-IP-address-after-a-line/m-p/128399#M34849</guid>
      <dc:creator>pyi</dc:creator>
      <dc:date>2014-11-21T00:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a search to extract an IP address after a line within a Windows security event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-extract-an-IP-address-after-a-line/m-p/128400#M34850</link>
      <description>&lt;P&gt;Use a Regex, like that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=bla "something to search" | rex field=_raw "x-ms-forwarded-client-ip (?P&amp;lt;clientIP&amp;gt;(\d{1,3}\.){3}\d{1,3})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now you can see that a new field, named &lt;CODE&gt;clientIP&lt;/CODE&gt;, will be available for you.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2014 01:10:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-search-to-extract-an-IP-address-after-a-line/m-p/128400#M34850</guid>
      <dc:creator>musskopf</dc:creator>
      <dc:date>2014-11-21T01:10:34Z</dc:date>
    </item>
  </channel>
</rss>

