-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Report status per unit #36183
Report status per unit #36183
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
4a98c0e
to
c4d4c5f
Compare
f6d5c97
to
e65bd85
Compare
Pinging @elastic/elastic-agent (Team:Elastic-Agent) |
Followed the instructions for testing this PR locally. Before this PR
With this PR
In the output of |
Did you run
|
Thanks @belimawr, I did not run with But I'm concerned that the output of |
I tried However, I'm still concerned about the potential regression in the output of Before this PR
With this PR
|
In your last command, you have every input and not only the failing one @ycombinator. |
|
With this PR only the the failed units go into a unhealthy state, hence there is less units reported by An important thing to notice is that due to the Beats internals when the output fails to start the Beat will not start any input. Trying to start the log input with a failed output will deadlock, trying to start filestream with a failed output will not return an error but the input will never be fully started. This behaviour was there before this PR. If you have a failed output the status command will show this:
|
I see, thanks for clarifying @belimawr. I missed the fact that the default value of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This commit updates the ManagerV2 to set status per Unit based on its inputs. If any input on a Unit returns an error when starting the whole Unit is set as failed. If multiple inputs return an error, all errors are reported in the `Message` field. If the output unit returns an error when starting, only the output Unit is set as failed. All other input unit states are not modified (this was the behaviour before this commit).
e8d6326
to
ad18fff
Compare
This commit updates the ManagerV2 to set status per Unit based on its inputs. If any input on a Unit returns an error when starting the whole Unit is set as failed. If multiple inputs return an error, all errors are reported in the `Message` field. If the output unit returns an error when starting, only the output Unit is set as failed. All other input unit states are not modified (this was the behaviour before this commit).
What does this PR do?
This PR updates the ManagerV2 to set status per Unit based on its inputs. If any input on a Unit returns an error when starting the whole Unit is set as failed. If multiple inputs return an error, all errors are reported in the
Message
field.If the output unit returns an error when starting, only the output Unit is set as failed. All other input unit states are not modified (this was the behaviour before this PR).
Why is it important?
It allow users to better understand which unit has failed and which ones are working.
Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.## Author's ChecklistHow to test this PR locally
x-pack
folder)components
sub folder by the one you built./elastic-agent status --output full
FAILED
.elastic-agent.yml
Expected output
Related issues
## Use cases## Screenshots## Logs