<?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 join this search with our existing search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252328#M75493</link>
    <description>&lt;P&gt;Can you confirm if the subsearch is returning result and is matching with main search?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx1  sourcetype=load host="*" ut=*|stats count by host ut | table host ut| rename host as dns_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jul 2016 17:52:20 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-07-12T17:52:20Z</dc:date>
    <item>
      <title>How to join this search with our existing search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252324#M75489</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Need help on a Splunk subsearch.&lt;/P&gt;

&lt;P&gt;Below is our Splunk basic search which gives us few fields if it satisfies the below condition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx sourcetype=jobs NOT "User has reached the per-user job slot limit of the queue" 
|rex field=_raw "loadSched(?&amp;lt;loadSchedule&amp;gt;[\waA-zZ0-9\s\-\.]+)loadStop"
| rex field=loadSchedule "[\d\.\-\s*]{6}(?&amp;lt;util&amp;gt;[\d\.]+)\s"
|fillnull value=0
|rename host to dns_name
    | join type=left dns_name [|inputlookup sas_servers.csv|eval dns_name=lower(dns_name)] 
| search Environment="IPC2 Loyalty"
    | eval totalCount=if(status!="" OR status!=0, jobId, null()) 
| eval pend= if(status="PEND", jobId, null())
| eventstats dc(totalCount) as totalCount, dc(pend) as pend
| eval  pct=(pend/totalCount)*100  
| eval  pct=round(pct,2) 
| eval  PendingPerc=(pct + "%")
| search status="PEND"
| dedup jobId
| rename pend as Totalpendcount
|where pend&amp;gt;25
| table _time dns_name Environment jobId queue status user Totalpendcount util
| rename _time as "Job Submitted"
| convert ctime("Job Submitted")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, we have another search below: where we have extracted field name &lt;STRONG&gt;UT&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx1  sourcetype=load host="*" ut=*|rename host as dns_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;We need to join this search to the above search such that our table should get values of UT (we need to join this search with host (dns_name) and _time field):&lt;/P&gt;

&lt;P&gt;Can some one please help us in getting results for the UT field?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2016 21:09:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252324#M75489</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-11T21:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to join this search with our existing search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252325#M75490</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx sourcetype=jobs NOT "User has reached the per-user job slot limit of the queue" 
 |rex field=_raw "loadSched(?&amp;lt;loadSchedule&amp;gt;[\waA-zZ0-9\s\-\.]+)loadStop"
 | rex field=loadSchedule "[\d\.\-\s*]{6}(?&amp;lt;util&amp;gt;[\d\.]+)\s"
 |fillnull value=0
 |rename host to dns_name
     | join type=left dns_name [|inputlookup sas_servers.csv|eval dns_name=lower(dns_name)] 
 | search Environment="IPC2 Loyalty"
     | eval totalCount=if(status!="" OR status!=0, jobId, null()) 
 | eval pend= if(status="PEND", jobId, null())
 | eventstats dc(totalCount) as totalCount, dc(pend) as pend
 | eval  pct=(pend/totalCount)*100  
 | eval  pct=round(pct,2) 
 | eval  PendingPerc=(pct + "%")
 | search status="PEND"
 | dedup jobId
 | rename pend as Totalpendcount
 |where pend&amp;gt;25
 | table _time dns_name Environment jobId queue status user Totalpendcount util 
| join type=left dns_name [search  index=idx1  sourcetype=load host="*" ut=*|stats count by host ut | table host ut| rename host as dns_name]
 | rename _time as "Job Submitted"
 | convert ctime("Job Submitted")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Jul 2016 21:21:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252325#M75490</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-11T21:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to join this search with our existing search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252326#M75491</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;base search | appendcols [ search index=idx1  sourcetype=load host="*" ut=*|rename host as dns_name | table dns_name, ut ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jul 2016 11:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252326#M75491</guid>
      <dc:creator>Stevelim</dc:creator>
      <dc:date>2016-07-12T11:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to join this search with our existing search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252327#M75492</link>
      <description>&lt;P&gt;Thanks Somesh, now UT field is appended to my table, but I could'nt see any values for UT field.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 17:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252327#M75492</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-12T17:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to join this search with our existing search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252328#M75493</link>
      <description>&lt;P&gt;Can you confirm if the subsearch is returning result and is matching with main search?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=idx1  sourcetype=load host="*" ut=*|stats count by host ut | table host ut| rename host as dns_name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jul 2016 17:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-this-search-with-our-existing-search/m-p/252328#M75493</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-07-12T17:52:20Z</dc:date>
    </item>
  </channel>
</rss>

