<?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 Help with stats for troubleshooting different result sets in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-for-troubleshooting-different-result-sets/m-p/87852#M22456</link>
    <description>&lt;P&gt;I have a table with the following fields:&lt;/P&gt;

&lt;P&gt;table qualys_id,exploit_cve_id,exploit_name,exploit_source,exploit_url&lt;/P&gt;

&lt;P&gt;Doing a dedup on exploit_cve_id,exploit_name and exploit_cve_id,exploit_url yields different results.  I'm guessing that there are some data integrity issues.  I would like to view a table with a count of both the exploit_name and the exploit_url appended to each result so I can sort them and try and figure out where the differences are.&lt;/P&gt;

&lt;P&gt;So, the table would ideally be:&lt;/P&gt;

&lt;P&gt;table qualys_id,exploit_cve_id,exploit_name,exploit_source,exploit_url,name_count,url_count&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;

&lt;P&gt;Craig&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:00:37 GMT</pubDate>
    <dc:creator>responsys_cm</dc:creator>
    <dc:date>2020-09-28T12:00:37Z</dc:date>
    <item>
      <title>Help with stats for troubleshooting different result sets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-for-troubleshooting-different-result-sets/m-p/87852#M22456</link>
      <description>&lt;P&gt;I have a table with the following fields:&lt;/P&gt;

&lt;P&gt;table qualys_id,exploit_cve_id,exploit_name,exploit_source,exploit_url&lt;/P&gt;

&lt;P&gt;Doing a dedup on exploit_cve_id,exploit_name and exploit_cve_id,exploit_url yields different results.  I'm guessing that there are some data integrity issues.  I would like to view a table with a count of both the exploit_name and the exploit_url appended to each result so I can sort them and try and figure out where the differences are.&lt;/P&gt;

&lt;P&gt;So, the table would ideally be:&lt;/P&gt;

&lt;P&gt;table qualys_id,exploit_cve_id,exploit_name,exploit_source,exploit_url,name_count,url_count&lt;/P&gt;

&lt;P&gt;Is this possible?&lt;/P&gt;

&lt;P&gt;Thx.&lt;/P&gt;

&lt;P&gt;Craig&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:00:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-for-troubleshooting-different-result-sets/m-p/87852#M22456</guid>
      <dc:creator>responsys_cm</dc:creator>
      <dc:date>2020-09-28T12:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with stats for troubleshooting different result sets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-for-troubleshooting-different-result-sets/m-p/87853#M22457</link>
      <description>&lt;P&gt;I think so, but there are different ways to approach it. This search tries to count everything cross-tabulated with everything else. It will show you the syntax, but it may not really help with your problem.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere |
stats count(exploit_url) as exploit_url_count count(exploit_name) as exploit_name_count 
        dc(exploit_url) as exploit_url_unique dc(exploit_name) as exploit_name_unique
         by qualys_id exploit_cve_id exploit_name exploit_source exploit_url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The count(exploit...) functions count the number of events, while the dc(exploit...) functions count the number of unique values of the field.&lt;BR /&gt;&lt;BR /&gt;
The fields following the "by" are the fields that are used to break out the subtotals.&lt;BR /&gt;&lt;BR /&gt;
I just wonder if any of the counts will be greater than one, given the breakout.&lt;/P&gt;

&lt;P&gt;Maybe one of these searches would be more useful to find weirdness:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere |
stats count by by qualys_id exploit_cve_id exploit_name exploit_source |
where count &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;would show you all the ids that probably are associated with more than one exploit_url.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere |
stats count by by qualys_id exploit_cve_id exploit_url exploit_source |
where count &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;would show you all the ids that probably are associated with more than one exploit_name. And so forth.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 22:44:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-stats-for-troubleshooting-different-result-sets/m-p/87853#M22457</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-07-02T22:44:01Z</dc:date>
    </item>
  </channel>
</rss>

