healthchecks: service checks for rabbit, swift-*, mysql
Change-Id: I219a01077f5ea3209cbb40b6f27fdbfa638386f7 Implements: blueprint container-healthchecks
This commit is contained in:
parent
c072679220
commit
ab44c4500f
3
healthcheck/mariadb
Executable file
3
healthcheck/mariadb
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
mysql -e 'show databases' || exit 1
|
3
healthcheck/rabbitmq
Executable file
3
healthcheck/rabbitmq
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
rabbitmqctl node_health_check || exit 1
|
14
healthcheck/swift-account-server
Executable file
14
healthcheck/swift-account-server
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/tripleo-common/healthcheck}/common.sh
|
||||
|
||||
conf=/etc/swift/account-server.conf
|
||||
|
||||
if ! crudini --get $conf pipeline:main pipeline | grep -q healthcheck; then
|
||||
echo "healthcheck is not available" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
|
||||
bind_port=$(get_config_val $conf DEFAULT bind_port 6002)
|
||||
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck
|
14
healthcheck/swift-container-server
Executable file
14
healthcheck/swift-container-server
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/tripleo-common/healthcheck}/common.sh
|
||||
|
||||
conf=/etc/swift/container-server.conf
|
||||
|
||||
if ! crudini --get $conf pipeline:main pipeline | grep -q healthcheck; then
|
||||
echo "healthcheck is not available" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
|
||||
bind_port=$(get_config_val $conf DEFAULT bind_port 6001)
|
||||
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck
|
14
healthcheck/swift-object-server
Executable file
14
healthcheck/swift-object-server
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/tripleo-common/healthcheck}/common.sh
|
||||
|
||||
conf=/etc/swift/object-server.conf
|
||||
|
||||
if ! crudini --get $conf pipeline:main pipeline | grep -q healthcheck; then
|
||||
echo "healthcheck is not available" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
|
||||
bind_port=$(get_config_val $conf DEFAULT bind_port 6000)
|
||||
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck
|
14
healthcheck/swift-proxy
Executable file
14
healthcheck/swift-proxy
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/tripleo-common/healthcheck}/common.sh
|
||||
|
||||
conf=/etc/swift/proxy-server.conf
|
||||
|
||||
if ! crudini --get $conf pipeline:main pipeline | grep -q healthcheck; then
|
||||
echo "healthcheck is not available" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
bind_host=$(get_config_val $conf DEFAULT bind_ip 127.0.0.1)
|
||||
bind_port=$(get_config_val $conf DEFAULT bind_port 8080)
|
||||
healthcheck_curl http://${bind_host}:${bind_port}/healthcheck
|
Loading…
x
Reference in New Issue
Block a user