From 8000550e02937098dd0923a913b385c9a303753c Mon Sep 17 00:00:00 2001 From: Matt Anson Date: Sun, 5 Feb 2023 12:22:01 +0000 Subject: [PATCH] Set HAProxy server timeout for openstack exporter Set the openstack exporter HAProxy backend server timeout to ``prometheus_openstack_exporter_timeout`` to ensure that scrapes that take longer than haproxy_server_timeout don't timeout. Closes-Bug: #2006051 Change-Id: I44841a6b6fa5bf659cace06295d18c093ad7f927 --- ansible/roles/prometheus/defaults/main.yml | 4 ++++ releasenotes/notes/bug-2006051-135bd20d5c465517.yaml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/bug-2006051-135bd20d5c465517.yaml diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index ae5d7292b3..aa274cc310 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -97,11 +97,15 @@ prometheus_services: mode: "http" external: false port: "{{ prometheus_openstack_exporter_port }}" + backend_http_extra: + - "timeout server {{ prometheus_openstack_exporter_timeout }}" prometheus_openstack_exporter_external: enabled: "{{ enable_prometheus_openstack_exporter_external | bool }}" mode: "http" external: true port: "{{ prometheus_openstack_exporter_port }}" + backend_http_extra: + - "timeout server {{ prometheus_openstack_exporter_timeout }}" prometheus-elasticsearch-exporter: container_name: prometheus_elasticsearch_exporter group: prometheus-elasticsearch-exporter diff --git a/releasenotes/notes/bug-2006051-135bd20d5c465517.yaml b/releasenotes/notes/bug-2006051-135bd20d5c465517.yaml new file mode 100644 index 0000000000..2a27a82881 --- /dev/null +++ b/releasenotes/notes/bug-2006051-135bd20d5c465517.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes 504 timeout when scraping openstack exporter. + Ensures that HAProxy server timeout is the same as the + scrape timeout for the openstack exporter backend. + `LP#2006051 `__