-
Notifications
You must be signed in to change notification settings - Fork 299
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 basic Syslog UDP collector bot #1611
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! This PR is marked as draft, is this intentional? Even if it is not perfect, I'm fine to merge it as long as it is functional. I'd add some explanation in Bots.md, also linking rsyslog's documentation as hint for a set-up (e.g. https://www.rsyslog.com/doc/master/configuration/examples.html which contains examples). |
Yes, as I do not consider this functionality even remotely ready for production. I made this as a proof of concept, but for production we'll be sending syslog traffic using AMQP through a RabbitMQ server. Obvious deficiencies in this bot include:
I'm wary of people not considering any documented caveats and attempting to use this code for things it wasn't designed for, losing data in the process. |
Thanks for your response. I think the collector should be called "UDP", not "Syslog", as syslog is just the data format (relevant for parsing), not the transport protocol. |
Something like this (which is totally untested)? This does present the problem that there is already a collector named "tcp", which accepts IntelMQ messages, not raw bytes. Maybe this should be called "udp_text" or "udp_raw" to distinguish them, and make clear that there are two possible bots (IntelMQ messages over UDP and raw text over TCP) not implemented? |
Extremely basic, probably too slow, but simple and working Syslog collector over UDP.
The bot really doesn't care about the Syslog data format, just that it can receive text in UDP packets. Handling Syslog is the job of a later parser bot.
775e537
to
737cb1e
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1611 +/- ##
===========================================
- Coverage 75.55% 75.50% -0.06%
===========================================
Files 391 392 +1
Lines 19700 19728 +28
Branches 2708 2709 +1
===========================================
+ Hits 14885 14895 +10
- Misses 4230 4248 +18
Partials 585 585
|
Concerning the TCP collector issue: Previously we had no other use-case for the TCP collector than the IntelMQ to IntelMQ connection. If we have more, I'd be for offering both functionalities: The collector could then be able to receive arbitrary input (like syslog) but can also be capable of receiving the IntelMQ "flavor" (with the "Ok" message). cc @e3rd (tcp collector/output author & user) |
If I remember, |
Extremely basic, probably too slow, but simple and working Syslog collector over UDP.
We will probably not be running this in production, but I had already written it as a proof of concept, and thought it marginally more useful to share the code than quietly disposing of it. Especially since the existing pull request for a Syslog collector in #848 no longer works because of changes in both IntelMQ and Python.