<?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 How to display last 24 hours data with query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103241#M26674</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
i have my results :&lt;/P&gt;

&lt;P&gt;Host   |     max(usage)&lt;/P&gt;

&lt;P&gt;ABC    |     100&lt;/P&gt;

&lt;P&gt;xyz    |     200&lt;/P&gt;

&lt;P&gt;I want to add new column in table with max(usage) in last 24 hours by host.&lt;/P&gt;

&lt;P&gt;| Max usage (last 24 hours)&lt;/P&gt;

&lt;P&gt;|      90&lt;BR /&gt;&lt;BR /&gt;
|     200&lt;/P&gt;

&lt;P&gt;I am using following query :&lt;BR /&gt;
index="power" sourcetype="power_usage" | join [ search index="power" sourcetype="power_usage" earliest=-24h | stats max(Power_consumption) by host ]| chart max(Power_consumption) over host&lt;/P&gt;

&lt;P&gt;Following error occur wit the query:-&lt;BR /&gt;
[subsearch]: Your timerange was substituted based on your search string&lt;/P&gt;

&lt;P&gt;If any body knows the solution, please let me know.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:34:20 GMT</pubDate>
    <dc:creator>geetanjali</dc:creator>
    <dc:date>2020-09-28T09:34:20Z</dc:date>
    <item>
      <title>How to display last 24 hours data with query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103241#M26674</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
i have my results :&lt;/P&gt;

&lt;P&gt;Host   |     max(usage)&lt;/P&gt;

&lt;P&gt;ABC    |     100&lt;/P&gt;

&lt;P&gt;xyz    |     200&lt;/P&gt;

&lt;P&gt;I want to add new column in table with max(usage) in last 24 hours by host.&lt;/P&gt;

&lt;P&gt;| Max usage (last 24 hours)&lt;/P&gt;

&lt;P&gt;|      90&lt;BR /&gt;&lt;BR /&gt;
|     200&lt;/P&gt;

&lt;P&gt;I am using following query :&lt;BR /&gt;
index="power" sourcetype="power_usage" | join [ search index="power" sourcetype="power_usage" earliest=-24h | stats max(Power_consumption) by host ]| chart max(Power_consumption) over host&lt;/P&gt;

&lt;P&gt;Following error occur wit the query:-&lt;BR /&gt;
[subsearch]: Your timerange was substituted based on your search string&lt;/P&gt;

&lt;P&gt;If any body knows the solution, please let me know.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:34:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103241#M26674</guid>
      <dc:creator>geetanjali</dc:creator>
      <dc:date>2020-09-28T09:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display last 24 hours data with query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103242#M26675</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I don't have the answer, but I can see a problem with the join function. It needs the field-list parameter as you can see in &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Join"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Join&lt;/A&gt;. In other word, you need to join your subsearch to something and the "field-list" is the common link between both search.&lt;/P&gt;

&lt;P&gt;Hope it helps.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Olivier&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 13:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103242#M26675</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2011-05-17T13:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to display last 24 hours data with query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103243#M26676</link>
      <description>&lt;P&gt;By the way, have you tried the eventstats function? It attaches a summary statistics to each event.&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Olivier&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 13:54:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103243#M26676</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2011-05-17T13:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to display last 24 hours data with query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103244#M26677</link>
      <description>&lt;P&gt;Olivier is right eventstats might be a more appropriate command than "join" i suggested to you in another thread&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2011 13:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-display-last-24-hours-data-with-query/m-p/103244#M26677</guid>
      <dc:creator>MarioM</dc:creator>
      <dc:date>2011-05-17T13:59:55Z</dc:date>
    </item>
  </channel>
</rss>

