Improvements to health checks

- Adds a warning endpoint for warning-only checks
- Changes the default for the disk space check to 1%, instead of 10%
- Removes instance services from the overall health check endpoint
This commit is contained in:
Joseph Schorr 2019-02-04 13:17:59 -05:00
parent 6661ee8119
commit cac5f44d15
3 changed files with 75 additions and 31 deletions

View file

@ -257,7 +257,6 @@ def privacy():
return index('')
# TODO(jschorr): Remove this mirrored endpoint once we migrate ELB.
@web.route('/health', methods=['GET'])
@web.route('/health/instance', methods=['GET'])
@process_auth_or_cookie
@ -270,7 +269,6 @@ def instance_health():
return response
# TODO(jschorr): Remove this mirrored endpoint once we migrate pingdom.
@web.route('/status', methods=['GET'])
@web.route('/health/endtoend', methods=['GET'])
@process_auth_or_cookie
@ -283,6 +281,17 @@ def endtoend_health():
return response
@web.route('/health/warning', methods=['GET'])
@process_auth_or_cookie
@no_cache
def warning_health():
checker = get_healthchecker(app, config_provider, instance_keys)
(data, status_code) = checker.check_warning()
response = jsonify(dict(data=data, status_code=status_code))
response.status_code = status_code
return response
@web.route('/health/dbrevision', methods=['GET'])
@route_show_if(features.BILLING) # Since this is only used in production.
@process_auth_or_cookie