Specify port for healthcheck #132
Replies: 4 comments
-
@nickhammond the health check path doesn't accept a port. It's purely a path portion, and will always be fetched using the target's host & port. So in this case, is the problem that there's no suitable path on the target's main port that could signify whether that target is healthy or not? |
Beta Was this translation helpful? Give feedback.
-
@kevinmcconnell Yes, because the only endpoints available on the port that needs to be open( |
Beta Was this translation helpful? Give feedback.
-
@kevinmcconnell Another potential option would be running a health check command that could check the status but I know that's not currently supported. |
Beta Was this translation helpful? Give feedback.
-
@kevinmcconnell What's the environment that the healthcheck runs in? Can I publish another port locally and use that for the healthcheck instead of the primary one? Just trying to think of alternative options. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on setting up
otel/opentelemetry-collector-contrib:0.96.0
with kamal and having an issue with the healthcheck passing, doeshealth-check-path
support a port?The main port that everything runs on for the container is
4318
, but the internal healthcheck is exposed on13133
. So the deploy command needs to map the container to4318
but internally the healthcheck should be over13133
. This is so that you don't have to publicly expose that port since there are other internal metrics and data you can find on that port if publicly exposed, it's just meant for internal use.Looking at the logs for the container, it's running fine and not reporting errors, it's continually collecting metrics, I just can't get kamal proxy to see it as healthy and start sending it traffic. It's just reporting the regular
docker stderr: Error: target failed to become healthy within configured timeout (30s)
error, nothing more specific beyond that.I also added a port mapping so that I could check the status of the container locally on the machine and it's returning a 200.
Beta Was this translation helpful? Give feedback.
All reactions