tripleo-common/healthcheck/tacker
Martin Mágr 21c90acfef Add healthcheck script for Tacker
This patch adds script for docker health check of tacker-server service.
The script checks API service using curl.

Change-Id: Iabc042d2539963fdc59ec538e269c83f87c1843f
2018-02-19 13:32:46 +00:00

13 lines
391 B
Bash

#!/bin/sh
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
bind_host=$(get_config_val /etc/tacker/tacker.conf DEFAULT bind_host 127.0.0.1)
bind_port=$(get_config_val /etc/tacker/tacker.conf DEFAULT bind_port 9890)
# Add brackets if IPv6
if [[ $bind_host =~ ":" ]]; then
bind_host="[${bind_host}]"
fi
healthcheck_curl http://${bind_host}:${bind_port}/