<?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 use join fields? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605627#M105279</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields ip host_name count earliest_error latest_error&lt;/LI-CODE&gt;&lt;P&gt;If the subsearch finds the ip addresses (and they are an exact match for the ip address in the outer search), then the host_name field should have the host name returned by the subsearch.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2022 15:33:33 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-07-14T15:33:33Z</dc:date>
    <item>
      <title>How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605456#M105244</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;
&lt;P&gt;I struggled badly trying to get this solved, but no luck?&lt;/P&gt;
&lt;P&gt;I need to join to a different search using the ip_address to get the host name :&lt;/P&gt;
&lt;P&gt;Base search for the join: index= X&amp;nbsp; sourcetype=server&amp;nbsp; dv_ir=4311.00.&lt;BR /&gt;The dv_name field is the host name and the dv_ip_address is the ip_address.&lt;/P&gt;
&lt;P&gt;Any help will be appreciated.&lt;/P&gt;
&lt;P&gt;Thank you all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605456#M105244</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T15:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using join fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605457#M105245</link>
      <description>&lt;P&gt;It is not clear which events you are trying to "join" with which - where do these events come from - can you use a lookup to find the host name?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 14:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605457#M105245</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T14:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Using join fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605460#M105248</link>
      <description>&lt;P&gt;Thanks for your fast response!&lt;/P&gt;&lt;P&gt;The only thing that I'm struggling to get is the host name, So This is what I have so far:&lt;/P&gt;&lt;P&gt;index=app&amp;nbsp; sourcetype=pw:ws "Failed handshake due to exhausted 15 seconds timeout on channel" earliest=06/16/2022:00:00:00&lt;/P&gt;&lt;P&gt;| rex field=_raw "(R:\/)(?&amp;lt;ip&amp;gt;[\d.]*)(:8609)"&lt;/P&gt;&lt;P&gt;| stats earliest(_time) as E_error latest(_time) as L_error count by ip&lt;/P&gt;&lt;P&gt;| join type=left ip [| search earliest=-24h &lt;SPAN&gt;&amp;nbsp;index= X&amp;nbsp; sourcetype=server&amp;nbsp; dv_ir=4311.00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;| stats latest(dv_name) as host_name by dv_ip_address&lt;/P&gt;&lt;P&gt;| rename dv_ip_address as ip]&lt;/P&gt;&lt;P&gt;| eval E_error=strftime(E_error,"%m/%d/%Y %H:%M:%S"),&amp;nbsp; L_error=strftime(L_error,"%m/%d/%Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;| fields host count E_error L_error&lt;/P&gt;&lt;P&gt;Just to clarify, what I'm trying to do in here is to create a new alert in the custom email template to notify if we receive handshake errors in the web logs. I had some of these errors on 5/20, so I need to adjust the time range to build/test the search and alert, for all of these I need to parse the ip_address out of the raw data.&lt;/P&gt;&lt;P&gt;The alert should display : the host, number of handshake, time of first instance error on the host, and time of the recent error on the host.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605460#M105248</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T15:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using join fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605462#M105250</link>
      <description>&lt;P&gt;What is this line supposed to be doing&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(hostname) by ip_addresses&lt;/LI-CODE&gt;&lt;P&gt;because after that dv_ip_address no longer exists so there is nothing to rename&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605462#M105250</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T15:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using join fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605463#M105251</link>
      <description>&lt;P&gt;I edited that already if you refresh you won't see it, that was a mistake.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605463#M105251</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T15:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using join fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605466#M105253</link>
      <description>&lt;P&gt;&lt;SPAN&gt;| fields host_name count E_error L_error&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605466#M105253</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T15:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605469#M105254</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screen.PNG" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20511i2F52A0AEEAA8F881/image-size/medium?v=v2&amp;amp;px=400" role="button" title="screen.PNG" alt="screen.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 15:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605469#M105254</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T15:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605471#M105256</link>
      <description>&lt;P&gt;What search did you use for that result?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605471#M105256</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T16:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605472#M105257</link>
      <description>&lt;P&gt;This is the search:&lt;/P&gt;&lt;P&gt;| rex field=_raw "(R:\/)(?&amp;lt;ip&amp;gt;[\d.]*)(:8609)"&lt;/P&gt;&lt;P&gt;| stats earliest(_time) as earliest_error latest(_time) as latest_error count by ip&lt;/P&gt;&lt;P&gt;| join type=left ip [| search earliest=-24h index=inventory_snow &lt;SPAN&gt;&amp;nbsp;index= X&amp;nbsp; sourcetype=server&amp;nbsp; dv_ir=4311.00&lt;/SPAN&gt;&lt;BR /&gt;| stats latest(dv_name) as host by dv_ip_address&lt;BR /&gt;| rename dv_ip_address as ip]&lt;/P&gt;&lt;P&gt;| eval earliest_error=strftime(earliest_error,"%m/%d/%Y %H:%M:%S"),&amp;nbsp; latest_error=strftime(latest_error,"%m/%d/%Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;| fields host count earliest_error latest_error&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:12:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605472#M105257</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T16:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605475#M105259</link>
      <description>&lt;P&gt;Does this give you any host names for the ip addresses you are interested in?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-24h index=inventory_snow  index= X  sourcetype=server  dv_ir=4311.00
| stats latest(dv_name) as host by dv_ip_address
| rename dv_ip_address as ip&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:16:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605475#M105259</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T16:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605478#M105260</link>
      <description>&lt;P&gt;It does not, it gives only field host .&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605478#M105260</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T16:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605479#M105261</link>
      <description>&lt;P&gt;host is a field used by Splunk usually for the host the event originated on - try a different name&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-24h index=inventory_snow  index= X  sourcetype=server  dv_ir=4311.00
| stats latest(dv_name) as host_name by dv_ip_address
| rename dv_ip_address as ip&lt;/LI-CODE&gt;&lt;P&gt;If you still don't get any host names in host_name, you need to look at your data in index X&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605479#M105261</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-13T16:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605483#M105264</link>
      <description>&lt;P&gt;The host name will not be available in the web logs, that's why I&amp;nbsp; join to a different search using the ip_address to get the host name, even doing all of that still no luck!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 16:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605483#M105264</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-13T16:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605595#M105273</link>
      <description>&lt;P&gt;Thanks ITWhisperer,&lt;/P&gt;&lt;P&gt;Just as an update, the field that I need to join on need to have the same exact name.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 13:42:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605595#M105273</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-14T13:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605599#M105274</link>
      <description>&lt;P&gt;No, they don't have to be the same, but, if they are not the same, you need to show which field from the left is joined to which field on the right&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.0/SearchReference/Join" target="_blank"&gt;join - Splunk Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 14:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605599#M105274</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-14T14:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605611#M105275</link>
      <description>&lt;P&gt;Thanks again for your quick response, please take a look at this:&lt;/P&gt;&lt;P&gt;index=X sourcetype=Y "Failed handshake due to exhausted 10 seconds timeout on channel" earliest=06/16/2022:00:00:00&lt;/P&gt;&lt;P&gt;| rex field=_raw "(R:\/)(?&amp;lt;ip&amp;gt;[\d.]*)(:8609)"&lt;/P&gt;&lt;P&gt;| stats earliest(_time) as earliest_error latest(_time) as latest_error count by ip&lt;/P&gt;&lt;P&gt;| join type=left ip [| search earliest=-24h index=A&amp;nbsp; sourcetype=B&amp;nbsp; dv_u_eir=4311.00&lt;/P&gt;&lt;P&gt;| stats latest(dv_name) as host by dv_ip_address&lt;/P&gt;&lt;P&gt;| rename dv_ip_address as ip]&lt;/P&gt;&lt;P&gt;| eval earliest_error=strftime(earliest_error,"%m/%d/%Y %H:%M:%S"),&amp;nbsp; latest_error=strftime(latest_error,"%m/%d/%Y %H:%M:%S")&lt;/P&gt;&lt;P&gt;| fields host count earliest_error latest_error&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 14:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605611#M105275</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-14T14:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605614#M105276</link>
      <description>&lt;P&gt;Don't use host as your field name as this is already used by Splunk, chose a different name&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=X sourcetype=Y "Failed handshake due to exhausted 10 seconds timeout on channel" earliest=06/16/2022:00:00:00
| rex field=_raw "(R:\/)(?&amp;lt;ip&amp;gt;[\d.]*)(:8609)"
| stats earliest(_time) as earliest_error latest(_time) as latest_error count by ip
| join type=left ip [| search earliest=-24h index=A  sourcetype=B  dv_u_eir=4311.00
| stats latest(dv_name) as host_name by dv_ip_address
| rename dv_ip_address as ip]
| eval earliest_error=strftime(earliest_error,"%m/%d/%Y %H:%M:%S"),  latest_error=strftime(latest_error,"%m/%d/%Y %H:%M:%S")
| fields host_name count earliest_error latest_error&lt;/LI-CODE&gt;&lt;P&gt;Check that your subsearch actually finds the ip addresses you are expecting to be there&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;earliest=-24h index=A  sourcetype=B  dv_u_eir=4311.00
| stats latest(dv_name) as host_name by dv_ip_address
| rename dv_ip_address as ip&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Jul 2022 14:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605614#M105276</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-14T14:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605625#M105278</link>
      <description>&lt;P&gt;The subsearch actually finds the IP addresses that I'm looking for and everything looks great&amp;nbsp;until the last line where I have :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| fields host_name count earliest_error latest_error&amp;nbsp; at this point the IP address changed to host_name with no output on the host_name field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 15:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605625#M105278</guid>
      <dc:creator>majilan1</dc:creator>
      <dc:date>2022-07-14T15:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use join fields?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605627#M105279</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields ip host_name count earliest_error latest_error&lt;/LI-CODE&gt;&lt;P&gt;If the subsearch finds the ip addresses (and they are an exact match for the ip address in the outer search), then the host_name field should have the host name returned by the subsearch.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 15:33:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-use-join-fields/m-p/605627#M105279</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-14T15:33:33Z</dc:date>
    </item>
  </channel>
</rss>

