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

[Filebeat] Unix stream socket input source #17492

Merged
merged 17 commits into from
Apr 21, 2020

Conversation

andrewstucki
Copy link

@andrewstucki andrewstucki commented Apr 3, 2020

What does this PR do?

This adds Unix stream socket support as an input source.

Checklist

  • My code follows the style guidelines of this project
  • 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@andrewstucki andrewstucki changed the title [WIP][Filebeat] Unix stream socket input source [Filebeat] Unix stream socket input source Apr 4, 2020
Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

This looks great! Just a few minor comments.

filebeat/input/unix/input.go Outdated Show resolved Hide resolved
filebeat/input/unix/input.go Outdated Show resolved Hide resolved
filebeat/inputsource/common/handler.go Outdated Show resolved Hide resolved
filebeat/inputsource/common/listener.go Outdated Show resolved Hide resolved
filebeat/inputsource/unix/config.go Outdated Show resolved Hide resolved
@andrewstucki
Copy link
Author

Looks like the test failure is unrelated:

12:09:35  [error] 0.17% test_registrar.Test.test_clean_removed: 0.2795s

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewstucki andrewstucki merged commit 3b99438 into elastic:master Apr 21, 2020
@andrewstucki andrewstucki deleted the unix-sockets branch April 21, 2020 01:28
andrewstucki pushed a commit to andrewstucki/beats that referenced this pull request Apr 21, 2020
* initial common refactor

* Fix up unix and add license info

* Fix inputs

* Clean up handlers

* Update changelog and docs

* Fix added input

* Fix tests

* Add unix socket system tests

* add systems tests for syslog unix input

* pep autoformat

* Disable unix tests for Windows since Python 3.8 doesn't support AF_UNIX

* pep autoformat

* Address feedback

* fix test

(cherry picked from commit 3b99438)
andrewstucki pushed a commit that referenced this pull request Apr 21, 2020
…#17851)

* [Filebeat] Unix stream socket input source (#17492)

* initial common refactor

* Fix up unix and add license info

* Fix inputs

* Clean up handlers

* Update changelog and docs

* Fix added input

* Fix tests

* Add unix socket system tests

* add systems tests for syslog unix input

* pep autoformat

* Disable unix tests for Windows since Python 3.8 doesn't support AF_UNIX

* pep autoformat

* Address feedback

* fix test

(cherry picked from commit 3b99438)

* Fix changelog
@andrewkroh
Copy link
Member

@andrewstucki Can you please follow-up on this PR with three things:

  • add documentation for the input (you added docs to syslog but not for the unix input type)
  • add beta labels to the new docs ([]beta)
  • add a cfgwarn.Beta(...) to the code to log a beta warning to the user

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat Enhancement: Support reading from UNIX stream sockets
3 participants