<?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: New user - trying to work out a report - Followup questions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88461#M22633</link>
    <description>&lt;P&gt;here is your original issue:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/questions/8862/new-user-trying-to-work-out-a-report"&gt;http://answers.splunk.com/questions/8862/new-user-trying-to-work-out-a-report&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Nov 2010 04:14:46 GMT</pubDate>
    <dc:creator>Genti</dc:creator>
    <dc:date>2010-11-13T04:14:46Z</dc:date>
    <item>
      <title>New user - trying to work out a report - Followup questions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88460#M22632</link>
      <description>&lt;P&gt;Appreciate the answer to my original question, but it leads me to a couple of additional issues:&lt;/P&gt;

&lt;P&gt;0) As I write this, it was suggested that I tag it or link it back to the original question, and I don't see how to do either of those things... Help??!&lt;/P&gt;

&lt;P&gt;1) The following query seems to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="netcool" | stats count by tgtHostname, supportGroup | where count &amp;gt; 50 | stats count(tgtHostname) by supportGroup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This produces a list of support groups and a column which counts the number of hosts that have 50+ events associated with them. I can create a pie chart report out of this. So far so good...&lt;/P&gt;

&lt;P&gt;The original suggested query was this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Search string] | stats count as EventCount by host, SupportGroup | where count &amp;gt; 100 | stats count(host) by SupportGroup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and my first question is - what does the 'as EventCount' mean, and is that supposed to be literal text or does EventCount correspond to one of my event columns? When I include that text, the query simply does nothing...&lt;/P&gt;

&lt;P&gt;2) The query above generates 2 columns of data - I would like to display a third column, which would contain the sum total of all the events associated with the hosts in the given host group.&lt;/P&gt;

&lt;P&gt;So instead of &lt;/P&gt;

&lt;P&gt;SG_001        6&lt;BR /&gt;
SG_002        4&lt;BR /&gt;
SG_003        10  &lt;/P&gt;

&lt;P&gt;where the first row shows that support group SG_001 has 6 hosts with 50+ events, I'd like to generate&lt;/P&gt;

&lt;P&gt;SG_001        6       200&lt;BR /&gt;
SG_002        4       1000&lt;BR /&gt;
SG_003       10       900  &lt;/P&gt;

&lt;P&gt;where the first row shows that SG_001 has 6 hosts with 50+ events, and those 6 hosts have a total of 200 events associated with them...&lt;/P&gt;

&lt;P&gt;I'm working out the query language, but I would appreciate any help you can give me on this as I get started...&lt;/P&gt;

&lt;P&gt;Thanks in advance,&lt;/P&gt;

&lt;P&gt;nbc&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2010 04:02:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88460#M22632</guid>
      <dc:creator>nbcohen</dc:creator>
      <dc:date>2010-11-13T04:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: New user - trying to work out a report - Followup questions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88461#M22633</link>
      <description>&lt;P&gt;here is your original issue:&lt;BR /&gt;
&lt;A href="http://answers.splunk.com/questions/8862/new-user-trying-to-work-out-a-report"&gt;http://answers.splunk.com/questions/8862/new-user-trying-to-work-out-a-report&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2010 04:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88461#M22633</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2010-11-13T04:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: New user - trying to work out a report - Followup questions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88462#M22634</link>
      <description>&lt;P&gt;When you do a | stats count as EventCount it will rename count to EventCount.  &lt;/P&gt;

&lt;P&gt;Believe that search should have looked like this to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Search string] | stats count as EventCount by host, SupportGroup | where EventCount &amp;gt; 100 | stats count(host) by SupportGroup
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the rename to EventCount was not there it would have worked the first time.  Could have been a typo.  &lt;/P&gt;

&lt;P&gt;Travis.&lt;/P&gt;</description>
      <pubDate>Sat, 13 Nov 2010 04:44:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/New-user-trying-to-work-out-a-report-Followup-questions/m-p/88462#M22634</guid>
      <dc:creator>thall79</dc:creator>
      <dc:date>2010-11-13T04:44:42Z</dc:date>
    </item>
  </channel>
</rss>

