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

Migrate syslog/v2 to syslog/v3 (adds RFC3164 support to inputs.syslog) (#4593) #8454

Merged
merged 1 commit into from
Jul 8, 2021
Merged

Migrate syslog/v2 to syslog/v3 (adds RFC3164 support to inputs.syslog) (#4593) #8454

merged 1 commit into from
Jul 8, 2021

Conversation

thepacketgeek
Copy link
Contributor

@thepacketgeek thepacketgeek commented Nov 22, 2020

Add RFC3164 Support for inputs.syslog (#4593)

This PR replaces go-syslog/v2 usage with go-syslog/v3 so that the inputs.syslog plugin can use the new RFC3164 support. Resolves #4593

Usage

When defining the inputs, a user will specify the syslog_standard option (Either "5424" [default] or "3164"). The best_effort option will also apply when "3164" is used.

Notes

I was really hoping that this would let me use telegraf direction for Cisco syslog messages, but from my understanding it seems they have some problems with current go-syslog parsing:

Format: <PRI>SEQNUM:HOST:MONTHDAY YEARHOUR:MINUTES:SECONDS.MILLISECONDSTIMEZONE:%APPNAME-SEVERITY-MSGID:%TAGS:MESSAGE

Example: <187>37972: Nov 21 16:53:33.429: %LINK-3-UPDOWN: Interface GigabitEthernet0/8, changed state to down

  • Seq field instead of version number
  • No hostname provided
  • Severity level, app, and MsgId is encoded in the %APPNAME-SEVERITY-MSGID format

@goller Is handing these messages something that might be in scope for the RFC3164 parser in go-syslog?

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@thepacketgeek thepacketgeek changed the title Adding RFC3164 support to inputs.syslog (#4593) Migrate syslog/v2 to syslog/v3 (adds RFC3164 support to inputs.syslog) (#4593) Nov 22, 2020
@thepacketgeek
Copy link
Contributor Author

This also addresses #7023, although @leodido I'd love feedback on what you think about options to expose for RFC3164 parsing?

@sjwang90 sjwang90 added area/syslog feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin labels Nov 23, 2020
@endersonmaia
Copy link

Is there anything I can do to make this available on the next release ?

@thepacketgeek
Copy link
Contributor Author

@endersonmaia I've just rebased and things should be good to go, I'm not sure how to get in front of a reviewer

@endersonmaia
Copy link

Looks like new artifacts were built from this PR. Get them here!

wow, that's nice, I'll give it a shot and test for real on some of my devices, and give some feedback if something breaks

@thepacketgeek I'll ping some contributors here that I have already interacted, hope that's fine

/cc @danielnelson , @ssoroka

@thepacketgeek
Copy link
Contributor Author

Thank you!!

@endersonmaia
Copy link

/cc @sjwang90

@sjwang90
Copy link
Contributor

Thanks @thepacketgeek and @endersonmaia. You both were able to test with the built artifacts? We'll get this reviewed by some of our Telegraf maintainers soon.

@endersonmaia
Copy link

endersonmaia commented Jun 23, 2021 via email

@endersonmaia
Copy link

I just tested it with one of my devices, and it's working just fine!

Copy link
Contributor

@leodido leodido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've taken a quick look at this PR and it LGTM!

@thepacketgeek
Copy link
Contributor Author

@leodido Are there any action items for me to complete, or is this PR just waiting for merge?

plugins/inputs/syslog/README.md Outdated Show resolved Hide resolved
@Hipska Hipska added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jul 8, 2021
@MyaLongmire MyaLongmire merged commit f69b37b into influxdata:master Jul 8, 2021
@leodido
Copy link
Contributor

leodido commented Jul 8, 2021

🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/syslog feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for BSD style syslog messages RFC 3164 to syslog input
6 participants