<?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 determine if a compliance check passed for all hosts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525476#M148301</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;for the solution,.. and for our(beginners/intermediates) learning, could you please explain the logic about your SPL.. (will be very helpful for present and future learners!)&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Oct 2020 01:30:44 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2020-10-20T01:30:44Z</dc:date>
    <item>
      <title>How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525063#M148131</link>
      <description>&lt;P&gt;I have created the search below which:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;Filters out by only hostnames that I want&lt;/LI&gt;&lt;LI&gt;Then extracts the STIG ID from those results&lt;/LI&gt;&lt;LI&gt;Then extracts the controls status&lt;/LI&gt;&lt;LI&gt;Lastly, consolidating Errors, Failed, and Warnings into a group of 'failed' controls with the remaining being "Passed"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What I would like to do is identify any controls that have passed across all of the hostnames and vice versa identify the controls that have failed across all of the host names.&lt;/P&gt;&lt;P&gt;Example: 15 STIG ID(s) have Failed across all hosts. 200 STIG ID(s) have passed a crossed all hosts.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Failed&lt;/TD&gt;&lt;TD width="50%"&gt;Passed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;15&lt;/TD&gt;&lt;TD width="50%"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| eval passFail=if(IN(status,"ERROR","FAILED","WARNING"), "Failed","Passed") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried appending the below to the end of this query. While it's interesting data, I'm having a hard time figuring out the comparison and filtering to get the desired output in the table above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(stigid) by dnsName passFail
| stats count by dnsName passFail&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525063#M148131</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-16T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525163#M148158</link>
      <description>&lt;LI-CODE lang="markup"&gt;index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| stats count(eval(IN(status,"ERROR","FAILED","WARNING"))) as "Failed" count(eval(!IN(status,"ERROR","FAILED","WARNING"))) as "Passed" by stigid dnsName&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 17 Oct 2020 02:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525163#M148158</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-10-17T02:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525213#M148183</link>
      <description>&lt;P&gt;This is not really telling me '14 hosts passed "stigid x"'.&lt;/P&gt;&lt;P&gt;I'm getting the results like below, where there is a stigid listed for every host.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;stigid &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;dnsName &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Failed &lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;Passed&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WN10-00-000005&lt;/TD&gt;&lt;TD&gt;hostname1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;WN10-00-000005&lt;/TD&gt;&lt;TD&gt;hostname2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Sun, 18 Oct 2020 01:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525213#M148183</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-18T01:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525218#M148187</link>
      <description>&lt;P&gt;Please check the passFail calculation works find and gives your the count correctly(by query 1)..also pls check the query 2.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Query 1 - index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| eval passFail=if(IN(status,"ERROR","FAILED","WARNING"), "Failed","Passed") 
| table stigid dnsName passFail 

Query 2 - index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| eval passFail=if(IN(status,"ERROR","FAILED","WARNING"), "Failed","Passed") 
| stats count(stigid) by dnsName passFail&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2020 03:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525218#M148187</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-18T03:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525256#M148200</link>
      <description>&lt;P&gt;Query 1: confirmed everything works as expected&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;stigid&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;dnsName&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;passFail&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;WN10-EM-00015&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;hostname1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Passed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;WN10-EM-00015&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;hostname2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Passed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query 2:&amp;nbsp; confirmed that for each dnsName, I'm getting the status and count of STIG ids that either passed or failed&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;dnsName&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;passFail&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;count(stigid)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;hostname1&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Passed&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;hostname2&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;Passed&lt;/TD&gt;&lt;TD width="33.333333333333336%"&gt;34&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2020 18:30:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525256#M148200</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-18T18:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525268#M148204</link>
      <description>&lt;P&gt;sooo,&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227706"&gt;@chaday00&lt;/a&gt;&amp;nbsp;its working fine or some more modifications required, please suggest!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 00:20:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525268#M148204</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-19T00:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525271#M148205</link>
      <description>&lt;P&gt;Yes, additional modification is needed. Referencing the OP, neither of the queries you provided, resulted in what I'm trying to do. However they do provide the expected output from those queries...&lt;/P&gt;&lt;P&gt;Consider the following csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;stigid,dnsName,,,,,
