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] Update documentation / changelog / beta warnings for the syslog input #25047

Merged
merged 7 commits into from
Apr 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ https://github.com/elastic/beats/compare/v7.11.2...v7.12.0[View commits]
- Upgrade okta to ECS 1.8.0 and move js processor to ingest pipeline {issue}23118[23118] {pull}23929[23929]
- Update zoom module to ECS 1.8. {pull}23904[23904] {issue}23118[23118]
- Add fileset to ingest PostgreSQL CSV logs. {pull}23334[23334]
- Add beta support for RFC 5424 to the Syslog input. {pull}23954[23954]

*Heartbeat*

Expand Down
6 changes: 4 additions & 2 deletions filebeat/_meta/config/filebeat.inputs.reference.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -467,20 +467,22 @@ filebeat.inputs:
#ssl.client_authentication: "required"

#------------------------------ Syslog input --------------------------------
# Experimental: Config options for the Syslog input
# Accept RFC3164 formatted syslog event via UDP.
#- type: syslog
#enabled: false
#format: rfc3164
#protocol.udp:
# The host and port to receive the new event
#host: "localhost:9000"

# Maximum size of the message received over UDP
#max_message_size: 10KiB

# Accept RFC3164 formatted syslog event via TCP.
# Accept RFC5424 formatted syslog event via TCP.
# RFC5424 support is in beta.
#- type: syslog
#enabled: false
#format: rfc5424

#protocol.tcp:
# The host and port to receive the new event
Expand Down
12 changes: 9 additions & 3 deletions filebeat/docs/inputs/input-syslog.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<titleabbrev>Syslog</titleabbrev>
++++

Use the `syslog` input to read events over TCP, UDP, or a Unix stream socket, this input will parse BSD (rfc3164)
event and some variant.
The `syslog` input reads Syslog events as specified by RFC 3164 and RFC 5424, over TCP, UDP, or a Unix stream socket. RFC 5424 support is currently in beta.

Example configurations:

["source","yaml",subs="attributes"]
----
{beatname_lc}.inputs:
- type: syslog
format: rfc3164
protocol.udp:
host: "localhost:9000"
----
Expand All @@ -24,6 +24,7 @@ Example configurations:
----
{beatname_lc}.inputs:
- type: syslog
format: rfc5424
protocol.tcp:
host: "localhost:9000"
----
Expand All @@ -32,15 +33,20 @@ Example configurations:
----
{beatname_lc}.inputs:
- type: syslog
format: auto
protocol.unix:
path: "/path/to/syslog.sock"
----

==== Configuration options

The `syslog` input supports protocol specific configuration options plus the
The `syslog` input configuration includes format, protocol specific options, and the
<<{beatname_lc}-input-{type}-common-options>> described later.

===== `format`

The syslog variant to use, `rfc3164` or `rfc5424`. To automatically detect the format from the log entries, set this option to `auto`. The default is `rfc3164`. The `rfc5424` and `auto` options are currently in beta.

===== Protocol `udp`:

include::../inputs/input-common-udp-options.asciidoc[]
Expand Down
6 changes: 4 additions & 2 deletions filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -874,20 +874,22 @@ filebeat.inputs:
#ssl.client_authentication: "required"

#------------------------------ Syslog input --------------------------------
# Experimental: Config options for the Syslog input
# Accept RFC3164 formatted syslog event via UDP.
#- type: syslog
#enabled: false
#format: rfc3164
#protocol.udp:
# The host and port to receive the new event
#host: "localhost:9000"

# Maximum size of the message received over UDP
#max_message_size: 10KiB

# Accept RFC3164 formatted syslog event via TCP.
# Accept RFC5424 formatted syslog event via TCP.
# RFC5424 support is in beta.
#- type: syslog
#enabled: false
#format: rfc5424

#protocol.tcp:
# The host and port to receive the new event
Expand Down
6 changes: 4 additions & 2 deletions filebeat/input/syslog/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ func NewInput(
outlet channel.Connector,
context input.Context,
) (input.Input, error) {
cfgwarn.Experimental("Syslog input type is used")

log := logp.NewLogger("syslog")

out, err := outlet.Connect(cfg)
Expand All @@ -125,6 +123,10 @@ func NewInput(
return nil, err
}

if config.Format != syslogFormatRFC3164 {
cfgwarn.Beta("Syslog RFC 5424 format is enabled")
}

forwarder := harvester.NewForwarder(out)
cb := GetCbByConfig(config, forwarder, log)
server, err := factory(cb, config.Protocol)
Expand Down
6 changes: 4 additions & 2 deletions x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2725,20 +2725,22 @@ filebeat.inputs:
#ssl.client_authentication: "required"

#------------------------------ Syslog input --------------------------------
# Experimental: Config options for the Syslog input
# Accept RFC3164 formatted syslog event via UDP.
#- type: syslog
#enabled: false
#format: rfc3164
#protocol.udp:
# The host and port to receive the new event
#host: "localhost:9000"

# Maximum size of the message received over UDP
#max_message_size: 10KiB

# Accept RFC3164 formatted syslog event via TCP.
# Accept RFC5424 formatted syslog event via TCP.
# RFC5424 support is in beta.
#- type: syslog
#enabled: false
#format: rfc5424

#protocol.tcp:
# The host and port to receive the new event
Expand Down