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

Host is counted twice if it has multiple host tags in Prometheus exporter #4383

Merged

Conversation

ustcweizhou
Copy link
Contributor

Description

If hosts have multiple host tags, the total/up/down hosts in prometheus exporter are not correct.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@DaanHoogland DaanHoogland added this to the 4.14.1.0 milestone Oct 6, 2020
@blueorangutan
Copy link

@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2132

@blueorangutan
Copy link

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2138

@blueorangutan
Copy link

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2139

@Pearl1594
Copy link
Contributor

@ustcweizhou @DaanHoogland
Seems like the build failure is because it is unable to resolve HostVO and hostDao isn't injected

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project cloud-plugin-integrations-prometheus-exporter: Compilation failure: Compilation failure: 
[ERROR] /jenkins/workspace/acs-pr-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.14.1.0-SNAPSHOT/plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java:[103,33] error: cannot find symbol
[ERROR]   symbol:   variable hostDao
[ERROR]   location: class PrometheusExporterImpl
[ERROR] /jenkins/workspace/acs-pr-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.14.1.0-SNAPSHOT/plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java:[103,19] error: cannot find symbol
[ERROR]   symbol:   class HostVO
[ERROR]   location: class PrometheusExporterImpl
[ERROR] -> [Help 1]

@GabrielBrascher
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@GabrielBrascher a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2141

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2147

@rohityadavcloud
Copy link
Member

LGTM, changes are strictly in promethus plugin; merging based on lgtms and travis tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants