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?
Consul kills a script check that does not return before its timeout and marks it critical, so a 40-second script under the default 10-second timeout will be terminated and reported as failing. Setting timeout to a value above the observed worst-case runtime lets the script finish and report its real status, stopping the flap without touching the script or the host.
Why this answer
Consul enforces the check's timeout when executing script checks; a script that runs longer than the timeout is terminated and the check reports critical. Because the observed runtime of roughly 40 seconds exceeds the default timeout, the check fails on schedule, producing the regular flapping. Increasing the timeout to exceed the worst-case runtime lets the script complete and report its genuine result.
Exam trap
The trap here is assuming the check interval controls how long a script may run, when it is actually the timeout that terminates a slow script check.