tripleo-common/healthcheck
Cédric Jeanneret 89d2393ea9 Silent file descriptor checks
In order to avoid spam in journald, we just get the exit code and let
the checker output the error message.

Also, correct how we retrieve process in the healthcheck_port and _listen
functions.
"ss" doesn't allow to match some processes, like "neutron-l3-agent". We
therefore use the PID instead, provided by "pgrep".
The "-d" option of pgrep allow to prepare its output for the "grep -E",
preventing any need of a loop.

Change-Id: I1555a9b79c954e646fe9ae35272231c581cea03e
Closes-Bug: #1821782
Closes-Bug: #1821856
(cherry picked from commit 5312bf19c8)
2020-03-17 07:39:22 +01:00
..
releasenotes/notes IPv6 healthcheck fixes for nova-vnc-proxy 2018-12-17 13:40:16 +00:00
README.md Add health check for services connected to RabbitMQ 2017-07-25 14:10:21 +02:00
aodh-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
aodh-evaluator Fix nova_vnc_proxy, ceilometer_agent_central and aodh_evaluator health check 2017-10-23 11:32:13 +00:00
aodh-listener Set healthchecks executable. 2017-08-21 17:59:39 -04:00
aodh-notifier Set healthchecks executable. 2017-08-21 17:59:39 -04:00
barbican-api Add healthchecks for barbican containers 2018-02-19 13:32:42 +00:00
barbican-keystone-listener Add healthchecks for barbican containers 2018-02-19 13:32:42 +00:00
barbican-worker Add healthchecks for barbican containers 2018-02-19 13:32:42 +00:00
ceilometer-agent-central Fix nova_vnc_proxy, ceilometer_agent_central and aodh_evaluator health check 2017-10-23 11:32:13 +00:00
ceilometer-agent-compute Fix ceilometer_agent_compute health check 2019-11-12 13:46:26 +01:00
ceilometer-agent-ipmi Fix gnocchi_statsd and ceilometer_agent_ipmi healthcheck 2018-07-11 16:38:14 +02:00
ceilometer-agent-notification Set healthchecks executable. 2017-08-21 17:59:39 -04:00
cinder-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
cinder-backup Set healthchecks executable. 2017-08-21 17:59:39 -04:00
cinder-scheduler Set healthchecks executable. 2017-08-21 17:59:39 -04:00
cinder-volume Set healthchecks executable. 2017-08-21 17:59:39 -04:00
collectd Activate new healthchecks 2018-03-07 10:44:59 +01:00
common.sh Silent file descriptor checks 2020-03-17 07:39:22 +01:00
etcd Activate new healthchecks 2018-03-07 10:44:59 +01:00
fluentd Add fluentd health check 2018-04-16 16:41:06 +02:00
glance-api IPv6 healthcheck fixes for Glance/Swift 2017-12-02 10:10:22 -05:00
gnocchi-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
gnocchi-metricd Activate new healthchecks 2018-03-07 10:44:59 +01:00
gnocchi-statsd Fix gnocchi_statsd and ceilometer_agent_ipmi healthcheck 2018-07-11 16:38:14 +02:00
heat-api Update heat container healthchecks 2018-07-11 16:57:24 -06:00
heat-api-cfn Update heat container healthchecks 2018-07-11 16:57:24 -06:00
heat-engine Set healthchecks executable. 2017-08-21 17:59:39 -04:00
horizon Update the horizon vhost filename 2018-04-20 15:19:48 +01:00
ironic-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
ironic-conductor Set healthchecks executable. 2017-08-21 17:59:39 -04:00
ironic-inspector Add Ironic inspector health checks 2018-11-01 12:46:48 +00:00
ironic-pxe Activate new healthchecks 2018-03-07 10:44:59 +01:00
iscsid Activate new healthchecks 2018-03-07 10:44:59 +01:00
keystone-admin Make curl healthchecks work with internal TLS 2017-08-30 13:19:25 +02:00
keystone-public Make curl healthchecks work with internal TLS 2017-08-30 13:19:25 +02:00
manila-scheduler Set healthchecks executable. 2017-08-21 17:59:39 -04:00
mariadb Add clustercheck healthcheck 2017-08-29 12:39:59 +02:00
memcached healthcheck/memcached: add brackets if ipv6 2018-07-09 12:05:37 -05:00
mistral-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
mistral-engine Set healthchecks executable. 2017-08-21 17:59:39 -04:00
mistral-event-engine Activate new healthchecks 2018-03-07 10:44:59 +01:00
mistral-executor Set healthchecks executable. 2017-08-21 17:59:39 -04:00
multipathd Activate new healthchecks 2018-03-07 10:44:59 +01:00
neutron-api Fix healthcheck script for neutron-api service 2018-04-04 12:00:15 +02:00
neutron-dhcp Set healthchecks executable. 2017-08-21 17:59:39 -04:00
neutron-l3 Set healthchecks executable. 2017-08-21 17:59:39 -04:00
neutron-metadata Set healthchecks executable. 2017-08-21 17:59:39 -04:00
neutron-ovs-agent Set healthchecks executable. 2017-08-21 17:59:39 -04:00
neutron-sriov-agent Add healthcheck script for neutron-sriov-agent 2018-03-26 14:31:50 +00:00
nova-api Fix nova-api healthcheck 2018-11-16 14:35:45 +01:00
nova-compute Healthcheck for nova_migration_target container 2017-11-07 12:30:28 +01:00
nova-conductor Set healthchecks executable. 2017-08-21 17:59:39 -04:00
nova-consoleauth Set healthchecks executable. 2017-08-21 17:59:39 -04:00
nova-ironic Set healthchecks executable. 2017-08-21 17:59:39 -04:00
nova-libvirt Add healthcheck script for libvirtd 2018-03-26 14:32:01 +00:00
nova-metadata nova_metadata healthcheck script 2018-08-21 17:30:36 +02:00
nova-placement Take WSGIScriptAlias into account in docker healthcheck. 2018-07-17 09:25:33 +02:00
nova-scheduler Set healthchecks executable. 2017-08-21 17:59:39 -04:00
nova-vnc-proxy IPv6 healthcheck fixes for nova-vnc-proxy 2018-12-17 13:40:16 +00:00
octavia-api Fixup octavia-api healthcheck 2019-10-02 17:32:12 +02:00
octavia-health-manager Add and fix healthcheck scripts for Octavia services 2018-03-21 16:34:59 +01:00
octavia-housekeeping Add and fix healthcheck scripts for Octavia services 2018-03-21 16:34:59 +01:00
octavia-worker Set healthchecks executable. 2017-08-21 17:59:39 -04:00
opendaylight-api Make ODL healthcheck IPv6 compatible 2018-10-08 04:57:55 +00:00
ovn-controller Add health check for OVN containers 2018-06-07 12:38:56 +02:00
ovn-dbs Add health check for OVN containers 2018-06-07 12:38:56 +02:00
ovn-metadata Fix health check for ovn-metadata 2018-02-08 14:47:56 +00:00
panko-api Activate new healthchecks 2018-03-07 10:44:59 +01:00
rabbitmq healthchecks: service checks for rabbit, swift-*, mysql 2017-07-28 02:42:50 +00:00
redis Fix redis healthcheck 2018-05-16 18:31:28 -06:00
sahara-api Add health check script for Sahara API 2018-11-09 10:56:26 +01:00
sahara-engine Set healthchecks executable. 2017-08-21 17:59:39 -04:00
sensu-client Set healthchecks executable. 2017-08-21 17:59:39 -04:00
swift-account-replicator Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-account-server Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-container-replicator Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-container-server Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-object-replicator Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-object-server Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-proxy Improve Swift healthchecks 2019-11-15 12:53:45 +01:00
swift-rsync Add health checks for Swift services 2018-11-09 10:56:26 +01:00
tacker Activate new healthchecks 2018-03-07 10:44:59 +01:00
zaqar-api Add new healthchecks for zaqar services 2019-05-01 14:40:23 +00:00
zaqar-socket Add new healthchecks for zaqar services 2019-05-01 14:40:23 +00:00

README.md

Health check commands

The scripts in this directory are meant to implement the container-healthcheck blueprint. They are written to be compatible with the Docker HEALTHCHECK api.

The scripts expect to source /usr/share/tripleo-common/healthcheck/common.sh. If you want to run scripts without installing to that file, you can set the HEALTHCHECKS_DIR environment variable, e.g:

$ export HEALTHCHECKS_DIR=$PWD
$ ./heat-api
{"versions": [{"status": "CURRENT", "id": "v1.0", "links": [{"href": "http://192.168.24.1:8004/v1/", "rel": "self"}]}]}
300 192.168.24.1:8004 0.002 seconds