<?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: current hour in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72875#M181001</link>
    <description>&lt;P&gt;It's perfect thx very much.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2012 13:19:07 GMT</pubDate>
    <dc:creator>LauraBre</dc:creator>
    <dc:date>2012-06-12T13:19:07Z</dc:date>
    <item>
      <title>current hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72873#M180999</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I want to have the hour of the current time but I don't able to have it because now() returns all the current date but just want to have the current hour. &lt;/P&gt;

&lt;P&gt;this is my search : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="tcp:5543" |eval date_hour=strftime(_time, "%H") | rangemap field=count severe=0-0 elevated=1-50 default=low | eval range=if(date_hour&amp;gt;9 AND date_hour&amp;lt;14 AND count&amp;lt;11, "low",if(date_hour &amp;gt; 13 AND date_hour &amp;lt; 24 AND count &amp;gt; 11, "severe", range))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to run this search only on the current hour. I test it with "earliest" and "latest" but it retunrs 2 hours if it is 14:30 for example.&lt;/P&gt;

&lt;P&gt;Thanks by advance to your help.&lt;/P&gt;

&lt;P&gt;Laura&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 12:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72873#M180999</guid>
      <dc:creator>LauraBre</dc:creator>
      <dc:date>2012-06-12T12:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: current hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72874#M181000</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;P&gt;earliest=@h latest=now&lt;/P&gt;

&lt;P&gt;Lp&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 12:51:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72874#M181000</guid>
      <dc:creator>lpolo</dc:creator>
      <dc:date>2012-06-12T12:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: current hour</title>
      <link>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72875#M181001</link>
      <description>&lt;P&gt;It's perfect thx very much.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2012 13:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/current-hour/m-p/72875#M181001</guid>
      <dc:creator>LauraBre</dc:creator>
      <dc:date>2012-06-12T13:19:07Z</dc:date>
    </item>
  </channel>
</rss>

