Use SERVICE_HOST for url
... so that the endpoint is properly constructed in IPv6-only env. Change-Id: Ie5040fa59ed5bda3e2eff5562d2446ab38bb98e5 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -84,9 +84,9 @@ function wait_for_data {
|
||||
sleep 60
|
||||
}
|
||||
function check_data_node_exporter {
|
||||
if curl -s --head --request GET "http://$HOST_IP:$NODE_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
if curl -s --head --request GET "http://$SERVICE_HOST:$NODE_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
echo "#### Metrics data ####"
|
||||
curl "http://$HOST_IP:$NODE_EXPORTER_PORT/metrics"
|
||||
curl "http://$SERVICE_HOST:$NODE_EXPORTER_PORT/metrics"
|
||||
else
|
||||
die $LINENO "Couldn't get data from node_exporter"
|
||||
fi
|
||||
|
||||
@@ -74,13 +74,13 @@ function wait_for_data {
|
||||
}
|
||||
|
||||
function check_data_openstack_exporter {
|
||||
if curl -s --head --request GET "http://$HOST_IP:$OPENSTACK_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
if curl -s --head --request GET "http://$SERVICE_HOST:$OPENSTACK_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
echo "#### Metrics data ####"
|
||||
curl "http://$HOST_IP:$OPENSTACK_EXPORTER_PORT/metrics"
|
||||
curl "http://$SERVICE_HOST:$OPENSTACK_EXPORTER_PORT/metrics"
|
||||
else
|
||||
die $LINENO "Couldn't get data from openstack_exporter"
|
||||
fi
|
||||
}
|
||||
|
||||
# Restore xtrace
|
||||
$_XTRACE_OPENSTACK_EXPORTER
|
||||
$_XTRACE_OPENSTACK_EXPORTER
|
||||
|
||||
@@ -70,9 +70,9 @@ function wait_for_podman_data {
|
||||
}
|
||||
|
||||
function check_data_podman_exporter {
|
||||
if curl -s --head --request GET "http://$HOST_IP:$PODMAN_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
if curl -s --head --request GET "http://$SERVICE_HOST:$PODMAN_EXPORTER_PORT/metrics" | grep "200 OK" > /dev/null; then
|
||||
echo "#### Metrics data ####"
|
||||
curl "http://$HOST_IP:$PODMAN_EXPORTER_PORT/metrics"
|
||||
curl "http://$SERVICE_HOST:$PODMAN_EXPORTER_PORT/metrics"
|
||||
else
|
||||
die $LINENO "Couldn't get data from podman_exporter"
|
||||
fi
|
||||
|
||||
@@ -141,7 +141,7 @@ function wait_for_data {
|
||||
}
|
||||
|
||||
function check_data_prometheus {
|
||||
local url="http://$HOST_IP:$PROMETHEUS_PORT/api/v1/label/__name__/values"
|
||||
local url="http://$SERVICE_HOST:$PROMETHEUS_PORT/api/v1/label/__name__/values"
|
||||
|
||||
if curl -s --head --request GET "$url" | grep "200 OK" > /dev/null; then
|
||||
echo "#### List of metrics names ####"
|
||||
|
||||
Reference in New Issue
Block a user