<?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: compare current hour and previous hour value in search and find difference ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487008#M193781</link>
    <description>&lt;P&gt;my answer is ammended. I'm misunderstand.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jan 2020 09:23:33 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-01-15T09:23:33Z</dc:date>
    <item>
      <title>compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487000#M193773</link>
      <description>&lt;P&gt;I want to compare current top of an hour value with previous top of an hour value. For e.g. between 9 am to 10 am - get the value from exactly 10 am as curr_value and get the value from exactly 9 am as prev_value, find the difference and show the value. This will be applicable for next hour also :&lt;/P&gt;

&lt;P&gt;I am using below query to get the earliest and latest value of the hour, but not sure on whether the events are returning proper :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dc sourcetype=total_energy earliest=-1h@h latest=@h | stats latest(value) as curr_value earliest(value) as hour_before by source,snmp_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please help ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487000#M193773</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-09-30T03:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487001#M193774</link>
      <description>&lt;P&gt;UPDATE2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dc sourcetype=total_energy earliest=-1h@h latest=@h 
| stats last(_time) as curr_time last(value) as curr_value first(_time) as hour_beforetime first(value) as hour_before by source,snmp_index
| fieldformat curr_time=strftime(curr_time,"%c")
| fieldformat hour_beforetime=strftime(hour_beforetime,"%c")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;how about this?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 09:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487001#M193774</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-14T09:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487002#M193775</link>
      <description>&lt;P&gt;latest and earliest will also do the same, but is it possible to check whether it is really taking the proper first and last value bu using _time ?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 10:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487002#M193775</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-01-14T10:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487003#M193776</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8238iF87574EB0218943C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 10:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487003#M193776</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-01-14T10:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487004#M193777</link>
      <description>&lt;P&gt;in the above image, how do I verify whether curr_value is of 1 PM and hour_before is of 2 PM ?&lt;/P&gt;

&lt;P&gt;Query I am using is :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dc sourcetype=total_energy earliest=-1h@h latest=@h  | stats last(value) as curr_value first(value) as hour_before by source,snmp_index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487004#M193777</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-09-30T03:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487005#M193778</link>
      <description>&lt;P&gt;@pgadhari&lt;BR /&gt;
my answer is updated, please confirm.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 10:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487005#M193778</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-14T10:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487006#M193779</link>
      <description>&lt;P&gt;actually, the value field is not the timestamp field. It is just, some energy value. I think you are taking it as "epoch" value ? its not that.&lt;/P&gt;

&lt;P&gt;What I want to know is - the latest (energy) value and earliest (energy) value, which I am getting in the value field is of the proper time of curr_hour and prev_hour ? How do I verify that ? Hope you got it ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:43:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487006#M193779</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-09-30T03:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487007#M193780</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I thinks your request is good, to verify you can run this request:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dc sourcetype=total_energy earliest=-1h@h latest=@h  | sort  - _time | table _time value source,snmp_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=dc sourcetype=total_energy earliest=-1h@h latest=@h  | sort   _time | table _time value source,snmp_index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jan 2020 09:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487007#M193780</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2020-01-15T09:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487008#M193781</link>
      <description>&lt;P&gt;my answer is ammended. I'm misunderstand.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2020 09:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487008#M193781</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-15T09:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: compare current hour and previous hour value in search and find difference ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487009#M193782</link>
      <description>&lt;P&gt;ok. I will check and revert. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 05:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-current-hour-and-previous-hour-value-in-search-and-find/m-p/487009#M193782</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-01-16T05:17:31Z</dc:date>
    </item>
  </channel>
</rss>

