Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

KairosDB plugin adding unwanted avg aggregator #34

Closed
dvenza opened this issue Oct 1, 2016 · 4 comments
Closed

KairosDB plugin adding unwanted avg aggregator #34

dvenza opened this issue Oct 1, 2016 · 4 comments

Comments

@dvenza
Copy link

dvenza commented Oct 1, 2016

Grafana 3.1.1-1470047149 (ubuntu trusty)

I'm plotting data from KairosDB related to host status (cpu, memory, etc.)

I'm trying to generate sums, for example sum all CPU usage for all hosts of a particular subset, so that we can have a nice line that says how much load is there for real. I do not want an average.

This is the query I build:
capture

The plot shows something that is not a sum, more like an average. If I look at the request in the browser I see this:

{"metrics":
  [
    {
     "name":"cpu",
     "aggregators": [
       {"name":"avg", "align_sampling":true, "sampling":{"value":"15","unit":"seconds"} },
       {"name":"sum","sampling":{"value":"10","unit":"seconds"}, "align_sampling":true }
  ],
  "tags":{"host":["bf1","bf2","bf3","bf4"],"cpu":["cpu0","cpu-total"]}}],
  "cache_time":0,
  "start_relative":{"value":"3","unit":"hours"},"end_relative":{"value":"1","unit":"minutes"}
}

There is my sum aggregator, but there is also an avg aggregator with an interval of 15 seconds that I have never defined.
The downsampling is also set to (NONE)

Any hint?

@dvenza
Copy link
Author

dvenza commented Oct 3, 2016

For some reason it is ignoring the downsampling setting. When I force it to (NONE) via the javascript debugger, it starts working.
Also I think downsampling should be added as the last aggregation, not the first.

@DanoOM
Copy link

DanoOM commented Oct 8, 2016

Ditto..I'm seeing the same issue, the average aggregator is messing up the results, but no way to 'remove it' :(

@OskarKjellin
Copy link

I managed to solve it. Would be happy to make a PR but the code that you get when you install the plugin through grafana does not match what's on git, so my diff would be quite large and not sure what's the latest.

A non code workaround is to set the downsampling to what you want in the dropdown, remove the metric (it's added by default, remove it) and then add it back. The value is taken correctly, but only when the metric i created

@dvenza
Copy link
Author

dvenza commented Nov 25, 2016

This bug is actually fixed (they removed the downsampling entirely) on this repo, master branch.

The version of this plugin on grafana.net is very outdated and should not be used.

@jifwin jifwin closed this as completed Dec 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants