Complete the code to define a health check endpoint that returns a success status.
GET /health [1] 200 OK
The health check endpoint should return a 200 OK status to indicate the service is healthy.
Complete the code to specify the type of health check that verifies database connectivity.
HealthCheck: type = [1]The health check type for verifying database connectivity is database.
Fix the error in the health check configuration to correctly set the check interval.
check_interval = [1] secondsThe interval should be a numeric value without quotes or words, so 5 is correct.
Fill both blanks to complete the health check response indicating service status and uptime.
response = {"status": "[1]", "uptime": [2]The status should be healthy to indicate good service, and uptime is the correct key for uptime value.
Fill all three blanks to define a health check function that returns true if the service is healthy and false otherwise.
def is_healthy(): if [1] == 'ok' and [2] < [3]: return True else: return False
The function checks if service_status is 'ok' and if response_time is less than timeout_threshold to decide health.