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?
Trap 1: -verbose
-verbose is not a Consul agent flag; verbosity is set through log_level, so it cannot reveal a hanging check's execution. It is tempting because verbose output feels diagnostic, and it would be correct for CLI commands that accept it, such as some consul CLI subcommands, not the agent.
Trap 2: -monitor-checks
-monitor-checks is not a Consul agent flag; check monitoring is exposed through the /v1/agent/checks HTTP endpoint, so it cannot surface execution detail in agent logs. It is tempting because it names checks directly, and it would suit querying check status via the API, not log-level debugging.
Trap 3: -trace
Consul has no -trace flag for agent logging; log levels stop at trace only via log_level configuration, not a CLI switch, so it cannot expose check execution. It is tempting because tracing sounds like the deepest diagnostic, and it would be right for instrumenting code paths, not for a hanging check's agent logs.
- A
-verbose
Why it fails: -verbose is not a Consul agent flag; verbosity is set through log_level, so it cannot reveal a hanging check's execution. It is tempting because verbose output feels diagnostic, and it would be correct for CLI commands that accept it, such as some consul CLI subcommands, not the agent.
- B
-log-level=debug
Raising the agent's log verbosity to debug makes Consul emit detailed health-check execution output, including script invocations and timing, which reveals where a hanging check stalls. The -log-level=debug flag therefore exposes the check's internal behaviour in the agent logs.
- C
-monitor-checks
Why it fails: -monitor-checks is not a Consul agent flag; check monitoring is exposed through the /v1/agent/checks HTTP endpoint, so it cannot surface execution detail in agent logs. It is tempting because it names checks directly, and it would suit querying check status via the API, not log-level debugging.
- D
-trace
Why it fails: Consul has no -trace flag for agent logging; log levels stop at trace only via log_level configuration, not a CLI switch, so it cannot expose check execution. It is tempting because tracing sounds like the deepest diagnostic, and it would be right for instrumenting code paths, not for a hanging check's agent logs.