From the health checks below, which health check would be defined as a script check?

From the health checks below, which health check would be defined as a script check?
A . { "check": { "id": "web-app", "name": "Web App Status", "notes": "Web app does a curl internally every 10 seconds", "ttl": "30s" }}
B. { "check": { "id": "ssh", "name": "SSH TCP on port 22", "tcp": "localhost:22", "interval": "10s", "timeout": "1s" } }
C. { "check": { "id": "mem-util", "name": "Memory utilization", "args": ["/usr/local/bin/check_mem.py", "-limit", "256MB"], "interval": "10s", "timeout": "1s" }
D. { "check": { "id": "api", "name": "HTTP API on port 5000", "http": "https://localhost:5000/health", "tls_skip_verify": false, "method": "POST", "header": {"Content-Type": "application/json"}, "body": "{"method":"health"}", "interval": "10s", "timeout": "1s" } }

Answer: C

Explanation:

The mem-util health check is using a python (.py) script to return a specific metric back, which is then compared to the limitation set in the arguments. This is an excellent way to customize health checks to support metrics that may not be supported out of the box with Consul.

api is considered to be an HTTP check

ssh is a tcp check

web-app is a TTL check

https://www.consul.io/docs/agent/checks.html

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments