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

changed input from syslog to tcp/udp due to unsupported RFC #18447

Merged
merged 3 commits into from
May 14, 2020
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
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