Courseiva

Consul 1.15 · domain

Health Checking

This domain covers how Consul monitors service and node health using checks defined in service definitions, agent configuration, or the HTTP API. The exam tests check types (script, HTTP, TCP, TTL, Docker, gRPC), status transitions, and how to query or update health via CLI and API.

65 questions19 easy27 medium19 hard

Focused practice

Practice Health Checking questions

Scored sessions drawing only from this domain — pick a length below.

Start 20-question practice test →

What this domain covers

What to know about Health Checking

Be able to define checks in service definitions, agent config, and the API; explain TTL check timing; and update TTL checks using consul services check or the HTTP endpoint. The key is knowing that TTL checks only go critical after the TTL interval passes without a heartbeat.

Defining health checks in service definitions, agent config, and via the /agent/check/register API endpoint

TTL check behavior: a missed heartbeat after the TTL interval marks the service critical

Interpreting check statuses (passing, warning, critical) and common causes like script exit codes

Updating TTL checks with consul services check or the /agent/check/pass/<check_id> HTTP endpoint

Watch out for

Common Health Checking exam traps

  • ▸Assuming a TTL check goes critical immediately on crash; it only changes after the TTL interval elapses without a heartbeat.
  • ▸Forgetting that health checks can be defined in multiple places (service definition, agent config, API), not just one.
  • ▸Confusing warning status with critical; warning often comes from a script exiting with code 1, not a hard failure.

Question index

All Health Checking questions (65)

Click any question to see the full explanation, or start a practice session above.

1

A platform team runs a Consul 1.15 cluster where a legacy VM service registers its health check through the /v1/agent/check/register HTTP API rather than a service definition file. The check is a script check that takes about 40 seconds to finish on a busy host. Operators notice the check flaps to critical roughly every minute even though the script always exits 0 when run manually. The agent's check_update_interval is left at the default. Which change most directly resolves the flapping without altering the script itself?

Medium
2

A platform team runs a Consul 1.15 cluster where a critical payment service is registered with a TTL health check. The service owner wants Consul to mark the check as critical if the application fails to renew the TTL for more than one minute. Which configuration field should be set in the service definition to enforce this behavior?

Medium
3

You are monitoring service health using Consul and want to ensure that a service is automatically removed from the catalog if it remains in a 'critical' state for more than 24 hours. Which configuration key supports this?

Hard
4

An operator configures a TCP health check for a database service on port 5432, specifying tcp = "localhost:5432" and interval = "10s". The database process is running and accepting connections, but the check is reported as critical. What is the most likely explanation?

Medium
5

A platform team runs a service on a VM and wants Consul to automatically remove the service instance from the catalog if its health check remains critical for more than 10 minutes. The service is registered via the agent's configuration directory. Which check definition field accomplishes this?

Medium
6

Which status indicates that a health check is successfully passing according to Consul?

Easy
7

A Consul operator defines a service check with the following HCL block: check { id = "web-api" name = "Web API HTTP" http = "http://localhost:8080/health" interval = "10s" timeout = "1s" }. The endpoint consistently responds in 1.4 seconds but returns HTTP 200. What status will Consul report for this check?

Medium
8

A platform team runs a gRPC service and wants Consul to use the standard gRPC health checking protocol rather than a custom script. The service listens on port 50051 and exposes the standard health service. Which check definition should they use?

Hard
9

When configuring a Service-specific health check, what is the impact of setting the 'expose' field to true?

Hard
10

What is the recommended approach for running health checks on a service that is part of a non-containerized, multi-process architecture?

Medium
11

A Consul 1.15 operator registers a service with an alias health check that points to another service's check. The aliased check is currently in a warning state. What status will the alias check report?

Hard
12

If a service has multiple health checks associated with it, when is the service itself considered 'critical'?

Hard
13

An engineer registers an external service for a third-party payment gateway that cannot run a Consul agent. The registration uses an alias health check that points at a Consul node named 'edge-proxy-01' and a service named 'payment-gateway'. The external service stays healthy in the catalog as long as the proxy node and service are passing. A second engineer later adds a separate script check directly to the same external service definition. After a deployment, the payment gateway disappears from DNS even though the edge proxy node and its payment-gateway service both report passing. What is the most likely cause?

Hard
14

An operator registers a service with a script health check that runs a custom binary. The binary exits with status code 1. What status will Consul assign to the service's health check?

Easy
15

A Consul service is registered with a TTL health check. The application owner wants the service to be marked unhealthy automatically if the application stops sending heartbeats, without requiring a separate check script or endpoint. The application can send heartbeats every 10 seconds. Which TTL check configuration should be used to mark the service unhealthy after no heartbeat is received for 30 seconds?

Medium
16

You are configuring a health check that should be considered passing as long as the HTTP response code is in the 2xx range. Which HTTP check configuration achieves this?

