Add healthcheck script for gnocchi-metricd

This patch adds script for docker health check of gnocchi-metricd service.
The script checks existance of service with opened connections to Redis.

Change-Id: Icbf450a797f95fb5966005295bd33975077e4aa5
This commit is contained in:
Martin Mágr 2018-01-26 12:52:13 +01:00
parent 1550e16d6e
commit 56e05efc56
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#!/bin/bash
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh
process='gnocchi-metricd'
args="${@:-6379}"
if healthcheck_port $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process with opened Redis ports ($ports) running in the container"
exit 1
fi