Updated the unknown state

This commit is contained in:
RGanor 2022-05-23 16:46:11 +00:00
parent 3d2ad1abc0
commit 1bee833326
2 changed files with 27 additions and 1 deletions

View File

@ -1191,7 +1191,7 @@ def health():
if not domain_to_query: if not domain_to_query:
current_app.logger.error("No domain found to query a health check") current_app.logger.error("No domain found to query a health check")
return make_response("Down", 503) return make_response("Unknown", 503)
try: try:
domain.get_domain_info(domain_to_query.name) domain.get_domain_info(domain_to_query.name)

View File

@ -782,6 +782,32 @@ paths:
'422': '422':
description: 'Returned when something is wrong with the content of the request. Contains an error message' description: 'Returned when something is wrong with the content of the request. Contains an error message'
'/servers/{server_id}/health':
get:
security:
- APIKeyHeader: []
summary: Perfoms health check
operationId: health_check
tags:
- Monitoring
parameters:
- name: server_id
in: path
required: true
description: The id of the server to retrieve
type: string
responses:
'200':
description: Healthcheck succeeded
schema:
type: string
example: "up"
'503':
description: Healthcheck failed
schema:
type: string
example: Down/Unknown
'/pdnsadmin/zones': '/pdnsadmin/zones':
get: get:
security: security: