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

RFC3164 support old syslog #2

Closed
wants to merge 14 commits into from
Closed

Conversation

catap
Copy link
Contributor

@catap catap commented May 19, 2024

Here a PR with goal to support many different old syslog.

This changes allows to support:

  • OpenBSD syslog
  • IP socket IQTS-IP200
  • Synology NAS
  • Unifi UAP and UGP

Probably many other edge cases and hardware.

Thus, it includes: influxdata/go-syslog#46, influxdata/go-syslog#49 and influxdata/go-syslog#54

Originally it was opened as influxdata/go-syslog#55 but was requested to backport here as the most alive port.

aparcar and others added 14 commits December 4, 2022 01:36
both nontransparent and octetcounting use RFC5424 which isn't used by
many devices, i.e. OpenWrt or Ubiquiti routers.

Add a new function called NewParserRFC3164 to both.

Signed-off-by: Paul Spooren <[email protected]>
OpenBSD like many other hardware sends syslog messages without hostname,
here I added support of such messages.
Some old syslog may add LF between two messages, outside of counters.
This, it added missed WithMaxMessageLength into .rl
It is qutie confusing when it parses a message but returns error as
well, that it was mallforemd.

So, I've used the best effort flag as the way to decide. When it true,
it gnores all errors, but when it false it ignores the message.
Move changes to nontransparent/parser.go.rl and regenerate nontransparent/parser.go
Unifi thinks that it can be up to 48 characters, tolerate it.
@leodido
Copy link
Owner

leodido commented May 20, 2024

Closing in favor of #13

Thank you so much! This is awesome!

@leodido leodido closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants