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

discovery(openstack): add load balancer discovery #15539

Merged
merged 15 commits into from
Jan 28, 2025

Conversation

paulojmdias
Copy link
Contributor

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

paulojmdias and others added 6 commits December 4, 2024 23:34

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias paulojmdias changed the title discovery: add openstack load balancer discovery discovery(openstack): add load balancer discovery Dec 8, 2024
@paulojmdias
Copy link
Contributor Author

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

@beorn7 beorn7 requested review from machine424 and jan--f December 17, 2024 19:44
@beorn7
Copy link
Member

beorn7 commented Dec 17, 2024

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

@jan--f
Copy link
Contributor

jan--f commented Dec 18, 2024

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

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

@mrunge
Copy link

mrunge commented Dec 23, 2024

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

@yadneshk
Copy link

yadneshk commented Jan 2, 2025

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.

@paulojmdias
Copy link
Contributor Author

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 and others added 3 commits January 2, 2025 14:43
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…dias/prometheus into openstack-loadbalancer-discovery

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias
Copy link
Contributor Author

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 cb72541

Feel free to re-test it if you can 🙏

@yadneshk
Copy link

yadneshk commented Jan 6, 2025

@paulojmdias operating and provisioning status look good now

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
…dias/prometheus into openstack-loadbalancer-discovery

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@beorn7
Copy link
Member

beorn7 commented Jan 8, 2025

@yadneshk thanks for reviewing this.

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

@jan--f
Copy link
Contributor

jan--f commented Jan 9, 2025

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

…k-loadbalancer-discovery

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
@paulojmdias
Copy link
Contributor Author

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

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

@paulojmdias
Copy link
Contributor Author

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

Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jan--f jan--f merged commit ffea9f0 into prometheus:main Jan 28, 2025
26 checks passed
@paulojmdias paulojmdias deleted the openstack-loadbalancer-discovery branch January 28, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants