<?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: Regex help in filtering machines that were not compliant that now are.... in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223969#M65966</link>
    <description>&lt;P&gt;Thanks @javiergn!&lt;/P&gt;

&lt;P&gt;In testing your suggested regex, I narrowed it down to the one host (&lt;STRONG&gt;in bold above&lt;/STRONG&gt;), 703024710LSYF. &lt;/P&gt;

&lt;P&gt;For this host, there were 54 events where status="Non-compliant" and 1 event where status="compliant". It's most recent status is "compliant" which we don't want on the list and &lt;STRONG&gt;it worked!&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jan 2016 16:26:28 GMT</pubDate>
    <dc:creator>tristamaltizo</dc:creator>
    <dc:date>2016-01-13T16:26:28Z</dc:date>
    <item>
      <title>Regex help in filtering machines that were not compliant that now are....</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223967#M65964</link>
      <description>&lt;P&gt;I have events that detect compliance of machines via forescout data (we don't have the app installed) and &lt;STRONG&gt;I'd like to filter on only those machines that have been and remained non-compliant (in the last 30days).&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;In my current regex, it's listing all unique combinations of machine and status (or rather description which is aligned to the status).&lt;/P&gt;

&lt;P&gt;index="forescout" sourcetype="fs_dlp_compliance" | dedup src_nt_host description sortby +src_nt_host -_time | table src_nt_host description status user _time&lt;/P&gt;

&lt;P&gt;Sample output:&lt;BR /&gt;
703019998LSYF   Symantec DLP installed and running          compliant           703019998   2015-12-17T09:23:26.000-0500&lt;BR /&gt;
&lt;STRONG&gt;703024710LSYF&lt;/STRONG&gt;   Symantec DLP installed and running  compliant           703024710   2016-01-11T20:57:25.000-0500&lt;BR /&gt;
&lt;STRONG&gt;703024710LSYF&lt;/STRONG&gt;   DLP Not installed                                           Non-compliant   703024710   2016-01-06T19:11:54.000-0500&lt;BR /&gt;
703039420LSYF   Symantec DLP installed and running          compliant           703039420   2016-01-10T10:42:09.000-0500&lt;BR /&gt;
703039420LSYF   DLP Not installed                                                   Non-compliant   703039420   2016-01-06T19:11:54.000-0500&lt;BR /&gt;
BSHYDSY-D230    DLP Not installed                                                   Non-compliant   USER        2016-01-05T12:50:14.000-0500&lt;BR /&gt;
BSHYDSY-L007    DLP Not installed                                           Non-compliant   USER        2016-01-11T20:58:26.000-0500&lt;BR /&gt;
BSHYDSY-L008    DLP Not installed                                           Non-compliant   USER        2016-01-07T03:49:19.000-0500&lt;BR /&gt;
BSHYDSY-L011    DLP Not installed                                           Non-compliant   USER        2016-01-12T06:44:05.000-0500&lt;/P&gt;

&lt;P&gt;So, again, those events that have status "Non-compliant" that DON'T have another event that have status "compliant" (in the last 30days) are the ones I'd like to filter on.&lt;/P&gt;

&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:22:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223967#M65964</guid>
      <dc:creator>tristamaltizo</dc:creator>
      <dc:date>2020-09-29T08:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in filtering machines that were not compliant that now are....</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223968#M65965</link>
      <description>&lt;P&gt;This is what I would do (not validated so keep an eye on the syntax):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="forescout" sourcetype="fs_dlp_compliance" earliest=-30d@d
| fields src_nt_host status
| eval statusValue = if(match(status, "Non-compliant"), 0, 1)
| stats sum(statusValue) as statusValue by src_nt_host
| search statusValue = 0
| table src_nt_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you then need to display other fields such as description or user you can use the same technique. &lt;/P&gt;

&lt;P&gt;Hope that works for you. &lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 21:24:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223968#M65965</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-12T21:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help in filtering machines that were not compliant that now are....</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223969#M65966</link>
      <description>&lt;P&gt;Thanks @javiergn!&lt;/P&gt;

&lt;P&gt;In testing your suggested regex, I narrowed it down to the one host (&lt;STRONG&gt;in bold above&lt;/STRONG&gt;), 703024710LSYF. &lt;/P&gt;

&lt;P&gt;For this host, there were 54 events where status="Non-compliant" and 1 event where status="compliant". It's most recent status is "compliant" which we don't want on the list and &lt;STRONG&gt;it worked!&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 16:26:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-in-filtering-machines-that-were-not-compliant-that/m-p/223969#M65966</guid>
      <dc:creator>tristamaltizo</dc:creator>
      <dc:date>2016-01-13T16:26:28Z</dc:date>
    </item>
  </channel>
</rss>

