<?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: Time duration filter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512560#M143765</link>
    <description>You have a search and you have results. What is the problem?</description>
    <pubDate>Wed, 05 Aug 2020 14:01:23 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-08-05T14:01:23Z</dc:date>
    <item>
      <title>Time duration filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512557#M143763</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need help in getting the data for those Downtime &amp;gt; 15 mins. below is the query am using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=opennms "uei.opennms.org/nodes/nodeUp" OR "uei.opennms.org/nodes/nodeDown"
| fieldformat Time=strftime(Time,"%Y-%m-%d %l:%M:%S %p")
| sort- Time
| eval Downtime = tostring(now() - Time, "duration")
| rex field=Downtime "(?P&amp;lt;Downtime&amp;gt;[^.]+)"
| table Hostname Status Classification "Site Code", sitename, Time Downtime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Device name&lt;/TD&gt;&lt;TD&gt;Down&lt;/TD&gt;&lt;TD&gt;Bronze&lt;/TD&gt;&lt;TD&gt;LHC&lt;/TD&gt;&lt;TD&gt;Luanda&lt;/TD&gt;&lt;TD&gt;2020-08-05 2:02:40 PM&lt;/TD&gt;&lt;TD&gt;00:14:45&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 13:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512557#M143763</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-08-05T13:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Time duration filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512560#M143765</link>
      <description>You have a search and you have results. What is the problem?</description>
      <pubDate>Wed, 05 Aug 2020 14:01:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512560#M143765</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-05T14:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Time duration filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512565#M143766</link>
      <description>&lt;P&gt;HI Rich, the data is for everything that appears in my tool. But i want a hold down timer of 15 mins.&lt;/P&gt;&lt;P&gt;i tried using below commands but that didn't worked.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;| where&amp;nbsp;Downtime &amp;gt;900&lt;/P&gt;&lt;P&gt;Also tried below&lt;/P&gt;&lt;P&gt;| where duration&amp;gt;900&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but am not getting a data while adding this query.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:10:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512565#M143766</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2020-08-05T14:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Time duration filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512583#M143772</link>
      <description>&lt;P&gt;OK.&amp;nbsp; I thought that might be the case, but it wasn't stated.&lt;/P&gt;&lt;P&gt;The clauses you tried won't work because they're comparing strings to integers.&amp;nbsp; You must compare numbers to numbers.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=opennms "uei.opennms.org/nodes/nodeUp" OR "uei.opennms.org/nodes/nodeDown"
| fieldformat Time=strftime(Time,"%Y-%m-%d %l:%M:%S %p")
| sort- Time
| eval Downtime = now() - Time
| where Downtime &amp;gt; 900
| fieldformat Downtime = tostring(Downtime, "duration")
| rex field=Downtime "(?P&amp;lt;Downtime&amp;gt;[^.]+)"
| table Hostname Status Classification "Site Code", sitename, Time Downtime&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-duration-filter/m-p/512583#M143772</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-05T14:39:33Z</dc:date>
    </item>
  </channel>
</rss>

