<?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: evaluate time range in splunk event data and alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577905#M13307</link>
    <description>&lt;P&gt;Sending thanks to ITWhisperer&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2021 14:51:46 GMT</pubDate>
    <dc:creator>GEB</dc:creator>
    <dc:date>2021-12-09T14:51:46Z</dc:date>
    <item>
      <title>evaluate time range in splunk event data and alert</title>
      <link>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577812#M13305</link>
      <description>&lt;P&gt;Given an event log specification of:&lt;BR /&gt;&lt;STRONG&gt;"{DateTime} Times:&lt;BR /&gt;&lt;/STRONG&gt;Online_1: CNCT_TM: {CNCT_TM}; LOG_TM: {LOG_TM}&lt;BR /&gt;Online_2: CNCT_TM: {CNCT_TM}; LOG_TM: {LOG_TM}&lt;BR /&gt;Offline_1: CNCT_TM: {CNCT_TM}; LOG_TM: {LOG_TM}&lt;BR /&gt;Offline_2: CNCT_TM: {CNCT_TM}; LOG_TM: {LOG_TM}"&lt;/P&gt;&lt;P&gt;which is logged 4 times a day and an example entry like:&lt;BR /&gt;&lt;STRONG&gt;"&lt;SPAN class=""&gt;2021-12-08&lt;/SPAN&gt; &lt;SPAN class=""&gt;14:31:59&lt;/SPAN&gt; Times:&amp;nbsp;&lt;/STRONG&gt;Online_1: CNCT_TM: 2021-12-08 14:47:13.873; LOG_TM: 2021-12-08 14:47:16.387; Online_2: CNCT_TM: 2021-12-08 14:47:49.837; LOG_TM: 2021-12-08 14:47:50.480; Offline_1: CNCT_TM: 2021-12-08 14:48:27.303; LOG_TM: 2021-12-08 14:48:28.927; Offline_2: CNCT_TM: 2021-12-08 14:48:56.673; LOG_TM: 2021-12-08 14:48:58.750"&lt;/P&gt;&lt;P&gt;How do I evaluate and graph the time range in Minutes and Seconds (just seconds would be fine for me) between the maximum and minimum times embedded in the 8 times captured in the log entry?&amp;nbsp; Ultimately, I would like to create an alert if a time range greater than something like 30 minutes were to occur.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 20:58:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577812#M13305</guid>
      <dc:creator>GEB</dc:creator>
      <dc:date>2021-12-08T20:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: evaluate time range in splunk event data and alert</title>
      <link>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577821#M13306</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="2021-12-08 14:31:59 Times: Online_1: CNCT_TM: 2021-12-08 14:47:13.873; LOG_TM: 2021-12-08 14:47:16.387; Online_2: CNCT_TM: 2021-12-08 14:47:49.837; LOG_TM: 2021-12-08 14:47:50.480; Offline_1: CNCT_TM: 2021-12-08 14:48:27.303; LOG_TM: 2021-12-08 14:48:28.927; Offline_2: CNCT_TM: 2021-12-08 14:48:56.673; LOG_TM: 2021-12-08 14:48:58.750"



| rex max_match=0 "_TM:\s(?&amp;lt;timestamp&amp;gt;[^;]+)"
| eval timestamp=mvmap(timestamp,strptime(timestamp,"%Y-%m-%d %H:%M:%S.%Q"))
| eval earliest=mvindex(mvsort(timestamp),0)
| eval latest=mvindex(mvsort(timestamp),-1)
| eval timespan=latest-earliest&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 08 Dec 2021 22:34:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577821#M13306</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-12-08T22:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: evaluate time range in splunk event data and alert</title>
      <link>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577905#M13307</link>
      <description>&lt;P&gt;Sending thanks to ITWhisperer&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 14:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/evaluate-time-range-in-splunk-event-data-and-alert/m-p/577905#M13307</guid>
      <dc:creator>GEB</dc:creator>
      <dc:date>2021-12-09T14:51:46Z</dc:date>
    </item>
  </channel>
</rss>

