<?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: SLA reporting in SPL in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676085#M231277</link>
    <description>&lt;P&gt;For the last one, it should be 1+01:02:10 to signify 1 day + 1 hour, 2 minutes and 10 seconds, but since you haven't shown your complete search, it is difficult to know why you are missing the "1+"&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 15:20:48 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-01-31T15:20:48Z</dc:date>
    <item>
      <title>SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676047#M231264</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this query that calulates how much time the alerts are open, so far so good, but unfortunatelly if the rule name repeats (duplicate rule name) in a new event, then now() function does not know how to calculate the correct time for the first rule that triggered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I calculate SLA time without deleting duplicates and keeping the same structure as showed in the picture ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_1-1706699267697.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29145iB6A6D5AC1FA3B2A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_1-1706699267697.png" alt="dm2_1-1706699267697.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 11:12:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676047#M231264</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-01-31T11:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676053#M231267</link>
      <description>&lt;P&gt;It is not clear what you are trying to achieve when _time is from the previous day.&lt;/P&gt;&lt;P&gt;Also, note that you could consider using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time_difference=tostring(now() - _time, "duration")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 12:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676053#M231267</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-31T12:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676066#M231272</link>
      <description>&lt;P&gt;that worked for 2 results but not for the last one&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1706711558416.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29146i86E1CAFEF0845A02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1706711558416.png" alt="dm2_0-1706711558416.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 14:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676066#M231272</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-01-31T14:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676085#M231277</link>
      <description>&lt;P&gt;For the last one, it should be 1+01:02:10 to signify 1 day + 1 hour, 2 minutes and 10 seconds, but since you haven't shown your complete search, it is difficult to know why you are missing the "1+"&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 15:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676085#M231277</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-01-31T15:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676230#M231299</link>
      <description>&lt;P&gt;Exactly, This is my search&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;`notable_by_id("*")`
| search status_end="false"
| where severity IN ("high", "critical")
| eval time_difference=tostring(now() - _time)
| eval time_difference = strftime(time_difference, "%H:%M:%S")
| table _time, time_difference, rule_name, owner, status_label, "Audit Category", urgency
| rename status_label as Status&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676230#M231299</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-01T13:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676244#M231302</link>
      <description>&lt;P&gt;So, why not use tostring with duration as I suggested?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:46:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676244#M231302</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676274#M231310</link>
      <description>&lt;P&gt;WORKED! And this is my final query. TY&lt;/P&gt;&lt;P&gt;`notable_by_id("*")`&lt;BR /&gt;| search status_end="false"&lt;BR /&gt;| where severity IN ("high", "critical")&lt;BR /&gt;| eval timenow=now()&lt;BR /&gt;| eval nowstring=strftime(now(), "%H:%M:%S %p")&lt;BR /&gt;| eval diff=now()-_time&lt;BR /&gt;| eval diff=tostring(diff, "duration")&lt;BR /&gt;| table _time, diff, rule_name, owner, status_label, "Audit Category", urgency&lt;BR /&gt;| rename status_label as Status&lt;BR /&gt;| rename diff as time_difference&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1706802517813.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29203iE1E7C647ABD9E1E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1706802517813.png" alt="dm2_0-1706802517813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 15:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676274#M231310</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-01T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676278#M231311</link>
      <description>&lt;P&gt;I tried the same concept for a different query and did not run:&lt;BR /&gt;This one calculates how much time took the alert to be closed on the incident manager&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_1-1706802676944.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29204iBC427DA5AF5038CB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_1-1706802676944.png" alt="dm2_1-1706802676944.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 15:52:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676278#M231311</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-01T15:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676288#M231314</link>
      <description>&lt;P&gt;Not quite - your fieldformat is using strftime rather than tostring&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 16:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676288#M231314</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T16:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676553#M231378</link>
      <description>&lt;P&gt;Hi, Can you help with this one? time_difference remains empty after the calculation&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1707123675744.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29235iB077457A5BFC4FB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1707123675744.png" alt="dm2_0-1707123675744.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 09:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676553#M231378</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-05T09:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676556#M231379</link>
      <description>&lt;P&gt;Why are you formatting the two times before performing your calculation? Subtracting one string from another doesn't give you a number!&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 09:15:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676556#M231379</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-05T09:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676564#M231380</link>
      <description>&lt;P&gt;WORKS! thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1707125919889.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29239iF0002722ADEEB4B5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1707125919889.png" alt="dm2_0-1707125919889.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 09:39:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676564#M231380</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-05T09:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676583#M231382</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1707139447717.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29240i95566A33965CDB71/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1707139447717.png" alt="dm2_0-1707139447717.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can I round/get rid off the decimals after the seconds?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 13:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676583#M231382</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-05T13:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676585#M231384</link>
      <description>&lt;P&gt;Try combining the two lines&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time_difference=tostring(round(incident_review_time - notable_time, 0), "duration")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Feb 2024 13:29:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676585#M231384</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-05T13:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676591#M231386</link>
      <description>&lt;P&gt;How can I sum all the time together ? stats sum did not work for me, and in addition, I need to add also&amp;nbsp;&lt;BR /&gt;| stats count(event_id) and get the count of critical alerts in order to do Event Count / Total Time and get an average of how much time takes to close alert by severity.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dm2_0-1707142614750.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29241i29EC9A81BD348742/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dm2_0-1707142614750.png" alt="dm2_0-1707142614750.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Feb 2024 14:19:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676591#M231386</guid>
      <dc:creator>dm2</dc:creator>
      <dc:date>2024-02-05T14:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: SLA reporting in SPL</title>
      <link>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676602#M231390</link>
      <description>&lt;P&gt;As I said before, you can't do calculations on strings! Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats avg(eval(incident_review_time-notable_time)) as average&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 05 Feb 2024 15:13:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/SLA-reporting-in-SPL/m-p/676602#M231390</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-05T15:13:21Z</dc:date>
    </item>
  </channel>
</rss>

