Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

percentile() function returns incorrect results #862

Closed
mr-ns opened this issue Jan 9, 2020 · 1 comment · Fixed by #863
Closed

percentile() function returns incorrect results #862

mr-ns opened this issue Jan 9, 2020 · 1 comment · Fixed by #863
Milestone

Comments

@mr-ns
Copy link
Contributor

mr-ns commented Jan 9, 2020

Using Grafana 6.5.2 and Grafana-Zabbix 3.10.5.

The percentile functionality is not computing the expected percentile. Let me explain by example. Consider the following dataset:

grafana-zabbix-percentile_baseline

Now let's ask Grafana-Zabbix to compute the P95 and P25 over these data:

P95
grafana-zabbix-percentile_P95

P25
grafana-zabbix-percentile_P25

Looking at these we make the following observations:

  1. The P95 value are too low. The raw data have a number of time series with CPU usage well over 50%, so the P95 should be higher than (roughly) 25%.
  2. The P95 and P25 graphs are basically the same; that makes no sense at all.
@mr-ns
Copy link
Contributor Author

mr-ns commented Jan 9, 2020

Cutting to the chase, this is akin to issues #498 and #690; in particular the percentile() function is not sorting the dataset before calling groupBy_perf().

mr-ns added a commit to mr-ns/grafana-zabbix that referenced this issue Jan 9, 2020
Like the other aggregation functions, the datapoints need to be sorted in
time before calling groupBy_perf().
@alexanderzobnin alexanderzobnin added this to the 3.11 milestone Jan 11, 2020
alexanderzobnin pushed a commit that referenced this issue Jan 11, 2020
Like the other aggregation functions, the datapoints need to be sorted in
time before calling groupBy_perf().
alexanderzobnin added a commit that referenced this issue Jan 15, 2020
* CI: fix shellcheck issues (#789)

Signed-off-by: Mario Trangoni <[email protected]>

* annotations: fix options in grafana 6.x, fix #813

* fix function editor in Grafana 6.4, closes #810

* add typings for grafana packages

* Add $__range_series variable for calculating function over the whole series, #531

* fix tests

* Don't set alert styles for react panels, fix #823

* docs: add range variables

* docs: percentile reference

* fix codespell

* update packages (build with node 12)

* update circleci node image to 12

* fix test configuration (babel)

* Fix 817 (#851)

* problems: update panel schema

* update packages (build with node 12)

* problems: use datasource from target

* problems: fix query editor after schema update

* problems: fix list layout

* update circleci node image to 12

* fix tests

* build(deps-dev): bump lodash from 4.17.10 to 4.17.13 (#852)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.10 to 4.17.13.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.10...4.17.13)

Signed-off-by: dependabot[bot] <[email protected]>

* fix packages security alerts

* problems: fix tags adding and removal

* fix adding func from typeahead, closes #468

* update change log

* bump plugin version to 3.10.5

* problems: fix tag removal (list layout)

* Fix percentile() function, closes #862 (#863)

Like the other aggregation functions, the datapoints need to be sorted in
time before calling groupBy_perf().

* Update copyright, happy New Year!

* fix not acknowledged problem color with a message (#858)

* fix not acknowledged problem color with a message

* fix not acknowledged problem color with a message, closes #857

* Variable query editor (#856)

* refactor: convert module to typescript

* refactor: covert utils to typescript

* variable query editor WIP

* variable editor: fix type error after grafana/ui update

* variable editor: use FormLabel from grafana/ui

* variable editor: refactor

* variable editor: input validation and highlights

* variable editor: fix tests

* variable query: fix backward compatibility with empty queries

* fix linter errors

* variable editor: fix variable replacement in queries

* Fixes for backend

Co-authored-by: Mario Trangoni <[email protected]>
Co-authored-by: Alexander Zobnin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Reibert <[email protected]>
Co-authored-by: memfiz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants