<?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: Why am I not able to join my search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256027#M76663</link>
    <description>&lt;P&gt;I would recommed a two-part search.&lt;/P&gt;

&lt;P&gt;1) Create a lookup table OR kvstore, with only the hosts from your subsearch. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx2_* sourcetype=ps1 |dedup host | table host cluster | outputlookup hostlist.csv 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can schedule this to run at a certain frequency (how often do you add new hosts). You can the use this lookup to append cluster info, like this. You could also add the cluster info as an automatic lookup&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx* sourcetype=Uptime host="*bd*" SystemUpTime&amp;gt;300
  | eval difference=(_time - SystemUpTime)
  | eval c_time=strftime(difference,"%Y-%m-%d %H:%M:%S")
  | lookup hostlist.csv host OUTPUT cluster 
  | table host cluster
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Outputlookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Outputlookup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 17:54:47 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-07-14T17:54:47Z</dc:date>
    <item>
      <title>Why am I not able to join my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256024#M76660</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Why we are not able to join my search? Can you please suggest how to edit this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx* sourcetype=Uptime host="*bd*" SystemUpTime&amp;gt;300
| eval difference=(_time - SystemUpTime)
| eval c_time=strftime(difference,"%Y-%m-%d %H:%M:%S")
|join host [search index=idx2_* sourcetype=ps1 |dedup host ]|table host c_time cluster
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256024#M76660</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-14T17:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I not able to join my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256025#M76661</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;selfjoin&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx* sourcetype=Uptime host="*bd*" SystemUpTime&amp;gt;300
 | eval difference=(_time - SystemUpTime)
 | eval c_time=strftime(difference,"%Y-%m-%d %H:%M:%S")
 |selfjoin host [search index=idx2_* sourcetype=ps1 |dedup host ]|table host c_time cluster
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256025#M76661</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-14T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I not able to join my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256026#M76662</link>
      <description>&lt;P&gt;Is there any other we can join this, join taking long time to give results.?  &lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256026#M76662</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-14T17:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I not able to join my search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256027#M76663</link>
      <description>&lt;P&gt;I would recommed a two-part search.&lt;/P&gt;

&lt;P&gt;1) Create a lookup table OR kvstore, with only the hosts from your subsearch. Like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx2_* sourcetype=ps1 |dedup host | table host cluster | outputlookup hostlist.csv 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can schedule this to run at a certain frequency (how often do you add new hosts). You can the use this lookup to append cluster info, like this. You could also add the cluster info as an automatic lookup&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx* sourcetype=Uptime host="*bd*" SystemUpTime&amp;gt;300
  | eval difference=(_time - SystemUpTime)
  | eval c_time=strftime(difference,"%Y-%m-%d %H:%M:%S")
  | lookup hostlist.csv host OUTPUT cluster 
  | table host cluster
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Outputlookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Outputlookup&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Lookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.1/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:54:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-not-able-to-join-my-search/m-p/256027#M76663</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-14T17:54:47Z</dc:date>
    </item>
  </channel>
</rss>

