Run osquerybeat as a receiver by default and route live query actions to it via the diagnostics extension#15459
Run osquerybeat as a receiver by default and route live query actions to it via the diagnostics extension#15459cmacknz wants to merge 13 commits into
Conversation
…lastic#15411) This reverts commit dc8c4b3.
|
This pull request is now in conflicts. Could you fix it? 🙏 |
This comment has been minimized.
This comment has been minimized.
⏳ Build in-progress, with failures
Failed CI Steps
History
cc @cmacknz |
TL;DRBuild 42800 reached the Windows ESS integration suite and failed 17 tests. The captured failure is a package-version consistency assertion in Remediation
Investigation detailsRoot CauseConfirmed classification: test failure in the package-version check. The log reports:
The test implementation at Evidence
VerificationNot run: the captured artifact contains only the final 149 log lines and no assertion diff or complete failure report. No source change was made because the available evidence is insufficient to identify a safe code fix. Follow-upThe complete What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
What does this PR do?
This fixes #15410, using the approached discussed in that issue. Uses the already wired up diagnostics extension to route Fleet actions to osquerybeat receiver via HTTP over unix socket. Note that Fleet actions currently can only be routed to a component, so when an input is split into multiple per component streams only one of them could register an action handler. In OSQuery's case, it already uses the
single_receiver: trueoption in it's spec file to avoid being split by stream so there is no effect on it, but the code handles this situation by failing loudly anyway.The diagnosticsextension could be renamed to actionsextension at this point, but the expectation is that the action processing part of this change can eventually be removed in favor of OpAMP custom messages when we switch to using OpAMP to supervise the collector. The diagnostics extension would remain as a way for users to trigger diagnostics manually in that case.
Additionally updates the osquery monitoring integration test to perform a live query and ensure it succeeds.
This PR requires elastic/beats#51872 to merge first so that the beats submodule can be pointed to elastic/beats instead of cmacknz/beats.
How to test this PR locally
Run the
TestOsqueryManagerintegration test.Screenshots
Here is a successfully executed live query from a manual test: