<?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: How to calculate the time between the notable event state changes? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460277#M6617</link>
    <description>&lt;P&gt;use &lt;CODE&gt;range()&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;reference: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2020 23:16:12 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-19T23:16:12Z</dc:date>
    <item>
      <title>How to calculate the time between the notable event state changes?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460274#M6614</link>
      <description>&lt;P&gt;I am trying to figure out a way to calculate the time for:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Time taken for a reviewer to assign the notable ticket from the creation time.&lt;/LI&gt;
&lt;LI&gt;Time taken for the notable in progress till close.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;CODE&gt;notable&lt;/CODE&gt;|search NOT &lt;CODE&gt;suppression&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;|eval _time=strftime(_time,"%Y/%m/%d %T")
|eval review_time=strftime(review_time,"%Y/%m/%d %T")
|eval assign_time = case(isnotnull(owner), _time) | eval close_time = case(status=5, review_time)
|stats min(_time) as notable_time min(assign_time) as assign_time min(close_time) as close_time by AlertTitle,owner
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This is giving me notable created time and closed time, but not the state change time.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Jun 2020 16:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460274#M6614</guid>
      <dc:creator>ajaynyay</dc:creator>
      <dc:date>2020-06-07T16:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the time between the notable event state changes?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460275#M6615</link>
      <description>&lt;P&gt;&lt;CODE&gt;|eval _time=strftime(_time,"%Y/%m/%d %T")&lt;/CODE&gt;&lt;BR /&gt;
This is wrong.&lt;BR /&gt;
If you change epoch time to &lt;STRONG&gt;strings&lt;/STRONG&gt; ,you can't aggregate times. Keep them stay.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval assign_time = case(isnotnull(owner), _time) | eval close_time = case(status=5, review_time)
 | stats min(_time) as notable_time min(assign_time) as assign_time min(close_time) as close_time by AlertTitle,owner
 | eval state_change_time=your calculation
 | convert timeformat="%Y/%m/%d %T" ctime(notable_time) ctime(assign_time) ctime(close_time)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 19:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460275#M6615</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T19:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the time between the notable event state changes?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460276#M6616</link>
      <description>&lt;P&gt;Thank you for that. &lt;/P&gt;

&lt;P&gt;The issue I see is that every time the notable incident state changes "review_time" is the only field that changes time. So, if I want to calculate the time from creation--&amp;gt;assignment and assignment--&amp;gt;closure its not giving me correct results. &lt;/P&gt;

&lt;P&gt;For example, if I assign the notable today, the review_time field changes time, but if I close the same notable after sometime, it again updates the review_time field only. So, there is no good way of calculating time taken for old notables which are already closed or still open when the state changes later, unless I am missing something.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460276#M6616</guid>
      <dc:creator>ajaynyay</dc:creator>
      <dc:date>2020-09-30T05:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the time between the notable event state changes?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460277#M6617</link>
      <description>&lt;P&gt;use &lt;CODE&gt;range()&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;reference: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 23:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-calculate-the-time-between-the-notable-event-state/m-p/460277#M6617</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T23:16:12Z</dc:date>
    </item>
  </channel>
</rss>

