prometheus icon indicating copy to clipboard operation
prometheus copied to clipboard

discovery(openstack): add load balancer discovery

Open paulojmdias opened this issue 1 year ago • 8 comments

Description

OpenStack Octavia natively supports enabling the Prometheus endpoint on some drivers, like amphora. For that, users need to create a listener with the PROMETHEUS protocol, and the metrics from the load balancer can be scraped automatically.

Adding the loadbalancer role support for the openstack discovery will enhance the ability to dynamically scrape the load balancer metrics without using other manual options.

The code lists all Load Balancers and Listeners from the NewLoadBalancerV2 client and lists all Floating IPs from the NewNetworkV2 client.

References

  • https://docs.openstack.org/octavia/latest/user/guides/monitoring.html

paulojmdias avatar Dec 04 '24 23:12 paulojmdias

It will not need to be reviewed until #14367 is merged since a rebase will be required.

paulojmdias avatar Dec 11 '24 11:12 paulojmdias

@machine424 @jan--f is this in your comfort zone maybe?

beorn7 avatar Dec 17 '24 19:12 beorn7

@jan--f is this in your comfort zone maybe?

Not for me but I' can try to find someone.

jan--f avatar Dec 18 '24 10:12 jan--f

I pinged a few people, asking for feedback. Due to the end of the year, this may take some time.

mrunge avatar Dec 23 '24 08:12 mrunge

This is really great work! I tested out #14367 and this PR together in openstack on openshift environment and I do see octavia metrics osp_octavia

Also, visualized these metrics by importing https://grafana.com/grafana/dashboards/15828-openstack-octavia-amphora-load-balancer/

It would be nice to have operating_status as well in the metrics since DEGRADED operating status of LBs could be concerning.

yadneshk avatar Jan 02 '25 12:01 yadneshk

This is really great work! I tested out #14367 and this PR together in openstack on openshift environment and I do see octavia metrics osp_octavia

Also, visualized these metrics by importing https://grafana.com/grafana/dashboards/15828-openstack-octavia-amphora-load-balancer/

It would be nice to have operating_status as well in the metrics since DEGRADED operating status of LBs could be concerning.

Hi @yadneshk,

Many thanks for the feedback.

I agree that the operating_status can be added to target labels for use if needed. I will work on the addition as well as rename loadbalancer_status to loadbalancer_provisioning_status to be clear between both status labels.

paulojmdias avatar Jan 02 '25 14:01 paulojmdias

This is really great work! I tested out #14367 and this PR together in openstack on openshift environment and I do see octavia metrics osp_octavia Also, visualized these metrics by importing https://grafana.com/grafana/dashboards/15828-openstack-octavia-amphora-load-balancer/ It would be nice to have operating_status as well in the metrics since DEGRADED operating status of LBs could be concerning.

Hi @yadneshk,

Many thanks for the feedback.

I agree that the operating_status can be added to target labels for use if needed. I will work on the addition as well as rename loadbalancer_status to loadbalancer_provisioning_status to be clear between both status labels.

@yadneshk added on commit https://github.com/prometheus/prometheus/pull/15539/commits/cb7254158b335e9c7110d7a05bbf2dd2b21b98fb

Feel free to re-test it if you can 🙏

paulojmdias avatar Jan 02 '25 14:01 paulojmdias

@paulojmdias operating and provisioning status look good now

yadneshk avatar Jan 06 '25 07:01 yadneshk

@yadneshk thanks for reviewing this.

@machine424 @jan--f does this look good to you to get merged?

beorn7 avatar Jan 08 '25 15:01 beorn7

@beorn7 I think this change here looks good but #14367 needs to be approved and merged before this can go in.

jan--f avatar Jan 09 '25 09:01 jan--f

Since PR #14367 was merged, I rebased this code to include the incoming changes.

@machine424 @jan--f you can review when you can. 🙌

paulojmdias avatar Jan 21 '25 11:01 paulojmdias

This review should be aligned with #15558, the PR will be merged first, and then the other one will need a rebase.

paulojmdias avatar Jan 28 '25 11:01 paulojmdias