<?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 can i calculate sum of values from different hosts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454404#M177019</link>
    <description>&lt;P&gt;No, this doesn't work too&lt;BR /&gt;
Your solution calculates only sum of metrics from all hosts at the current moment and dysplay them&lt;BR /&gt;
But i need sum of metrics from all hosts at the current moment and statistic like from earliest bound of period till latest bound of period we have increase sum of metrics on 16 for example, so in the earliest bound we had 12 and in latest we have 28&lt;BR /&gt;
And single value visualisation allows us to display such statistic&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 06:25:31 GMT</pubDate>
    <dc:creator>mishaaaaaaaaaa</dc:creator>
    <dc:date>2019-02-07T06:25:31Z</dc:date>
    <item>
      <title>How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454396#M177011</link>
      <description>&lt;P&gt;Hi, splunkers!&lt;BR /&gt;
I have 4 hosts, and i need to culculate total sum of values contained in each event &lt;BR /&gt;
In other words i have:&lt;BR /&gt;
host1: value1&lt;BR /&gt;
host2: value2&lt;BR /&gt;
host3: value3&lt;BR /&gt;
host4: value4&lt;BR /&gt;
and i need to calculate value1+value2+value3+value4 and display it in Single Value splunk visualisation&lt;BR /&gt;
i try to do it like this:&lt;BR /&gt;
index=myIndex host=host1 OR host=host2 OR host=host3 OR host=host4&lt;BR /&gt;
| timechart max(value) by host as "Total Max Value"&lt;/P&gt;

&lt;P&gt;but i have max value from all hosts displayed&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 07:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454396#M177011</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-06T07:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454397#M177012</link>
      <description>&lt;P&gt;hi @mishaaaaaaaaaa &lt;/P&gt;

&lt;P&gt;Try this &lt;CODE&gt;index=myIndex host=host1 OR host=host2 OR host=host3 OR host=host4| stats sum(value) as "Total Max Value"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 07:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454397#M177012</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-06T07:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454398#M177013</link>
      <description>&lt;P&gt;i tryed to do it like you suggested, but in this case i have sum of values by all period&lt;BR /&gt;
and i need value by the current moment&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 07:55:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454398#M177013</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-06T07:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454399#M177014</link>
      <description>&lt;P&gt;Can you just change the timepicker to be "last 15 minutes"? Does that do what you want?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 07:57:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454399#M177014</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-06T07:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454400#M177015</link>
      <description>&lt;P&gt;I need to see statistic by 2 hour but display only current value at the moment but not a sum of values since the system have been started&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 08:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454400#M177015</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-06T08:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454401#M177016</link>
      <description>&lt;P&gt;ok I understand now. Try this &lt;CODE&gt;index=myIndex host=host1 OR host=host2 OR host=host3 OR host=host4| stats latest(value) as "Latest Value"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 08:13:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454401#M177016</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-06T08:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454402#M177017</link>
      <description>&lt;P&gt;No, this doesn't work&lt;BR /&gt;
i found something like this, but it also works bad&lt;/P&gt;

&lt;P&gt;index=myIndex | bucket _time  span=2h | stats max($module$.metric.sampleCount) as metricValueFromAllHosts by host, _time | timechart span=2h sum(metricValueFromAllHosts)&lt;/P&gt;

&lt;P&gt;this solution correctly display the sum of metric.sampleCount from all hasts, but doesn't display statistic like if i had metric.sampleCount=16 two hours ago and now i have 32, it shows 0 always&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 14:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454402#M177017</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-06T14:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454403#M177018</link>
      <description>&lt;P&gt;OK last try. What about &lt;CODE&gt;index=myIndex host=host1 OR host=host2 OR host=host3 OR host=host4| stats latest(value) as latest by host | stats sum(latest)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:55:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454403#M177018</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2019-02-06T18:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454404#M177019</link>
      <description>&lt;P&gt;No, this doesn't work too&lt;BR /&gt;
Your solution calculates only sum of metrics from all hosts at the current moment and dysplay them&lt;BR /&gt;
But i need sum of metrics from all hosts at the current moment and statistic like from earliest bound of period till latest bound of period we have increase sum of metrics on 16 for example, so in the earliest bound we had 12 and in latest we have 28&lt;BR /&gt;
And single value visualisation allows us to display such statistic&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 06:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454404#M177019</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-07T06:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454405#M177020</link>
      <description>&lt;P&gt;@mishaaaaaaaaaa &lt;/P&gt;

&lt;P&gt;Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=myIndex host=host1 OR host=host2 OR host=host3 OR host=host4| stats sum(value) as latest by host | stats sum(latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Feb 2019 07:35:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454405#M177020</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-02-07T07:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: How can i calculate sum of values from different hosts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454406#M177021</link>
      <description>&lt;P&gt;Thanks a lot for everyone for your answers, the problem was because my metric accumulates to previous values.&lt;BR /&gt;
In my case this solution works correct:&lt;BR /&gt;
index=someIndex | bucket _time | stats max(metric.sampleCount) as metricValueFromAllHosts by host, _time | timechart  sum(metricValueFromAllHosts)&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 06:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-calculate-sum-of-values-from-different-hosts/m-p/454406#M177021</guid>
      <dc:creator>mishaaaaaaaaaa</dc:creator>
      <dc:date>2019-02-08T06:05:54Z</dc:date>
    </item>
  </channel>
</rss>

