<?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: Check if time is within last 3 hrs in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564219#M196536</link>
    <description>&lt;LI-CODE lang="markup"&gt;| stats latest(_time) as _time by type
| eval status=if(now()-_time&amp;lt;(60*60*3),"Registry is in sync","Out of sync")&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 22 Aug 2021 16:03:08 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-08-22T16:03:08Z</dc:date>
    <item>
      <title>Check if time is within last 3 hrs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564218#M196535</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am looking to check if there has been a event within the last 3 hrs for three different categories.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If an event has been detected in the last 3 hours, I would like a status column that says "Registry In Sync", otherwise the status column should read "Out of Sync".&amp;nbsp; Something like the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE width="371"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64"&gt;&lt;P&gt;Type&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;_time&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;Status&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;2021-08-10 09:27:07&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;Out of Sync&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;2021-08-23 01:24:56&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;Registry is in Sync&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64"&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;2021-08-19 23:25:28&lt;/P&gt;&lt;/TD&gt;&lt;TD width="153"&gt;&lt;P&gt;Out of Sync&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The important this is that it is categorised by the Type field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate any and all help!&lt;/P&gt;</description>
      <pubDate>Sun, 22 Aug 2021 15:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564218#M196535</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-08-22T15:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Check if time is within last 3 hrs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564219#M196536</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats latest(_time) as _time by type
| eval status=if(now()-_time&amp;lt;(60*60*3),"Registry is in sync","Out of sync")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 22 Aug 2021 16:03:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564219#M196536</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-22T16:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Check if time is within last 3 hrs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564220#M196537</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to rename "_time" to "Last Update" without changing how the date format looks?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Aug 2021 16:07:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564220#M196537</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-08-22T16:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Check if time is within last 3 hrs</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564231#M196541</link>
      <description>&lt;P&gt;_time has a default format so if you rename it, you have to reapply the formatting, you can do this with fieldformat so it doesn't change the value of the field, just how it is displayed.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Aug 2021 17:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Check-if-time-is-within-last-3-hrs/m-p/564231#M196541</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-22T17:18:37Z</dc:date>
    </item>
  </channel>
</rss>

