<?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: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273373#M82395</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/140181"&gt;@sundareshr&lt;/a&gt;. Thanks again for your help in all this.&lt;BR /&gt;
I modified the search to apply to our data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=forescout sourcetype="fs_encryption_compliance" | stats earliest(eval(if(status="non-compliant", _time, null()))) as noncompliant earliest(eval(if(status="compliant", _time, null()))) as compliant by src_nt_host | where isnotnull(noncompliant) | eval duration="non-compliant" | stats avg(duration) as avg_duration by src_nt_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, the output is listing src_nt_host (device) and NULL avg_duration numbers. We're actually looking for just one avg number for all of these devices. So, can we simply add the duration numbers from each src_nt_host and then derive the avg from that?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:33:51 GMT</pubDate>
    <dc:creator>tmaltizo</dc:creator>
    <dc:date>2020-09-29T11:33:51Z</dc:date>
    <item>
      <title>Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273371#M82393</link>
      <description>&lt;P&gt;We're looking to get the average time, given all, devices/laptops that are non-compliant with encryption.&lt;/P&gt;

&lt;P&gt;In Forescout, these are the fields for detecting compliancy:&lt;BR /&gt;
&lt;STRONG&gt;status&lt;/STRONG&gt; = compliant, non-compliant&lt;BR /&gt;
&lt;STRONG&gt;description&lt;/STRONG&gt; = "Laptop Encryption is not installed", "Symantec Encryption Running, Activated"&lt;/P&gt;

&lt;P&gt;Once, we obtain the average time, we want to monitor any improvement in the form of Encryption posture.&lt;/P&gt;

&lt;P&gt;Thanks for any help!&lt;BR /&gt;
Trista&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 14:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273371#M82393</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2016-10-26T14:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273372#M82394</link>
      <description>&lt;P&gt;Try this *&lt;STRONG&gt;&lt;EM&gt;UPDATED&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=forescout sourcetype="fs_encryption_compliance" | stats earliest(eval(if(status="non-compliant", _time, null()))) as noncompliant earliest(eval(if(status="compliant", _time, null()))) as compliant by src_nt_host | where isnotnull(noncompliant) | eval duration=compliant-noncompliant | eventstats max(duration) as max min(duration) as min | stats values(max) as max max(min) as min avg(duration) as avg_duration values(eval(if(max=duration, src_nt_host, "null()))) as max_contrib values(eval(if(min=duration, src_nt_host, "null()))) as min_contrib 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Oct 2016 14:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273372#M82394</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-26T14:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273373#M82395</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/140181"&gt;@sundareshr&lt;/a&gt;. Thanks again for your help in all this.&lt;BR /&gt;
I modified the search to apply to our data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=forescout sourcetype="fs_encryption_compliance" | stats earliest(eval(if(status="non-compliant", _time, null()))) as noncompliant earliest(eval(if(status="compliant", _time, null()))) as compliant by src_nt_host | where isnotnull(noncompliant) | eval duration="non-compliant" | stats avg(duration) as avg_duration by src_nt_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, the output is listing src_nt_host (device) and NULL avg_duration numbers. We're actually looking for just one avg number for all of these devices. So, can we simply add the duration numbers from each src_nt_host and then derive the avg from that?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:33:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273373#M82395</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2020-09-29T11:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273374#M82396</link>
      <description>&lt;P&gt;Try this... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=forescout sourcetype="fs_encryption_compliance" | stats earliest(eval(if(status="non-compliant", _time, null()))) as noncompliant earliest(eval(if(status="compliant", _time, null()))) as compliant by src_nt_host | where isnotnull(noncompliant) | eval duration=compliant-noncompliant | stats avg(duration) as avg_duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Oct 2016 20:19:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273374#M82396</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-26T20:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273375#M82397</link>
      <description>&lt;P&gt;ok, is that avg_duration in seconds, minutes, hours, days? The output is coming up as a negative number.... -2819509.457109&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 20:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273375#M82397</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2016-10-26T20:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273376#M82398</link>
      <description>&lt;P&gt;If duration is negative, make this change &lt;CODE&gt;eval duration=noncompliant-compliant&lt;/CODE&gt; . &lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 20:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273376#M82398</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-26T20:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273377#M82399</link>
      <description>&lt;P&gt;Yes, I noticed that and made that change. So, this duration is in seconds? How would I change it to hours?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 20:44:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273377#M82399</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2016-10-26T20:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273378#M82400</link>
      <description>&lt;P&gt;Add this to the end &lt;CODE&gt;| eval duration=tostring(duration, "duration")&lt;/CODE&gt; OR if you only want hours, divide by 3600 &lt;CODE&gt;| eval duration_hrs=round(duration/3600, 0)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 21:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273378#M82400</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-26T21:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273379#M82401</link>
      <description>&lt;P&gt;This is great @sundareshr! Thank you!&lt;/P&gt;

&lt;P&gt;One last thing...how would I derive the lowest and highest duration that is contributing to this avg?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 13:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273379#M82401</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2016-10-27T13:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273380#M82402</link>
      <description>&lt;P&gt;See updated answer&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 13:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273380#M82402</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-27T13:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273381#M82403</link>
      <description>&lt;P&gt;Thank you so much for your help &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/140181"&gt;@sundareshr&lt;/a&gt;!&lt;/P&gt;

&lt;P&gt;I'm getting the src_nt_host names for the max and min contributors. How do I obtain the duration time for these two values?&lt;/P&gt;

&lt;P&gt;The minimum duration time&lt;BR /&gt;
The maximum duration time&lt;BR /&gt;
Avg duration time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273381#M82403</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2020-09-29T11:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273382#M82404</link>
      <description>&lt;P&gt;@tmaltizo - Did @sundareshr happen to answer your original question? If yes, please click "Accept" to resolve your post. If not, feel free to leave another comment with feedback for him. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 00:49:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273382#M82404</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-11-08T00:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Forescout: How to calculate the average time of all devices/laptops that are non-compliant with encryption?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273383#M82405</link>
      <description>&lt;P&gt;@aaraneta, I just sent a followup comment to him.Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2016 19:32:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forescout-How-to-calculate-the-average-time-of-all-devices/m-p/273383#M82405</guid>
      <dc:creator>tmaltizo</dc:creator>
      <dc:date>2016-11-30T19:32:30Z</dc:date>
    </item>
  </channel>
</rss>

