<?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: To get duration of inspection in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642611#M16272</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where Device_Info == "Device Number" OR match(Device_Info,"\d+")
| streamstats count(eval(Device_Info=="Device Number")) as Inspection_Count
| stats values(eval(if(match(Device_Info, "\d+"),Device_Info,null()))) as Device_Info range(_time) as total_duration by Inspection_Count
| where total_duration &amp;gt; 0
| streamstats reset_on_change=t count as Inspection_Count by Device_Info
| eventstats sum(total_duration) as sum_duration by Device_Info
| eval total_duration = total_duration / 60
| eval sum_duration = sum_duration / 60&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 09 May 2023 07:12:21 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-05-09T07:12:21Z</dc:date>
    <item>
      <title>Calculate difference</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642607#M16271</link>
      <description />
      <pubDate>Tue, 09 May 2023 14:25:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642607#M16271</guid>
      <dc:creator>AB24</dc:creator>
      <dc:date>2023-05-09T14:25:03Z</dc:date>
    </item>
    <item>
      <title>Re: To get duration of inspection</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642611#M16272</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| where Device_Info == "Device Number" OR match(Device_Info,"\d+")
| streamstats count(eval(Device_Info=="Device Number")) as Inspection_Count
| stats values(eval(if(match(Device_Info, "\d+"),Device_Info,null()))) as Device_Info range(_time) as total_duration by Inspection_Count
| where total_duration &amp;gt; 0
| streamstats reset_on_change=t count as Inspection_Count by Device_Info
| eventstats sum(total_duration) as sum_duration by Device_Info
| eval total_duration = total_duration / 60
| eval sum_duration = sum_duration / 60&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 07:12:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642611#M16272</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-09T07:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: To get duration of inspection</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642625#M16275</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 14:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642625#M16275</guid>
      <dc:creator>AB24</dc:creator>
      <dc:date>2023-05-09T14:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: To get duration of inspection</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642626#M16276</link>
      <description>&lt;P&gt;Remove the reset_on_change=t&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 09:13:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642626#M16276</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-09T09:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: To get duration of inspection</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642628#M16277</link>
      <description>&lt;P&gt;Some Device_Info are merging in the result instead of one device_info per row it is two device_info per row&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 09:40:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642628#M16277</guid>
      <dc:creator>AB24</dc:creator>
      <dc:date>2023-05-09T09:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: To get duration of inspection</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642629#M16278</link>
      <description>&lt;P&gt;Perhaps if you shared some of your real events and results and your SPL, we might be able to advise you further. Vague descriptions of the issue and fake data means we can only offer solutions based what you have provided, and to that extent, the solution provided does work (but only with the fake data you provided)!&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 09:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Calculate-difference/m-p/642629#M16278</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-09T09:45:01Z</dc:date>
    </item>
  </channel>
</rss>

