Skip to content
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

Add output type kafka to agent policies #2850

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

michel-laterman
Copy link
Contributor

What is the problem this PR solves?

fleet-server gives an error if kafka appears an the output type in an agent policy.

How does this PR solve the problem?

Add OutputTypeKafka to policy output as a nop similar to logstash handling.

Design Checklist

  • I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.
  • I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.
  • I have included fail safe mechanisms to limit the load on fleet-server: rate limiting, circuit breakers, caching, load shedding, etc.

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool

Related issues

@michel-laterman michel-laterman added enhancement New feature or request Team:Fleet Label for the Fleet team labels Jul 28, 2023
@michel-laterman michel-laterman requested a review from a team as a code owner July 28, 2023 17:09
Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 28, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-07-28T19:01:11.279+0000

  • Duration: 37 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 755
Skipped 1
Total 756

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Contributor

@faec faec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log message typo but otherwise looks good

@@ -54,6 +55,9 @@ func (p *Output) Prepare(ctx context.Context, zlog zerolog.Logger, bulker bulk.B
case OutputTypeLogstash:
zlog.Debug().Msg("preparing logstash output")
zlog.Info().Msg("no actions required for logstash output preparation")
case OutputTypeKafka:
zlog.Debug().Msg("preparing kafka output")
zlog.Info().Msg("no actions required for logstash kafka preparation")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"logstash kafka" -> "kafka output" :-)

@michel-laterman michel-laterman enabled auto-merge (squash) July 28, 2023 19:01
@michel-laterman michel-laterman merged commit 899ba08 into elastic:main Jul 28, 2023
6 checks passed
@michel-laterman michel-laterman deleted the policy-output-kafka branch August 3, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Fleet Label for the Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants