<?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: latest time values in search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/latest-time-values-in-search-query/m-p/670090#M229751</link>
    <description>&lt;P&gt;Try something like this for 2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=newdata sourcetype=oracle source="/u0/DATA_COUNT.txt" loglevel="ERROR"
[| makeresults
| addinfo
| eval earliest=relative_time(info_max_time,"-5m")
| eval latest=info_max_time
| table earliest latest]
| stats dc(loglevel) by INSTANCE_NAME&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 28 Nov 2023 23:18:05 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-11-28T23:18:05Z</dc:date>
    <item>
      <title>latest time values in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/latest-time-values-in-search-query/m-p/670075#M229745</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have a query where a user selects a time range in the timeticker&lt;/P&gt;&lt;P&gt;Let say 10 november 08:30am to 10 novemeber 11:30am&lt;/P&gt;&lt;P&gt;The user wants to only see the events for the last 5 minutes&lt;/P&gt;&lt;P&gt;&amp;nbsp;i.e from 10 novmeber 11:25am 10 novemeber 11:30am to look for errors in that 5 minutes&lt;/P&gt;&lt;P&gt;He has two panels&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;total errors in the the selected timeframe&lt;/LI&gt;&lt;LI&gt;Total errors in the last 5mins of the selected timeframe&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm able to create panel 1 how to create panel 2 how&lt;/P&gt;&lt;P&gt;Below search for panel 2&lt;/P&gt;&lt;P&gt;earliest=-5m&amp;nbsp; latest=$info_max_time$ index=newdata sourcetype=oracle source="/u0/DATA_COUNT.txt" loglevel="ERROR" |bin span=5m _time |stats dc(loglevel) by INSTANCE_NAME&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 20:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/latest-time-values-in-search-query/m-p/670075#M229745</guid>
      <dc:creator>venky1544</dc:creator>
      <dc:date>2023-11-28T20:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: latest time values in search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/latest-time-values-in-search-query/m-p/670090#M229751</link>
      <description>&lt;P&gt;Try something like this for 2&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=newdata sourcetype=oracle source="/u0/DATA_COUNT.txt" loglevel="ERROR"
[| makeresults
| addinfo
| eval earliest=relative_time(info_max_time,"-5m")
| eval latest=info_max_time
| table earliest latest]
| stats dc(loglevel) by INSTANCE_NAME&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 28 Nov 2023 23:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/latest-time-values-in-search-query/m-p/670090#M229751</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-11-28T23:18:05Z</dc:date>
    </item>
  </channel>
</rss>

