A previous change (cf2d127) set SERVICE_HOST for constructing
exporter URLs, but SERVICE_HOST references to the controller
node IP. This breaks multinode deployments where exporters are
running on subnodes, as the health checks would try to reach the
controller instead of the local node.
This change properly checks SERVICE_IP_VERSION and uses HOST_IPV6
for IPv6 environments or HOST_IP for IPv4, ensuring the URL points
to the correct node where the exporter is actually running.
Additionally, IPv6 addresses are wrapped in square brackets as
required for URLs (e.g., http://[2001:db8::1]:9100/metrics).
A common get_host_ip_for_url function is introduced in lib/common
to centralize IP version handling and avoid code duplication across
all exporter modules.
Assisted-By: Claude (claude-sonnet-4-5)
Closes-Bug: #2141918
Change-Id: Icff76c7dc52d6444aa1c049dd6eada27016f4166
Signed-off-by: Douglas Viroel <viroel@gmail.com>
Devstack Prometheus Plugin
Overview
Devstack plugin to configure prometheus, node-exporter, pushgateway and alertmanager.
Usage
To get started quickly, just enable the plugin in your
local.conf:enable_plugin devstack-plugin-prometheus https://opendev.org/openstack/devstack-plugin-prometheus
Description
DevStack plugin to install and configure prometheus, node-exporter, pushgateway and alertmanager.
Languages
Shell
100%