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

filebeat syslog input: permit space after <PRI> #13269

Closed
candlerb opened this issue Aug 16, 2019 · 1 comment · Fixed by #13278
Closed

filebeat syslog input: permit space after <PRI> #13269

candlerb opened this issue Aug 16, 2019 · 1 comment · Fixed by #13278
Labels
candidate Candidate to be added to the current iteration enhancement Filebeat Filebeat Team:Services (Deprecated) Label for the former Integrations-Services team

Comments

@candlerb
Copy link
Contributor

Describe the enhancement:

Netgear switches send a space between the <PRI> and the timestamp fields in a syslog message. This is a violation of the standard, but it would be easy to accept.

Test case, based on packet captured using tcpdump from GS724Tv4:

echo -ne "<13> Aug 16 12:25:24 10.12.255.2-1 TRAPMGR[53034492]: traputil.c(696) 135956 %% Link Up: g5.\000" | nc -w0 -u localhost 5514

Current results:

  "message": "<13> Aug 16 12:25:24 10.12.255.2-1 TRAPMGR[53034492]: traputil.c(696) 135956 %% Link Up: g5.\u0000",

If the space was skipped, then the priority/facility, timestamp, program/pid could all be parsed.

(Aside: the messages also include a trailing null. This could also be stripped, but I don't object to retaining it)

Describe a specific use case for the enhancement or feature:

Networks with Netgear switches.

@candlerb
Copy link
Contributor Author

Additional info:

Cisco can add a magic character before the timestamp - asterisk or dot - to indicate the clock sync status. It's possible Netgear interpreted this as needing a space when the clock is normal.

In any case, it may be worth extending this FR to silently skip a space, dot or asterisk immediately preceeding the timestamp field.

candlerb added a commit to candlerb/beats that referenced this issue Aug 16, 2019
candlerb added a commit to candlerb/beats that referenced this issue Feb 28, 2020
@urso urso added the Team:Services (Deprecated) Label for the former Integrations-Services team label Mar 3, 2020
@andresrc andresrc added [zube]: Inbox [zube]: Ready candidate Candidate to be added to the current iteration and removed [zube]: Inbox labels Mar 4, 2020
@zube zube bot added [zube]: Done and removed [zube]: Ready labels Jul 31, 2020
@zube zube bot removed the [zube]: Done label Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate Candidate to be added to the current iteration enhancement Filebeat Filebeat Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants