Skip to content

Exported metrics have a domain instead of the full path #6859

@vdombrovski

Description

@vdombrovski
ISSUE TYPE
  • Bug Report
COMPONENT NAME
API / metrology
CLOUDSTACK VERSION
4.17.1.0
CONFIGURATION
OS / ENVIRONMENT

Irrelevant

SUMMARY

Prometheus metrics are grouped by domain, however the domain name provided isn't the full path. This leads to some duplicate labels whenever your domain names aren't unique

STEPS TO REPRODUCE
  1. Create a domain /ROOT/CUSTOMER_A/CLOUD
  2. Create a domain /ROOT/CUSTOMER_B/CLOUD
  3. Enabled prometheus metrics inside UI configuration and restart management
  4. Gather Prometheus metrics (here demonstrated using curl): curl "http://127.0.0.1:9595/metrics"
EXPECTED RESULTS

Either a full path or the parent is reported

cloudstack_domain_resource_count{domain="CLOUD", path="/ROOT/CUSTOMER_A/CLOUD", type="cpu"} 0
cloudstack_domain_resource_count{domain="CLOUD", path="/ROOT/CUSTOMER_B/CLOUD", type="cpu"} 0
ACTUAL RESULTS
cloudstack_domain_resource_count{domain="CLOUD", type="cpu"} 0
cloudstack_domain_resource_count{domain="CLOUD", type="cpu"} 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions