This repository was archived by the owner on Feb 11, 2026. It is now read-only.
sensor: Add a posssibility to output directly to plugins #28
Merged
vadorovsky merged 10 commits intomainfrom Jun 2, 2022
Merged
sensor: Add a posssibility to output directly to plugins #28vadorovsky merged 10 commits intomainfrom
vadorovsky merged 10 commits intomainfrom
Conversation
noboruma
reviewed
Jun 1, 2022
| } | ||
| select { | ||
| case output <- string(packetData[0:totalLen]): | ||
| case pluginChan <- string(packetData[:totalLen]): |
Contributor
There was a problem hiding this comment.
Note for future: will be cleaner to have those channels inside a struct
4afa74d to
a5e5390
Compare
For now we are going to send uncompresseed packets to S3. Therefore there is no need for TLV info. Signed-off-by: Michal Rostecki <[email protected]>
Log the fact that a plugin is started. Signed-off-by: Michal Rostecki <[email protected]>
Before this change, we were using some custom file header, not readable by tcpdump or any pcap tool. This change replaces it with a correct pcap header. Signed-off-by: Michal Rostecki <[email protected]>
Before this change, breaking the output loop was ineffective. Signed-off-by: Michal Rostecki <[email protected]>
Before this change, using output plugins like S3 and Kafka was possible only from receiver, which adds additional complexity for users interested only in streaming packets directly to the external cloud storage. Sensors always had to send packets to some receiver first. This change makes it simplier by allowing to stream directly from receiver to plugins. Signed-off-by: Michal Rostecki <[email protected]>
Before this change, PacketStreamer was always expecting some file descriptor to be available. That was forcing users wanting to output only to plugin(s) to configure a /dev/null file anyway. Then PacketStreamer was performing a wasteful job of writing to /dev/null. This change fixes that by allowing to configure only plugins and not writing to fd when it's not present. Signed-off-by: Michal Rostecki <[email protected]>
Signed-off-by: Michal Rostecki <[email protected]>
Signed-off-by: Michal Rostecki <[email protected]>
Signed-off-by: Michal Rostecki <[email protected]>
Using /dev/null file is not needed anymore. Signed-off-by: Michal Rostecki <[email protected]>
a5e5390 to
e9dd214
Compare
noboruma
approved these changes
Jun 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this change, using output plugins like S3 and Kafka was possible
only from receiver, which adds additional complexity for users
interested only in streaming packets directly to the external cloud
storage. Sensors always had to send packets to some receiver first.
This change makes it simplier by allowing to stream directly from
receiver to plugins.
Signed-off-by: Michal Rostecki [email protected]