Easy
17

A platform team runs Consul agents in server mode on three dedicated hosts and client agents on each application node. They need a check that verifies the Consul servers themselves are reachable on the Serf LAN gossip port from the perspective of every client agent, so that a partitioned server is flagged even if it still answers HTTP requests on port 8500. Which check definition should they register on each client agent?

Medium
18

A platform engineer is defining a TTL health check for a batch worker that cannot be polled by the Consul agent. The check must be considered healthy only when the worker actively reports in, and must become unhealthy if the worker stops reporting. Which two configuration elements are required to make this TTL check functional? (Choose two.)

Medium
19

What information does the Consul HTTP API return for a health check? (Select TWO)

Easy
20

A DevOps engineer runs a Consul 1.15 agent on a VM and registers a web service with a script health check that executes a local shell script. The script returns exit code 0 when the service is healthy and exit code 1 when unhealthy. After the script runs, Consul reports the check status as passing. Which statement best describes how Consul interprets the script's exit code for this check?

Easy
21

What is true about Consul health checks? (Select TWO)

Easy
22

A Consul service check is configured with `deregister_critical_service_after: "10m"`. The service enters a critical state due to a failed check. What happens after 10 minutes if the check remains critical?

Hard
23

A service is registered with a check that has deregister_critical_service_after set to 30m. The service's check enters the critical state due to a transient network partition. The partition is resolved after 20 minutes, and the check returns to passing. What is the effect on the service registration?

Hard
24

A Consul operator registers a web service on a node with a service-level health check that uses the HTTP type and points to http://127.0.0.1:8080/health. The check has been passing for weeks, but the team now wants to stop advertising the service in DNS and the service catalog when the /health endpoint returns HTTP 500. Which Consul check status will the service health be reported as when the endpoint returns 500?

Easy
25

Which HTTP status code range does Consul interpret as a passing state for an HTTP health check?

Easy
26

When troubleshooting a failing health check, which tools are recommended? (Select TWO)

Medium
27

An engineer needs a service check that simply confirms a TCP port on the same host is accepting connections, without sending any application payload. Which Consul check configuration accomplishes this?

Easy
28

A Consul 1.15 operator configures an HTTP health check for a service with the following settings: http = "https://api.example.com/health", tls_skip_verify = false, and method = "GET". The check is failing with a certificate error. Which configuration change should the operator make to allow the check to succeed while maintaining security?

Hard
29

An operator registers a web service with a TTL health check and forgets to send periodic updates. After the TTL expires, the service appears as critical in the Consul UI. Which behavior explains why the check transitioned to critical automatically?

Easy
30

A team configures a script health check on a client agent with `interval` set to 30s and `timeout` set to 5s. The script normally finishes in under a second, but during a nightly batch job it occasionally blocks on a lock for over a minute. The team wants Consul to mark the service unhealthy when the script exceeds the timeout instead of waiting indefinitely. What does Consul do when the script has not exited by the timeout value?

Easy
31

A service has a TTL check configured with a 30-second TTL. If the application crashes and stops sending heartbeats, when will the service status change to 'critical'?

Medium
32

When defining a TCP health check, what is the primary indicator that the check is 'passing'?

Easy
33

A service is registered with a health check that has the field deregister_critical_service_after set to "10m". The service's check has been in the critical state for 15 minutes. What will Consul do?

Medium
34

When a health check is failing, which Consul API endpoint would you call to investigate the specific error message provided by the check?

Hard
35

A Consul 1.15 operator is defining a TTL-based health check for a batch job that only reports in when it completes a run. The job must be marked critical if it has not checked in within 30 minutes. The operator wants the check to start in the passing state so a freshly registered job is not immediately flagged. Which configuration block accomplishes this?

Easy
36

A Consul operator is defining an HTTP health check for a service and wants to ensure the check request includes custom headers and that the check tolerates a slow endpoint. Which two check definition fields should be used to accomplish these goals? (Choose two.)

Hard
37

A Consul operator needs to register a health check that runs a custom binary located at /opt/checks/validate.sh every 15 seconds. The check should be considered passing only when the script exits with code 0. Which check definition correctly implements this?

Medium
38

An operations engineer wants a service registered in Consul to be deregistered automatically from the catalog when its health check has been critical for an extended period, without any external tooling. The service definition is written in HCL and loaded via the agent's config directory. Which combination of settings accomplishes this?

Hard
39

A team is writing Consul 1.15 service definitions for a set of gRPC services that expose the standard gRPC health checking protocol on a dedicated port, and they want Consul to actively probe that protocol rather than a plain TCP connect. Which two settings must be present in each check block to make Consul perform a gRPC health check against the service? (Choose two.)

Medium
40

You observe a 'warning' status for a service. What is the most common reason for this?

Hard
41

