<?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: search language in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565200#M196908</link>
    <description>&lt;P&gt;You're using count as a splunk function whereas in original post count is a field. So your count will just count the counts &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; and what seems to be really needed is a sum of counts.&lt;/P&gt;&lt;P&gt;And your construction will yield some strange results.&lt;/P&gt;&lt;P&gt;What the OP wanted was simply one:&lt;/P&gt;&lt;PRE&gt;&amp;lt;original search&amp;gt; | stats sum(Count) by Host | addtotals row=f col=t labelfield=Host&lt;/PRE&gt;&lt;P&gt;and two:&lt;/P&gt;&lt;PRE&gt;&amp;lt;original search&amp;gt;| stats sum(Count) by Status | &amp;lt;optionaly addtotals as in example above&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Aug 2021 07:03:45 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2021-08-30T07:03:45Z</dc:date>
    <item>
      <title>search language</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565044#M196838</link>
      <description>&lt;P&gt;Hi, how do I get subtotal count for each Host and Total for all count, in additional count for all different status.&lt;/P&gt;&lt;P&gt;Host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Count&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostA&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Disconnected&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostA&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Running&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;19&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostA&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;RunningWithErrors&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostA&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;BadConnectivity&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostB&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Disabled&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostB&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Disconnected&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostB&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Running&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;17&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostB&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;RunningWithErrors&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostC&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;BadConnectivity&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostC&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;Running&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="136.375px" height="25px"&gt;HostC&lt;/TD&gt;&lt;TD width="147.172px" height="25px"&gt;RunningWithErrors&lt;/TD&gt;&lt;TD width="40px" height="25px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 27 Aug 2021 11:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565044#M196838</guid>
      <dc:creator>francly</dc:creator>
      <dc:date>2021-08-27T11:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: search language</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565048#M196839</link>
      <description>&lt;P&gt;You need two different searches - one to sum count over hosts (and then do addtotals to get total sum) and another one to sum over statuses. That's the simplest solution I think&lt;/P&gt;</description>
      <pubDate>Fri, 27 Aug 2021 12:21:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565048#M196839</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-08-27T12:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: search language</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565163#M196891</link>
      <description>&lt;P&gt;thanks for response, can you provide the query.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Aug 2021 08:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565163#M196891</guid>
      <dc:creator>francly</dc:creator>
      <dc:date>2021-08-29T08:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: search language</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565173#M196896</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/21120"&gt;@francly&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you could try something like this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index
| stats count BY host Status
| append [ search 
     index=your_index
     | stats count BY host
     | eval Status="Total"
     ]
| sort host Status
| rename host AS Host&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 29 Aug 2021 16:33:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565173#M196896</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-08-29T16:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: search language</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565200#M196908</link>
      <description>&lt;P&gt;You're using count as a splunk function whereas in original post count is a field. So your count will just count the counts &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; and what seems to be really needed is a sum of counts.&lt;/P&gt;&lt;P&gt;And your construction will yield some strange results.&lt;/P&gt;&lt;P&gt;What the OP wanted was simply one:&lt;/P&gt;&lt;PRE&gt;&amp;lt;original search&amp;gt; | stats sum(Count) by Host | addtotals row=f col=t labelfield=Host&lt;/PRE&gt;&lt;P&gt;and two:&lt;/P&gt;&lt;PRE&gt;&amp;lt;original search&amp;gt;| stats sum(Count) by Status | &amp;lt;optionaly addtotals as in example above&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 07:03:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-language/m-p/565200#M196908</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2021-08-30T07:03:45Z</dc:date>
    </item>
  </channel>
</rss>

