-
Notifications
You must be signed in to change notification settings - Fork 238
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
feat: Add the otelcol syslog receiver #2263
base: main
Are you sure you want to change the base?
Conversation
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
…log.md Co-authored-by: Clayton Cornell <[email protected]>
…log.md Co-authored-by: Clayton Cornell <[email protected]>
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
…log.md Co-authored-by: Clayton Cornell <[email protected]>
…loy into feat/otelcol-syslog-receiver
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
The `location` argument specifies a Time Zone identifier. The available locations depend on the local IANA Time Zone database. | ||
See [this wikipedia entry][tz-wiki] for a non-comprehensive list. | ||
|
||
The `non_transparent_framing_trailer` argument must be one of `LF`, `NUL`. |
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.
Can we add some context around this? Like how can the default be nil? Even if its a string it should be "" but that seems to not be LF or NUL.
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.
Yeah, that's fair. It's a *string, so it's nil if not set. If it is set, then the character chosen is expected to terminate the message. If not set, it's expected that you're using octet counting or that the syslog frame contains only one message.
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.
@clayton-cornell I'd appreciate any feedback you have on this docs change as well as Matt's.
| Name | Type | Description | Default | Required | | ||
|---------------------------------|----------|--------------------------------------------------------------------------------------------------------------|---------|----------| | ||
| `listen_address` | `string` | The `<host:port>` address to listen to for syslog messages. | | yes | | ||
| `max_log_size` | `int` | The maximum size of a log entry to read before failing. | `1MiB` | no | |
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.
This should be a string.
| Name | Type | Description | Default | Required | | ||
|--------------------|------------|-----------------------------------------------------------------------------------------------------------|--------------|----------| | ||
| `enabled` | `bool` | If true, the receiver will pause reading a file and attempt to resend the current batch of logs on error. | `false` | no | | ||
| `initial_interval` | `duration` | The time to wait after first failure to retry. | `1 second` | no | |
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.
Durations should be in formatted to 1s
or 5m
@@ -0,0 +1,271 @@ | |||
--- | |||
canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.receiver.syslog/ |
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.
@clayton-cornell do we need to add a tag for public preview?
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.
Yes. I missed that :-( I saw the shared lookup... forgot to make sure the badge was added.
Parallel to this, we are looking at better ways of adding badges to the docs... so we can avoid HTML spans.
} | ||
|
||
// Values taken from tcp input Build function | ||
const defaultMaxLogSize = helper.ByteSize(tcp.DefaultMaxLogSize) |
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: Rename to tcpDefaultMaxLogSize
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.
Looks good aside from a few doc changes.
…log.md Co-authored-by: Clayton Cornell <[email protected]>
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.
The updated description makes sense when I read it.
In reviewing again, I found a couple other minor points I missed in the first pass.
@@ -0,0 +1,271 @@ | |||
--- | |||
canonical: https://grafana.com/docs/alloy/latest/reference/components/otelcol/otelcol.receiver.syslog/ |
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.
Yes. I missed that :-( I saw the shared lookup... forgot to make sure the badge was added.
Parallel to this, we are looking at better ways of adding badges to the docs... so we can avoid HTML spans.
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/otelcol/otelcol.receiver.syslog.md
Outdated
Show resolved
Hide resolved
Ooops double posted my review. I was logged out Git right when I submitted the review. |
…log.md Co-authored-by: Clayton Cornell <[email protected]>
Co-authored-by: Clayton Cornell <[email protected]>
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.
Approving for docs
PR Description
While adding the
otelcol.exporter.syslog
component, I discovered that there was not a clean way to proxy syslog using theloki.source.syslog
component as a source. For the purposes of syslog proxying, theotelcol.receiver.syslog
component emits logs in the exact syntax expected by the exporter.This does not add support for enhancing parsing with the numerous stanza operators available in upstream opentelemetry. Most or all of the use cases that would be supported by those can also be implemented through processors like the
otelcol.processor.transform
component, and the effort to add them in seemed significant for no known customer requirements at this time.Which issue(s) this PR fixes
Related to #312
Notes to the Reviewer
PR Checklist