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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Syslog source to accept non UTF-8 encoding in syslog message #20462

Open
Neko-Follower opened this issue May 8, 2024 · 2 comments
Open
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) meta: good first issue Anything that is good for new contributors. type: bug A code related bug.

Comments

@Neko-Follower
Copy link

A note for the community

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Vector drops logs when encounter a syslog message with non UTF-8 characters. Can you add an option to replace non utf-8 characters with U+FFFD or allow passing non-UTF8 text as-is like a Promtail do.

Configuration

No response

Version

0.37.1-distroless-static

Debug Output

No response

Example Data

2024-05-08T07:35:43.209847Z DEBUG source{component_kind="source" component_id=rsyslog component_type=syslog}:connection{peer_addr=172.22.0.4:44600}: vector::sources::util::net::tcp: Accepted a new connection. peer_addr=172.22.0.4:44600

2024-05-08T07:35:44.293974Z ERROR source{component_kind="source" component_id=rsyslog component_type=syslog}:connection{peer_addr=172.22.0.4:44594}: vector::internal_events::codecs: Failed framing bytes. error=Unable to decode input as UTF8 error_code="decoder_frame" error_type="parser_failed" stage="processing" internal_log_rate_limit=true

2024-05-08T07:35:44.294029Z ERROR source{component_kind="source" component_id=rsyslog component_type=syslog}:connection{peer_addr=172.22.0.4:44594}: vector::internal_events::codecs: Internal log [Failed framing bytes.] is being suppressed to avoid flooding.

Additional Context

No response

References

No response

@Neko-Follower Neko-Follower added the type: bug A code related bug. label May 8, 2024
@jszwedko
Copy link
Member

jszwedko commented May 8, 2024

Agreed, this could be modeled like the existing decoding.codec.json.lossy option which replaces invalid UTF-8 characters.

@jszwedko
Copy link
Member

jszwedko commented May 8, 2024

We'd be happy to see a PR for this if someone is motivated! It should be a relatively straightforward change.

@jszwedko jszwedko added domain: codecs Anything related to Vector's codecs (encoding/decoding) meta: good first issue Anything that is good for new contributors. labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: codecs Anything related to Vector's codecs (encoding/decoding) meta: good first issue Anything that is good for new contributors. type: bug A code related bug.
Projects
None yet
Development

No branches or pull requests

2 participants