Health Definition field always return a empty. Why does it exist?


After registerd check, call curl{service}.

But health Definition field always empty.

why does it exist? Do I need to make other settings?

My consul version is 1.5.2.

Health Checks registered with the Agent APIs or within configuration files and not directly with the Catalog API will be stripped by the Agent that they were registered with. This is normal behavior and the reasoning is that the check definition could potentially contain sensitive information that may not be suitable to expose to anything which can check the health checks status.

There are some circumstances such as when using consul-esm where the check definition is pushed into the Catalog and then consul-esm will retrieve the check definition and execute the health check.

Thanks for your reply.

But Definition may be necessary in terms of service management
for exampel I will check the definition when the service critical.

How about optionally providing definition?

Iā€™m curious about your opinion.

Currently there is no way to register the service with the Agent (and not directly to the Catalog APIs) and have the check definition get stored in the Catalog.

There is a issue on GitHub for this. Feel free to add your use case and context to the issue.

1 Like

Okay I got it.
thank you for kindness.