This repository was archived by the owner on Aug 20, 2025. It is now read-only.
METRON-883 Capture Bro Plugin Enhancements from bro/bro-plugins #545
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.
There are two versions of the Bro Kafka Plugin. I authored both of these and contributed one to Metron and the other to Bro itself. The original goal of doing this was to eventually deprecate the version maintained in Metron, so that the wider community of Bro could use and support the plugin.
Since this time, Bro has created a plugin management mechanism and is no longer wanting to host plugins. They are asking individual maintainers to create their own Github repositories to maintain these plugins. This will require us to continue to support the Bro Kafka Plugin in Metron.
I had contributed additional enhancements to the version in bro/bro-plugins, which I would like to contribute back to Metron proper, since that is now the version that will live on. The enhancements address a potential thread-safety issue and also allows data from Bro to be directed to separate Kafka topics.
This will enable some follow-on work to package the plugin using Bro's package mechanism.
Validation
The following steps can be used to validate the PR.
Create a working directory.
Launch a CentOS host.
Install some dependencies.
Create a new Yum repository by creating the file
/etc/yum.repos.d/HDP.repowith the following content. This will allow us to install Kafka.Install and start Kafka.
Install Librdkafka.
Add Librdkafka to our default load path.
Build and install Bro.
Fetch the code from this PR.
Install the Bro Plugin.
Add the following to
/usr/share/bro/site/local.broCreate a virtual interface called
tap0to listen on.Configure Bro to listen on virtual interface.
Create a Kafka topic called
bro.Make sure the Bro changes are installed and start Bro.
Grab an example pcap file and replay some packet data through
tap0. Keep this running in a separate session.Ensure that data is hitting the
brotopic in Kafka.Pull Request Checklist