Add status check for auth endpoint

This commit is contained in:
Joseph Schorr 2017-05-10 20:55:19 -07:00
parent 0dfb6806e3
commit e44a503bd0

View file

@ -1,5 +1,5 @@
import logging
from app import build_logs, storage
from app import build_logs, storage, authentication
from health.models_pre_oci import pre_oci_model as model
logger = logging.getLogger(__name__)
@ -46,12 +46,18 @@ def _check_storage(app):
logger.exception('Storage check failed with exception %s', ex)
return False
def _check_auth(app):
""" Returns the status of the auth engine, as accessed from this instance. """
(status, _) = authentication.ping()
return status
_SERVICES = {
'registry_gunicorn': _check_registry_gunicorn,
'database': _check_database,
'redis': _check_redis,
'storage': _check_storage,
'auth': _check_auth,
}
def check_all_services(app, skip):