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
merged 6 commits into from Mar 4, 2019

Conversation

@cakrit
Copy link
Contributor

cakrit commented Mar 1, 2019

Summary

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

Caveats:

  • 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
@cakrit

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
Collaborator

paulfantom left a comment

tests need some cleanup

@ktsaou
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
Details
LGTM analysis: JavaScript Running analyses for revisions
Details
Header rules - netdata No header rules processed
Details
Pages changed - netdata 2 new files uploaded
Details
Redirect rules - netdata No redirect rules processed
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
LGTM analysis: Python No code changes detected
Details
Mixed content - netdata No mixed content detected
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
license/cla Contributor License Agreement is signed.
Details
netlify/netdata/deploy-preview Deploy preview ready!
Details
@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
Projects
None yet
4 participants
You can’t perform that action at this time.