<?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: Add field from the returns of another query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570159#M198722</link>
    <description>&lt;P&gt;From your simplistic description, all I can suggest is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search 1
| join app_name [search 2]&lt;/LI-CODE&gt;&lt;P&gt;If this doesn't work, you will need to provide more detail of what you are actually doing&lt;/P&gt;</description>
    <pubDate>Fri, 08 Oct 2021 04:12:43 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-10-08T04:12:43Z</dc:date>
    <item>
      <title>Add field from the returns of another query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570157#M198721</link>
      <description>&lt;P&gt;I am trying to produce the following output :&lt;/P&gt;&lt;TABLE border="1" width="43.77204353578629%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;app_name&lt;/TD&gt;&lt;TD width="25%"&gt;request_id&lt;/TD&gt;&lt;TD width="12.5%"&gt;time&lt;/TD&gt;&lt;TD width="1.290322580645162%"&gt;workload at the time(requests per second)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;App1&lt;/TD&gt;&lt;TD width="25%"&gt;123&lt;/TD&gt;&lt;TD width="12.5%"&gt;1000&lt;/TD&gt;&lt;TD width="1.290322580645162%"&gt;?&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;App2&lt;/TD&gt;&lt;TD width="25%"&gt;1234&lt;/TD&gt;&lt;TD width="12.5%"&gt;1000&lt;/TD&gt;&lt;TD width="1.290322580645162%"&gt;?&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two queries that return :&lt;/P&gt;&lt;P&gt;1. A table with the requests taking the most time&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;app_name&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;request_id&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;app1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Numeric value that returns the requests per second for a given app&lt;/P&gt;&lt;TABLE border="1" width="44.44444619455645%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;app_name&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;requests per second&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;app1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I join the results from two different queries to produce the final table above?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 00:25:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570157#M198721</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2021-10-08T00:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add field from the returns of another query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570159#M198722</link>
      <description>&lt;P&gt;From your simplistic description, all I can suggest is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search 1
| join app_name [search 2]&lt;/LI-CODE&gt;&lt;P&gt;If this doesn't work, you will need to provide more detail of what you are actually doing&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 04:12:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570159#M198722</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-08T04:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add field from the returns of another query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570237#M198749</link>
      <description>&lt;P&gt;This is what I tried but that does not return any result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;index=myIndex method!=GET process="end" | join app_name [search index=&lt;SPAN&gt;myIndex&lt;/SPAN&gt;&amp;nbsp; method!=GET process="start" | timechart count by app_name | timechart per_second(*) ]&lt;BR /&gt;| table _time app_name&amp;nbsp;&lt;SPAN&gt;request_id&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 14:23:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570237#M198749</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2021-10-08T14:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add field from the returns of another query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570245#M198754</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myIndex method!=GET process="end" 
| bin _time span=1s
| join _time app_name [search index=myIndex  method!=GET process="start" 
  | timechart span=1s count by app_name 
  | timechart span=1s per_second(*) as *
  | untable _time app_name per_second ]
| table _time app_name request_id per_second&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Oct 2021 14:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570245#M198754</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-08T14:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add field from the returns of another query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570254#M198759</link>
      <description>&lt;P&gt;Thank you for the suggestion. I tried that but it returned :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[subsearch]: The specified span would result in too many (&amp;gt;50000) rows.&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class="job-status-container"&gt;&lt;DIV class="shared-jobstatus"&gt;&lt;DIV class="jobstatus-grouping"&gt;&lt;DIV class="jobstatus-status-grouping"&gt;&lt;DIV class="status shared-jobstatus-count"&gt;And no results. It seems that the only way it works is if I run it in a smaller time range (the individual queries work fine under a longer range)&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;Perhaps we could group the requests per second over a longer timeframe (for example, report of the last n minutes) is that possible?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;Also, in some instances, the requests per second field is returning 0 which does not make any sense. Is there some rounding going on?&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;Also, if possible, could you please break down the query so that I understand your reasoning?&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="status shared-jobstatus-count"&gt;Thank you again!&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:57:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Add-field-from-the-returns-of-another-query/m-p/570254#M198759</guid>
      <dc:creator>yk010123</dc:creator>
      <dc:date>2021-10-08T15:57:47Z</dc:date>
    </item>
  </channel>
</rss>

