<?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: Make field reference after a certain value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405552#M117241</link>
    <description>&lt;P&gt;Extraction of the domain field was done based on the referenced_host field.&lt;BR /&gt;
It turns out that every time the URL field comes with "HTTPS" the referenced_host field is empty, making the domain field also empty.&lt;BR /&gt;
I need every time the URL field has values ​​with "HTTPS" the domain field assumes this value and every time the URL field comes with "HTTP" values ​​the domain field assumes the values ​​of the referenced_host field.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:04:56 GMT</pubDate>
    <dc:creator>LeandroKopke</dc:creator>
    <dc:date>2020-09-30T00:04:56Z</dc:date>
    <item>
      <title>Make field reference after a certain value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405550#M117239</link>
      <description>&lt;P&gt;I have a query that has two native fields, they are "referenced_host" and "url".&lt;BR /&gt;
I performed the extraction of the "referenced_host" field by naming it as the domain.&lt;BR /&gt;
The problem is that the domain field comes empty whenever the URL field contains "HTTPS" values.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;P&gt;"Referenced_host" field value = ctldl.windowsupdate.com&lt;BR /&gt;
Domain field value = ctldl.windowsupdate.com&lt;BR /&gt;
URL field value = &lt;STRONG&gt;http&lt;/STRONG&gt;://ctldl.windowsupdate.com/msdownload/update/v3/stati (...)&lt;/P&gt;

&lt;P&gt;Example 2:&lt;/P&gt;

&lt;P&gt;Referenced_host field value = null &lt;BR /&gt;
Domain field value = null&lt;BR /&gt;
URL field value = &lt;STRONG&gt;https&lt;/STRONG&gt;://&lt;A href="http://www.facebook.com" target="_blank"&gt;www.facebook.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Would I have to make the domain field assume the value of the URL field, every time the URL field has values ​​beginning with "HTTPS"?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405550#M117239</guid>
      <dc:creator>LeandroKopke</dc:creator>
      <dc:date>2020-09-30T00:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Make field reference after a certain value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405551#M117240</link>
      <description>&lt;P&gt;How are you extracting the referenced_host field?  You probably need to modify the extraction to recognize 'https'.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 14:56:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405551#M117240</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-04-11T14:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Make field reference after a certain value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405552#M117241</link>
      <description>&lt;P&gt;Extraction of the domain field was done based on the referenced_host field.&lt;BR /&gt;
It turns out that every time the URL field comes with "HTTPS" the referenced_host field is empty, making the domain field also empty.&lt;BR /&gt;
I need every time the URL field has values ​​with "HTTPS" the domain field assumes this value and every time the URL field comes with "HTTP" values ​​the domain field assumes the values ​​of the referenced_host field.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405552#M117241</guid>
      <dc:creator>LeandroKopke</dc:creator>
      <dc:date>2020-09-30T00:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Make field reference after a certain value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405553#M117242</link>
      <description>&lt;P&gt;The referenced host field extraction should be this so you get both http and https prefixed domains:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=URL "https?:\/\/(?&amp;lt;domain&amp;gt;[^\/\s]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The "s?" in the regular expression means match 1 or 0 times so if a "s" is present it will still proceed to where the domain is located on your url.&lt;/P&gt;

&lt;P&gt;Here's a link to this picking up both domain's you listed as examples in regex101: &lt;A href="https://regex101.com/r/aFKeoc/1"&gt;https://regex101.com/r/aFKeoc/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 17:41:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-field-reference-after-a-certain-value/m-p/405553#M117242</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-04-11T17:41:46Z</dc:date>
    </item>
  </channel>
</rss>

