-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[opampsupervisor] configure agent healthcheck port #34643
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I'd like to take this on if this is wanted |
Please add the motivation for this request to the description. It is not clear why this is needed. What problem is this solving? Why does the port need to be user selectable? |
@tigrannajaryan Updated the description, let me know if I need to add additional context. |
I think we want the port to be configurable regardless of actually checking it outside the supervisor, grabbing a random port is error-prone in that:
These are both rare scenarios, but with enough time + users I could imagine these things happening more than once. |
This indeed can happen. A possible fix is instead of Supervisor choosing a port, the healthcheck extension can choose a port and the opamp extension will report this port to Supervisor via effective config. Not entirely clear how opamp extension will learn about the port number though. |
Thanks, looks good. |
**Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Add a new configuration parameter to `agent` called `health_check_port`. If this is set, then the supervisor will configure the agent's healthcheck extension to use the given port. If it is unset, then we will grab a random port same as before. **Link to tracking Issue:** #34643 **Testing:** <Describe what testing was performed and which tests were added.> - Updated config validation tests - Verified that healthcheck extension is configured with the correct port and works as expected
…elemetry#34704) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Add a new configuration parameter to `agent` called `health_check_port`. If this is set, then the supervisor will configure the agent's healthcheck extension to use the given port. If it is unset, then we will grab a random port same as before. **Link to tracking Issue:** open-telemetry#34643 **Testing:** <Describe what testing was performed and which tests were added.> - Updated config validation tests - Verified that healthcheck extension is configured with the correct port and works as expected
Component(s)
cmd/opampsupervisor
Is your feature request related to a problem? Please describe.
I'd like to programmatically determine if the agent is healthy after being started by the supervisor without using an opamp connection to the supervisor. I want to do this by checking the agent's healthcheck extension endpoint. This would be particularly useful when updating an existing agent to be ran with the supervisor. Currently the port picked by the supervisor is non-deterministic making it difficult to determine which port should be targeted. I'd like to change this by making the healthcheck extension port configurable.
Describe the solution you'd like
The port assigned to the agent's healthcheck extension should be configurable in the supervisor config. A new parameter in the
agent
configuration section, maybe even inagent.description
.Describe alternatives you've considered
No response
Additional context
The relevant code for picking a random port.
The text was updated successfully, but these errors were encountered: