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

Support legacy Prometheus metric names for source average #5531

merged 6 commits into from Mar 4, 2019


Copy link

cakrit commented Mar 1, 2019


Fixes #5527

Component Name
Additional Information

Support older prometheus metric unit naming and allow removal of units from metrics when source=average, which is the default operation of /api/v1/allmetrics?format=prometheus


  • Can't fix all the KiB/s, as in some cases the old unit representation was kilobytes_persec and in others KB_persec.

  • Deliberately left out a couple of replacements, because the old unit representation was completely wrong.

  • Replace metric names

  • Update swagger

  • Add tests for CI

TODO after PR is merged: Validate remaining changes are deliberate
It's a bit difficult for the user who reported the issue to do the following, a follow up PR will add any other needed mappings between new and old unit representations.

@cakrit cakrit requested review from ktsaou, paulfantom and vlvkobal as code owners Mar 1, 2019

This comment has been minimized.

Copy link
Contributor Author

cakrit commented Mar 1, 2019

@paulfantom please let me know if I need to do something in this PR to integrate tests/backends/prometheus.bats to our checks. It obviously needs a running netdata at localhost:19999

@cakrit cakrit changed the title [WIP] Support legacy Prometheus metric names for source average Support legacy Prometheus metric names for source average Mar 2, 2019
Copy link

paulfantom left a comment

tests need some cleanup

ktsaou approved these changes Mar 4, 2019
@cakrit cakrit merged commit 56ac9f5 into netdata:master Mar 4, 2019
10 of 12 checks passed
10 of 12 checks passed
LGTM analysis: C/C++ Running analyses for revisions
LGTM analysis: JavaScript Running analyses for revisions
Header rules - netdata No header rules processed
Pages changed - netdata 2 new files uploaded
Redirect rules - netdata No redirect rules processed
Codacy/PR Quality Review Up to standards. A positive pull request.
LGTM analysis: Python No code changes detected
Mixed content - netdata No mixed content detected
Travis CI - Pull Request Build Passed
WIP Ready for review
license/cla Contributor License Agreement is signed.
netlify/netdata/deploy-preview Deploy preview ready!
@cakrit cakrit deleted the cakrit:prometheus_units branch Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.