<?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 Trouble with Field Extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47639#M11372</link>
    <description>&lt;P&gt;I am attempting to pull information from multiple eventtypes into 1 field called ext_ip&lt;BR /&gt;
I can get two of them, but I can not seem to include the third eventtype in my RegEx. &lt;/P&gt;

&lt;P&gt;These are the eventtypes: &lt;/P&gt;

&lt;P&gt;(1) Nov  7 11:39:58 bigip03-91 GATEWAY src - &lt;STRONG&gt;67.43.81.117&lt;/STRONG&gt;:1838 INT 33076, LB - 63.75.62.13 - &lt;A href="http://www.website.com" target="_blank"&gt;www.website.com&lt;/A&gt; - 10.207.220.104&lt;/P&gt;

&lt;P&gt;(2) Nov  7 11:52:17 bigip03-91 FIX invalidClient DENIED - &lt;STRONG&gt;192.193.204.151&lt;/STRONG&gt;:1855&lt;/P&gt;

&lt;P&gt;(3) Nov 28 11:17:06 bigip03-91 | event=FIX_OUT_DEST_CLOSED_TO_LB|source=10.207.200.32:52818|dest_server_ip_port=&lt;STRONG&gt;76.8.66.33&lt;/STRONG&gt;:6506&lt;/P&gt;

&lt;P&gt;In this case the information that would be in these fields are IP addresses as follows:&lt;/P&gt;

&lt;P&gt;ext_ip=67.43.81.117&lt;/P&gt;

&lt;P&gt;ext_ip=192.193.204.151&lt;/P&gt;

&lt;P&gt;ext_ip=76.8.66.33&lt;/P&gt;

&lt;P&gt;This is the RegEx I am using: &lt;BR /&gt;
(src|DENIED)\s-\s(?&amp;lt;"ext_ip"&amp;gt;\d+.\d+.\d+.\d+)&lt;/P&gt;

&lt;P&gt;As you can see, I can get the two even types, but not the third event type IP address into this field "ext_ip". does anyone have any suggestions? &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:52:46 GMT</pubDate>
    <dc:creator>tmarlette</dc:creator>
    <dc:date>2020-09-28T12:52:46Z</dc:date>
    <item>
      <title>Trouble with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47639#M11372</link>
      <description>&lt;P&gt;I am attempting to pull information from multiple eventtypes into 1 field called ext_ip&lt;BR /&gt;
I can get two of them, but I can not seem to include the third eventtype in my RegEx. &lt;/P&gt;

&lt;P&gt;These are the eventtypes: &lt;/P&gt;

&lt;P&gt;(1) Nov  7 11:39:58 bigip03-91 GATEWAY src - &lt;STRONG&gt;67.43.81.117&lt;/STRONG&gt;:1838 INT 33076, LB - 63.75.62.13 - &lt;A href="http://www.website.com" target="_blank"&gt;www.website.com&lt;/A&gt; - 10.207.220.104&lt;/P&gt;

&lt;P&gt;(2) Nov  7 11:52:17 bigip03-91 FIX invalidClient DENIED - &lt;STRONG&gt;192.193.204.151&lt;/STRONG&gt;:1855&lt;/P&gt;

&lt;P&gt;(3) Nov 28 11:17:06 bigip03-91 | event=FIX_OUT_DEST_CLOSED_TO_LB|source=10.207.200.32:52818|dest_server_ip_port=&lt;STRONG&gt;76.8.66.33&lt;/STRONG&gt;:6506&lt;/P&gt;

&lt;P&gt;In this case the information that would be in these fields are IP addresses as follows:&lt;/P&gt;

&lt;P&gt;ext_ip=67.43.81.117&lt;/P&gt;

&lt;P&gt;ext_ip=192.193.204.151&lt;/P&gt;

&lt;P&gt;ext_ip=76.8.66.33&lt;/P&gt;

&lt;P&gt;This is the RegEx I am using: &lt;BR /&gt;
(src|DENIED)\s-\s(?&amp;lt;"ext_ip"&amp;gt;\d+.\d+.\d+.\d+)&lt;/P&gt;

&lt;P&gt;As you can see, I can get the two even types, but not the third event type IP address into this field "ext_ip". does anyone have any suggestions? &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:52:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47639#M11372</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2020-09-28T12:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47640#M11373</link>
      <description>&lt;P&gt;You'll need to account for the equals sign in the third type. A regex might look like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;((src|DENIED)\s-\s|dest_server_ip_port\=)(?&amp;lt;"ext_ip"&amp;gt;\d+.\d+.\d+.\d+)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Another way to approach it is to create a second rule &lt;EM&gt;also&lt;/EM&gt; capturing a field called ext_ip, which expressly matches the dest_server_ip_port= preface string. There's no reason you can't use separate rules to extract the same field. If the regex doesn't match (i.e., the regex for line types #1 and #2 won't match for line type #3), it won't extract any fields. In this way, you can capture the two distinct sets of log events with a union of extraction rules.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 16:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47640#M11373</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-11-28T16:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Field Extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47641#M11374</link>
      <description>&lt;P&gt;I actually figured it out. &lt;/P&gt;

&lt;P&gt;This is the answer:&lt;BR /&gt;
(src\s-\s|DENIED\s-\s|port=|server=)(?&lt;EXT_IP&gt;\d+.\d+.\d+.\d+)&lt;/EXT_IP&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 17:10:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trouble-with-Field-Extraction/m-p/47641#M11374</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2012-11-28T17:10:04Z</dc:date>
    </item>
  </channel>
</rss>

