-
Notifications
You must be signed in to change notification settings - Fork 40
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
Syslog exporter/forwarder - this forwarder has been tested with an rsyslog server and the sumologic cloud syslog source #936
Conversation
c190a99
to
587a931
Compare
Can we raise this PR for upstream to avoid differences and possible breaking changes later? |
I need to disagree with the implementation. Correct me if I'm wrong, but as I understand the code, we expect |
1dbd2bb
to
a5299e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to my review, please remove unnecessary comments
Now I'm working on fixing following issue which is visible in tests
|
Just one validation complain 😬 |
64b5e9b
to
c7162bf
Compare
func (cfg *Config) Validate() error { | ||
if cfg.Port < 1 || cfg.Port > 65525 { | ||
return unsupportedPort | ||
} | ||
|
||
if !net.IsFQDN(cfg.Endpoint) || cfg.Endpoint == "" { | ||
return invalidFQDN | ||
} | ||
|
||
if strings.ToLower(cfg.Protocol) != "tcp" && strings.ToLower(cfg.Protocol) != "udp" { | ||
return unsupportedProtocol | ||
} | ||
|
||
switch cfg.Format { | ||
case formatRFC3164Str: | ||
case formatRFC5424Str: | ||
default: | ||
return unsupportedFormat | ||
} | ||
|
||
return nil | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It would be nice to validate everything on one run. I imagine situation where all fields are invalid and customer has to run it multiple time to fix all configuration error. It would be nice to avoid it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are good to go :)
…ver with syslog parser
… to keep compatibility with otc syslog parser - remove referneces to format set to any - remove references to drop_invalid_messages parameter
… and fix timestamp format issues
c7162bf
to
1f63adf
Compare
Description
In order to send messages from a device to a remote syslog server, one needs a syslog agent. Most Linux operating systems ship with a syslog agent and if one is not available, one can be easily installed. The two most common syslog agents used on Linux systems today are rsyslog and syslog-ng
The syslog protocol is the standard for remote message logging.
OpenTelemetry seems to already have a syslog receiver, a syslog exporter/forwarder would be useful to send messages to a third party syslog server.
Setup
Send syslog messages
Use the configuration template below, to configure this syslog forwarder to send messages to the cloud syslog source
Note
: To send syslog messages to the cloud syslog source the syslog message must be RFC5424 complaint and must have the cloud syslog source token embedded in the message as a structured field. Example below:<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 [token] BOMAn application event log entry...