Skip to content

Commit

Permalink
changed input from syslog to tcp/udp due to unsupported RFC (#18447) (#…
Browse files Browse the repository at this point in the history
…18528)

Changes beat input in docs and configuration file due to unsupported RFC syslog pattern.

(cherry picked from commit 140cc11)

Co-authored-by: Marius Iversen <[email protected]>
  • Loading branch information
adriansr and P1llus authored May 15, 2020
1 parent 810143b commit d49951c
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 21 deletions.
10 changes: 8 additions & 2 deletions filebeat/docs/modules/fortinet.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,26 @@ include::../include/config-option-intro.asciidoc[]
----
- module: fortinet
firewall:
enabled: true
var.input: udp
var.syslog_host: 0.0.0.0
var.syslog_port: 9004
----

include::../include/var-paths.asciidoc[]

*`var.input`*::

The input to use, can be either the value `tcp`, `udp` or `file`.

*`var.syslog_host`*::

The interface to listen to UDP based syslog traffic. Defaults to localhost.
The interface to listen to all syslog traffic. Defaults to localhost.
Set to 0.0.0.0 to bind to all available interfaces.

*`var.syslog_port`*::

The UDP port to listen for syslog traffic. Defaults to 9004.
The port to listen for syslog traffic. Defaults to 9004.

[float]
==== Fortinet ECS fields
Expand Down
8 changes: 4 additions & 4 deletions x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,14 @@ filebeat.modules:
firewall:
enabled: true

# Set which input to use between syslog (default) or file.
#var.input: syslog
# Set which input to use between tcp, udp (default) or file.
#var.input: udp

# The interface to listen to UDP based syslog traffic. Defaults to
# The interface to listen to syslog traffic. Defaults to
# localhost. Set to 0.0.0.0 to bind to all available interfaces.
#var.syslog_host: localhost

# The UDP port to listen for syslog traffic. Defaults to 9004.
# The port to listen for syslog traffic. Defaults to 9004.
#var.syslog_port: 9004

#----------------------------- Google Cloud Module -----------------------------
Expand Down
8 changes: 4 additions & 4 deletions x-pack/filebeat/module/fortinet/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
firewall:
enabled: true

# Set which input to use between syslog (default) or file.
#var.input: syslog
# Set which input to use between tcp, udp (default) or file.
#var.input: udp

# The interface to listen to UDP based syslog traffic. Defaults to
# The interface to listen to syslog traffic. Defaults to
# localhost. Set to 0.0.0.0 to bind to all available interfaces.
#var.syslog_host: localhost

# The UDP port to listen for syslog traffic. Defaults to 9004.
# The port to listen for syslog traffic. Defaults to 9004.
#var.syslog_port: 9004
10 changes: 8 additions & 2 deletions x-pack/filebeat/module/fortinet/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,26 @@ include::../include/config-option-intro.asciidoc[]
----
- module: fortinet
firewall:
enabled: true
var.input: udp
var.syslog_host: 0.0.0.0
var.syslog_port: 9004
----

include::../include/var-paths.asciidoc[]

*`var.input`*::

The input to use, can be either the value `tcp`, `udp` or `file`.

*`var.syslog_host`*::

The interface to listen to UDP based syslog traffic. Defaults to localhost.
The interface to listen to all syslog traffic. Defaults to localhost.
Set to 0.0.0.0 to bind to all available interfaces.

*`var.syslog_port`*::

The UDP port to listen for syslog traffic. Defaults to 9004.
The port to listen for syslog traffic. Defaults to 9004.

[float]
==== Fortinet ECS fields
Expand Down
13 changes: 9 additions & 4 deletions x-pack/filebeat/module/fortinet/firewall/config/firewall.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{{ if eq .input "syslog" }}
{{ if eq .input "tcp" }}

type: syslog
protocol.udp:
host: "{{.syslog_host}}:{{.syslog_port}}"
type: tcp
host: "{{.syslog_host}}:{{.syslog_port}}"

{{ else if eq .input "udp" }}

type: udp
host: "{{.syslog_host}}:{{.syslog_port}}"

{{ else if eq .input "file" }}

Expand All @@ -11,6 +15,7 @@ paths:
{{ range $i, $path := .paths }}
- {{$path}}
{{ end }}

exclude_files: [".gz$"]

{{ end }}
Expand Down
3 changes: 3 additions & 0 deletions x-pack/filebeat/module/fortinet/firewall/ingest/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ processors:
- remove:
field: fortinet.firewall.transip
if: "ctx.fortinet?.firewall?.transip == 'N/A'"
- remove:
field: fortinet.firewall.tunnelip
if: "ctx.fortinet?.firewall?.tunnelip == 'N/A'"
- remove:
field:
- _temp
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/fortinet/firewall/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var:
- name: syslog_port
default: 9004
- name: input
default: syslog
default: udp

ingest_pipeline:
- ingest/pipeline.yml
Expand Down
8 changes: 4 additions & 4 deletions x-pack/filebeat/modules.d/fortinet.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
firewall:
enabled: true

# Set which input to use between syslog (default) or file.
#var.input: syslog
# Set which input to use between tcp, udp (default) or file.
#var.input: udp

# The interface to listen to UDP based syslog traffic. Defaults to
# The interface to listen to syslog traffic. Defaults to
# localhost. Set to 0.0.0.0 to bind to all available interfaces.
#var.syslog_host: localhost

# The UDP port to listen for syslog traffic. Defaults to 9004.
# The port to listen for syslog traffic. Defaults to 9004.
#var.syslog_port: 9004

0 comments on commit d49951c

Please sign in to comment.