Skip to content

Put the RadosGW Usage Exporter behind HAProxy #1697

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

Merged
merged 3 commits into from
Jun 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/kayobe/ansible/deploy-radosgw-usage-exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
ADMIN_ENTRY: admin
ACCESS_KEY: "{{ ec2.Access }}"
SECRET_KEY: "{{ ec2.Secret }}"
VIRTUAL_PORT: "{{ stackhpc_radosgw_usage_exporter_port | string }}"
VIRTUAL_PORT: "{{ stackhpc_radosgw_usage_exporter_backend_port | string }}"
REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"
entrypoint: "{{ ['python', '-u', './radosgw_usage_exporter.py', '--insecure'] if not stackhpc_radosgw_usage_exporter_verify else omit }}"
vars:
Expand Down
2 changes: 2 additions & 0 deletions etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ kolla_build_args: {}
kolla_overcloud_inventory_pass_through_host_vars_extra:
- stackhpc_gpu_data
- gpu_group_map
- stackhpc_radosgw_usage_exporter_frontend_port
- stackhpc_radosgw_usage_exporter_backend_port

# List of names of host variables to pass through from kayobe hosts to
# kolla-ansible hosts, if set. See also
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% if stackhpc_enable_radosgw_usage_exporter | bool %}
{% raw %}
frontend radosgw_usage_exporter_frontend
mode http
http-request del-header X-Forwarded-Proto
option httplog
option forwardfor
http-request set-header X-Forwarded-Proto https if { ssl_fc }
{% if kolla_enable_tls_internal | bool %}
bind {{ kolla_internal_vip_address }}:{{ stackhpc_radosgw_usage_exporter_frontend_port }} ssl crt /etc/haproxy/certificates/haproxy-internal.pem
{% else %}
bind {{ kolla_internal_vip_address }}:{{ stackhpc_radosgw_usage_exporter_frontend_port }}
{% endif %}
default_backend radosgw_usage_exporter_backend

backend radosgw_usage_exporter_backend
mode http

{% for host in groups['monitoring'] %}
{% set host_name = hostvars[host].ansible_facts.hostname %}
{% set host_ip = 'api' | kolla_address(host) %}
server {{ host_name }} {{ host_ip }}:{{ stackhpc_radosgw_usage_exporter_backend_port }} check inter 2000 rise 2 fall 5
{% endfor %}
{% endraw %}
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ scrape_configs:
regex: (.+)
static_configs:
- targets:
{% for host in groups['monitoring'] %}
- "{{ 'api' | kolla_address(host) | put_address_in_context('url') }}:{% endraw %}{{ stackhpc_radosgw_usage_exporter_port }}{% raw %}"
{% endfor %}
- "{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ stackhpc_radosgw_usage_exporter_frontend_port }}"
{% if kolla_enable_tls_internal | bool %}
scheme: https
{% endif %}
{% endraw %}
{% endif %}
7 changes: 5 additions & 2 deletions etc/kayobe/stackhpc-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ stackhpc_prometheus_openstack_exporter_interval: 300
# Prometheus scrape targets during deployment.
stackhpc_enable_radosgw_usage_exporter: false

# Port to expose RADOS gateway usage exporter. Default is 9242
stackhpc_radosgw_usage_exporter_port: 9242
# Port to expose RADOS gateway usage exporter backend. Default is 9242
stackhpc_radosgw_usage_exporter_backend_port: 9242

# Port to expose RADOS gateway usage exporter frontend (via HAProxy). Default is 9240
stackhpc_radosgw_usage_exporter_frontend_port: 9240

# Path to a certificate for internal TLS in the RADOS gateway usage exporter.
stackhpc_radosgw_usage_exporter_cacert: ""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
features:
- |
The radosgw-usage-exporter is now put behind HAProxy. To facilitate this,
``stackhpc_radosgw_usage_exporter_port`` had been renamed to
``stackhpc_radosgw_usage_exporter_backend_port`` (it remains 9242) and
``stackhpc_radosgw_usage_exporter_frontend_port`` (defaults to 9240) has
been introduced.
fixes:
- |
Fixes an issue where object storage metrics were missing from Prometheus by
putting the radosgw-usage-exporter behind HAProxy.
Loading