You are deploying a legacy Java application that cannot expose an HTTP endpoint, but it does listen on TCP port 8443. You need Consul to verify the port is accepting connections and mark the service unhealthy if it is not. Which health check definition should you use?

Medium
42

A service team wants its check to be automatically deregistered along with the service when the service is deregistered, but they also want the check to survive a Consul agent restart without being manually recreated. Which configuration achieves both goals?

Medium
43

A platform team runs a fleet of Consul 1.15 server agents behind a strict network policy that blocks all outbound DNS traffic from the server hosts. The team wants the servers to periodically verify that each registered catalog node's DNS name resolves, without installing any extra binaries. Which check definition should they use, and what must they configure so the check can run?

Medium
44

What is the primary difference between a 'script' check and an 'http' check in terms of how they are processed by the Consul agent?

Hard
45

An operations team runs a legacy application that cannot expose an HTTP endpoint but does listen on TCP port 5432. They define a TCP health check in the service registration. During an incident, the port remains open but the application process is hung and no longer accepts new connections. What will Consul report for this check?

Medium
46

Which of the following are true regarding TTL checks? (Select TWO)

Hard
47

Where can you define health checks in Consul? (Select THREE)

Hard
48

A Consul 1.15 operator needs to register a service with a health check that verifies the service is accepting TCP connections on port 9200. The check must run every 10 seconds. Which check configuration should be used?

Medium
49

A team is standardizing health check definitions across a fleet of Consul 1.15 agents. They want checks that can be expressed entirely in HCL and do not require an external script interpreter on the node. Which two check types meet these criteria? (Choose two.)

Medium
50

In a Consul health check, what does the 'notes' field provide?

Easy
51

Which command line tool can you use to manually trigger a TTL check update for a specific service?

Easy
52

Which of the following is a valid method to update a TTL health check?

Medium
53

You are troubleshooting a health check that seems to be hanging. Which flag, if available, would provide more information about the check's execution within the agent logs?

Medium
54

When using the HTTP health check type, how can you verify that a specific header is included in the health check request?

Hard
55

What components can affect the outcome of a health check? (Select THREE)

Medium
56

Which feature allows you to define a health check that depends on the health of another service?

Medium
57

What is the purpose of the 'check' field inside a 'service' object in a Consul configuration file?

Medium
58

What is the consequence of having a service with no health checks registered?

Easy
59

An operations engineer registers an external PostgreSQL service on a Consul 1.15 client agent. The database listens on 10.20.30.40:5432 and is not managed by Consul, but a co-located exporter on the same VM exposes readiness at http://127.0.0.1:9187/ready. The engineer wants Consul to gate the service on the exporter's readiness signal while still advertising the database's real address and port to consumers. Which registration best achieves this?

Hard
60

Which of the following conditions can cause a health check to transition to the 'critical' state? (Select TWO)

Medium
61

An operator registers a service with a TTL check and forgets to send periodic updates. After the TTL expires, what status does Consul report for that check, and what is the immediate effect on service discovery?

Easy
62

An operator registers a web service with an HTTP health check. The check is configured with http = "http://localhost:8080/health" and method = "GET". The service's health endpoint returns HTTP 500 when the application is running but has a database connection problem. What status will Consul report for this check?

Easy
63

A Consul administrator is reviewing how check results propagate and wants to understand which factors determine whether a service instance is considered healthy in the catalog. Which two factors directly determine a service's aggregate health status in Consul? (Choose two.)

Medium
64

You are deploying a legacy application that does not support HTTP or TCP health checks. Which Consul health check type should you configure to allow the application to signal its own health via a heartbeat API call?

Easy
65

A Consul cluster has a service registered with an HTTP health check pointing to https://10.0.0.5:8443/health. The check is failing with a TLS certificate verification error even though the service is healthy. The operator wants Consul to skip certificate verification for this specific check without disabling TLS globally. Which check configuration field should be set?

Hard

Frequently asked questions

What does the Health Checking domain cover on the Consul 1.15 exam?
Be able to define checks in service definitions, agent config, and the API; explain TTL check timing; and update TTL checks using consul services check or the HTTP endpoint. The key is knowing that TTL checks only go critical after the TTL interval passes without a heartbeat.
How many questions are in this domain?
This page lists all 65 Health Checking questions in the Consul 1.15 question bank. The actual exam draws from this domain proportionally to its weighting in the official exam blueprint.
What is the best way to practise this domain?
Start with a short focused session (10 questions) to identify gaps, then work through explanations. Repeat with a longer session once the weak areas feel solid.
Can I practise only Health Checking questions?
Yes — the session launcher on this page filters questions to this domain only. Choose any session length for inline explanations and scoring.
HashiCorp Certified: Consul Associate (Consul 1.15) (Consul 1.15) Health Checking Practice Questions