Add healthcheck script for ceilometer-agent-compute

This patch adds script for docker health check of ceilometer-agent-compute
service. The script checks existance of service with opened connections
to RabbitMQ.

Change-Id: I4a193d7ce1c455da2865498470ed3b98160df112
(cherry picked from commit b89e679ce1)
This commit is contained in:
Martin Mágr 2018-03-13 13:10:15 +01:00
parent 783eb42176
commit 86b078e01e
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='ceilometer-polling'
args="${@:-5671 5672}"
if healthcheck_port $process $args; then
exit 0
else
ports=${args// /,}
echo "There is no $process process with opened RabbitMQ ports ($ports) running in the container"
exit 1
fi