Skip to content

Prometheus integration ignores capacity_state #7000

Closed

Description

@benj-n
ISSUE TYPE
  • Bug Report
COMPONENT NAME
Prometheus integration
CLOUDSTACK VERSION
4.17.X
CONFIGURATION
OS / ENVIRONMENT

Irrelevant.

SUMMARY

The prometheus integration returns inconsistent capacity values when a host is in "maintenance" and cloudstack-management service is restarted.

STEPS TO REPRODUCE
1. Set "maintenance" status for a host
2. In database, the capacity rows are deleted in the op_host_capacity table, for the said host
3. Prometheus integration returns capacities with value=0 
4. Restart cloudstack-management service while the host is still in maintenance
5. In database, table op_host_capacity is populated, with capacity_state = Disabled
6. Prometheus integration now returns capacity values from used/total_capacity columns, ignoring the capacity_state
EXPECTED RESULTS
Prometheus integration returns capacity values=0 when the capacity is missing (eg. host is in maintenance) or when the capacity_state is set at Disabled (eg. host in maintenance and service is restarted)
ACTUAL RESULTS
Prometheus integration returns capacity values all the time as long as the used/total_capacity columns exist, ignoring when the capacity_state is Disabled.

Activity

  1. boring-cyborg commented on Dec 20, 2022

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. DaanHoogland commented on Dec 20, 2022

    @DaanHoogland
    Contributor

    @benj-n can you look at #5773 it might do what you need (for 4.18 hopefully)

  3. benj-n commented on Dec 20, 2022

    @benj-n
    ContributorAuthor

    I am under the impression that #4438 has superseded #5773
    And that none of them adds anything related to capacity states.

  4. DaanHoogland commented on Dec 21, 2022

    @DaanHoogland
    Contributor

    I am under the impression that #4438 has superseded #5773 And that none of them adds anything related to capacity states.

    ok, I'll have a look at your PR and try to find some others to do the same.

  5. added this to the 4.18.0.0 milestone on Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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