WIN-10-0001,Test01,,,,,
WIN-10-0003,Test01,,,,,
WIN-10-0004,Test01,,,,,
WIN-10-0001,Test02,,,,,
WIN-10-0003,Test02,,,,,
WIN-10-0004,Test02,,,,,
WIN-10-0001,Test03,,,,,
WIN-10-0003,Test03,,,,,
WIN-10-0004,Test03,,,,,
WIN-10-0011,Test02,,,,,
WIN-10-0013,Test01,,,,,
WIN-10-0014,Test03,,,,,
WIN-10-0011,Test01,,,,,
WIN-10-0013,Test01,,,,,
WIN-10-0014,Test01,,,,,&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This CSV assumes all the stigid and hostnames have "Passes". I know that they only 'dnsName' that "Passed" all stigid checks is 'Test01'. In the OP, I'm trying to figure out a way to return how many 'dnsName's have "Passed" all queries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the query below, I get very close:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test_kv.csv | eventstats count by dnsName, stigid | stats list(stigid) as id by dnsName | stats count by id&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This results in the table below:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;id&lt;/TD&gt;&lt;TD width="50%"&gt;count&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0001&lt;/TD&gt;&lt;TD width="50%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0003&lt;/TD&gt;&lt;TD width="50%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0004&lt;/TD&gt;&lt;TD width="50%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0011&lt;/TD&gt;&lt;TD width="50%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0013&lt;/TD&gt;&lt;TD width="50%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;WIN-10-0014&lt;/TD&gt;&lt;TD width="50%"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This shows me that for the 6 stigid's, only 3 dnsNames have passed 3 of those stigids. However, this is not what I'm trying to do.&lt;/P&gt;&lt;P&gt;I know that 'Test01' passed across all 6 I'd like to build a query that reflects that, in this example, only 1 dnsName passed across all stigids.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 01:11:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525271#M148205</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-19T01:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525275#M148208</link>
      <description>&lt;P&gt;It wouldn't accept my edits to the above, so I'll try here:&lt;/P&gt;&lt;P&gt;With the same CSV data as above. Consider the results of the following query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test_kv.csv | eventstats count by dnsName, stigid | dedup dnsName, stigid | stats list(stigid) as id by dnsName&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similar to one of your outputs. I can see that only 'Test01' has passed all 6 of the stigid's. You can see this in the table below:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;dnsName&lt;/TD&gt;&lt;TD width="50%"&gt;id&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Test01&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0001&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0011&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0013&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;WIN-10-0014&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Test02&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0001&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0011&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;Test03&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;WIN-10-0001&lt;DIV class="multivalue-subcell"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;&lt;DIV class="multivalue-subcell"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0014&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the OP--based of this example, I'm trying to figure out a query that will return count '1' for 'Passed' because only 1 'dnsName' has Passed every stigid&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 01:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525275#M148208</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-19T01:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525281#M148212</link>
      <description>&lt;P&gt;two stats in single search is possible and requires some tweaks here and there...pls check this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test_kv.csv | eventstats count by dnsName, stigid | dedup dnsName, stigid | stats list(stigid) AS id sum(dnsName) AS dnsNameCount by dnsName  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;It wouldn't accept my edits to the above, so I'll try here:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;post editing is possible. above your reply, you can see a small drop down box and select "edit reply"&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 03:20:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525281#M148212</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-19T03:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525336#M148229</link>
      <description>&lt;P&gt;I see where you're going and likely on the right track if it returns '1' for this control set. But for some reason the dnsNamCount column is blank?&amp;nbsp;&lt;/P&gt;&lt;P&gt;dnsName id dnsNameCount&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Test01&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0001&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0013&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0011&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0014&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Test02&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0001&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0011&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Test03&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0001&lt;/DIV&gt;&lt;DIV class="multivalue-subcell highlighted"&gt;WIN-10-0003&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0004&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;WIN-10-0014&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 19 Oct 2020 12:04:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525336#M148229</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-19T12:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525348#M148234</link>
      <description>&lt;P&gt;the stats gives difficult troubles at times.. (EDITed)&lt;/P&gt;&lt;P&gt;Please check:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup test_kv.csv | eventstats count by dnsName, stigid | dedup dnsName, stigid | stats list(stigid) AS id count(dnsName) AS dnsNameCount by dnsName  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 16:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525348#M148234</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-19T16:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525411#M148268</link>
      <description>&lt;P&gt;That's pretty much the output I thought it was going to produce which was the number of findings that passed per dnsName.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still not what I'm trying to do. I'm thinking I'll have to create a custom search in Python to make this work.&lt;/P&gt;&lt;P&gt;I'm thinking I might have to do a foreach() loop on the findings that 'Passed' and against a list of hostnames. Whichever hostname is identified for every stigid as 'Passed', will be reported out. I could then get a count of only the hostnames that have passed every control.&lt;/P&gt;&lt;P&gt;Thanks for your time and help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 16:10:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525411#M148268</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-19T16:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525413#M148270</link>
      <description>&lt;P&gt;ok then, lets ask our splunk gurus&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 16:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525413#M148270</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-19T16:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525428#M148283</link>
      <description>&lt;LI-CODE lang="markup"&gt;index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| eval passFail=if(IN(status,"ERROR","FAILED","WARNING"), "Failed","Passed") 
| stats values(dnsName) as dnsName by stigid passFail
| eventstats dc(dnsName) as totaldnsname
| stats count(dnsName) as dnsnamecount values(totaldnsname) as totaldnsname by stigid passFail
| eval totalpass=if(passFail="Passed" AND dnsnamecount=totaldnsname,1,0)
| eval totalfail=if(passFail="Failed" AND dnsnamecount=totaldnsname,1,0)
| stats sum(totalfail) as Failed, sum(totalpass) as Passed&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Oct 2020 16:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525428#M148283</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-19T16:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525433#M148285</link>
      <description>&lt;P&gt;Wow thank you so much. Appreciate this and all the help from&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/80737"&gt;@inventsekar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 17:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525433#M148285</guid>
      <dc:creator>chaday00</dc:creator>
      <dc:date>2020-10-19T17:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525475#M148300</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227706"&gt;@chaday00&lt;/a&gt;&amp;nbsp;for showing your appreciations thru the karma points ;)..&lt;/P&gt;&lt;P&gt;happy that we found out the solution.. it took some time but a good learning.. the search commands can give us difficult times, but, as always, good learnings!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 01:27:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525475#M148300</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-20T01:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525476#M148301</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;for the solution,.. and for our(beginners/intermediates) learning, could you please explain the logic about your SPL.. (will be very helpful for present and future learners!)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 01:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525476#M148301</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-20T01:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a compliance check passed for all hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525516#M148319</link>
      <description>&lt;P&gt;OP Query&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tenable" sourcetype="tenable:sc:vuln" repository="Audit Repository" 
    [ inputlookup windows10_hostnames.csv 
    | fields dnsName ]
| rex field=pluginName "(?&amp;lt;stigid&amp;gt;\w{4}\S\w{2}\S\d{6})\s+.*" 
| rex field=pluginText "\&amp;lt;cm\:compliance-result\&amp;gt;(?&amp;lt;status&amp;gt;\w+)\&amp;lt;\/cm\:compliance-result\&amp;gt;" 
| eval passFail=if(IN(status,"ERROR","FAILED","WARNING"), "Failed","Passed") &lt;/LI-CODE&gt;&lt;P&gt;OP wants to know how many times a stigid was failed by all dnsNames or passed by all dnsNames, so group dnsNames by stigid and passFail (instead of stigid by dnsName and passFail as in OP)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(dnsName) as dnsName by stigid passFail&lt;/LI-CODE&gt;&lt;P&gt;We now have a list of dnsNames which passed and failed for each stigid. Now we want to know how many distinct dnsNames there are so we can tell if all failed or passed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats dc(dnsName) as totaldnsname&lt;/LI-CODE&gt;&lt;P&gt;Now we count the dnsNames for each stigid that passed and failed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(dnsName) as dnsnamecount values(totaldnsname) as totaldnsname by stigid passFail&lt;/LI-CODE&gt;&lt;P&gt;Evaluate if all failed or all passed&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval totalpass=if(passFail="Passed" AND dnsnamecount=totaldnsname,1,0)
| eval totalfail=if(passFail="Failed" AND dnsnamecount=totaldnsname,1,0)&lt;/LI-CODE&gt;&lt;P&gt;Determine total stigid where all dnsNames failed, and where all dnsNames passed Q.E.D.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats sum(totalfail) as Failed, sum(totalpass) as Passed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 07:44:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-determine-if-a-compliance-check-passed-for-all-hosts/m-p/525516#M148319</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-10-20T07:44:10Z</dc:date>
    </item>
  </channel>
</rss>

