<?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: Regex expression to extract IP from a raw log file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513780#M144196</link>
    <description>&lt;P&gt;Great.&lt;/P&gt;&lt;P&gt;Up vote is rally appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Aug 2020 19:39:35 GMT</pubDate>
    <dc:creator>thambisetty</dc:creator>
    <dc:date>2020-08-12T19:39:35Z</dc:date>
    <item>
      <title>Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513769#M144187</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to extract an IP and the word "HOST_NAME" from a raw log file using the following regex expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;source="/var/tmp/test.log" | rex field=_raw "(?&amp;lt;HOST_NAME&amp;gt;) \b(?:[0-9]{1,3}\.){3}[0-9]{1,3}\b"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log file:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;EXEC_ID:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;HOST_NAME:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;172.19.20.60&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;USER_NAME:&lt;/SPAN&gt;&amp;nbsp;test&amp;nbsp;&lt;SPAN class="t"&gt;================================&lt;/SPAN&gt; &amp;nbsp;&lt;SPAN class="t"&gt;TestCaseRunner&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Summary&lt;/SPAN&gt;&lt;SPAN&gt; ----------------------------&lt;/SPAN&gt;&lt;SPAN class="t"&gt;-&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Time&lt;/SPAN&gt; &lt;SPAN class="t h"&gt;&lt;SPAN class="t"&gt;Taken&lt;/SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;13844ms&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;TestSuites:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;2&lt;/SPAN&gt; &lt;SPAN class="t a"&gt;&lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;TestCases:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;6&lt;/SPAN&gt; (&lt;SPAN class="t"&gt;0&lt;/SPAN&gt; &lt;SPAN class="t"&gt;failed&lt;/SPAN&gt;)&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;TestSteps:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;16&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Request&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Assertions:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;19&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Failed&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Assertions:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;0&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Total&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Exported&lt;/SPAN&gt; &lt;SPAN class="t"&gt;Results:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;The search results are not extracting the HOST_NAME field and the respective IP. Please suggest what should I change.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;Thank you&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:18:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513769#M144187</guid>
      <dc:creator>ssaini5</dc:creator>
      <dc:date>2020-08-12T19:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513770#M144188</link>
      <description>&lt;P&gt;| rex “HOST_NAME:\s+(?&amp;lt;HOST_NAME&amp;gt;\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})”&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:21:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513770#M144188</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-12T19:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513773#M144191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129407"&gt;@thambisetty&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply. The search is working but the field "HOST_NAME" is still not extracted as a separate field on which I can filter on further.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:27:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513773#M144191</guid>
      <dc:creator>ssaini5</dc:creator>
      <dc:date>2020-08-12T19:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513774#M144192</link>
      <description>&lt;P&gt;Try changing second hostname in rex command. Say test for example and and see if you are getting ip into it.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513774#M144192</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-12T19:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513779#M144195</link>
      <description>&lt;P&gt;That worked thanks a ton &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:38:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513779#M144195</guid>
      <dc:creator>ssaini5</dc:creator>
      <dc:date>2020-08-12T19:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex expression to extract IP from a raw log file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513780#M144196</link>
      <description>&lt;P&gt;Great.&lt;/P&gt;&lt;P&gt;Up vote is rally appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 19:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-expression-to-extract-IP-from-a-raw-log-file/m-p/513780#M144196</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-12T19:39:35Z</dc:date>
    </item>
  </channel>
</rss>

