From c17594c8fb3f3aaf74ef6f2f6033f9a58c594278 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Thu, 15 Oct 2020 15:31:18 -0400 Subject: [PATCH] Fix syslog RFC 5424 parsing in CheckPoint module (#21854) Change the input type in the CheckPoint module to `udp` from `syslog` so the syslog parsing happens in the ingest node pipeline rather than in the Filebeat syslog input that only support RFC 3164. (cherry picked from commit f2e161f6d2b38214966b42d5906592b6609e4d7e) --- CHANGELOG.next.asciidoc | 1 + filebeat/docs/modules/checkpoint.asciidoc | 18 ++++++++++-------- .../module/checkpoint/_meta/docs.asciidoc | 18 ++++++++++-------- .../checkpoint/firewall/config/firewall.yml | 5 ++--- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 2f6d603d477..67982466822 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -72,6 +72,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fixing `ingress_controller.` fields to be of type keyword instead of text. {issue}17834[17834] - Fixed typo in log message. {pull}17897[17897] - Add field limit check for AWS Cloudtrail flattened fields. {pull}21388[21388] {issue}21382[21382] +- Fix syslog RFC 5424 parsing in the CheckPoint module. {pull}21854[21854] *Heartbeat* diff --git a/filebeat/docs/modules/checkpoint.asciidoc b/filebeat/docs/modules/checkpoint.asciidoc index de72aabb2b3..c4e453b452d 100644 --- a/filebeat/docs/modules/checkpoint.asciidoc +++ b/filebeat/docs/modules/checkpoint.asciidoc @@ -12,25 +12,27 @@ This file is generated! See scripts/docs_collector.py == Check Point module beta[] -This is a module for Check Point firewall logs. It supports logs from the Log Exporter in the Syslog format. +This is a module for Check Point firewall logs. It supports logs from the Log +Exporter in the Syslog RFC 5424 format. If you need to ingest Check Point logs +in CEF format then please use the <> (more +fields are provided in the syslog output). -To configure a Log Exporter, please refer to the documentation by https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122323[Check Point]. +To configure a Log Exporter, please refer to the documentation by +https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122323[Check +Point]. -Example below: +Example Log Exporter config: `cp_log_export add name testdestination target-server 192.168.1.1 target-port 9001 protocol udp format syslog` -The module that supports Check Point firewall logs sent in the CEF format requires the <> - -The Check Point and ECS fields that are the same between both modules will be mapped to the same names for compability between modules, though not all fields are included in CEF. Please reference the supported fields in the CEF documentation. - include::../include/gs-link.asciidoc[] [float] === Compatibility -This module has been tested against Check Point Log Exporter on R80.X but should also work with R77.30. +This module has been tested against Check Point Log Exporter on R80.X but should +also work with R77.30. include::../include/configuring-intro.asciidoc[] diff --git a/x-pack/filebeat/module/checkpoint/_meta/docs.asciidoc b/x-pack/filebeat/module/checkpoint/_meta/docs.asciidoc index b09dcde2333..ecd8e0d3e81 100644 --- a/x-pack/filebeat/module/checkpoint/_meta/docs.asciidoc +++ b/x-pack/filebeat/module/checkpoint/_meta/docs.asciidoc @@ -7,25 +7,27 @@ == Check Point module beta[] -This is a module for Check Point firewall logs. It supports logs from the Log Exporter in the Syslog format. +This is a module for Check Point firewall logs. It supports logs from the Log +Exporter in the Syslog RFC 5424 format. If you need to ingest Check Point logs +in CEF format then please use the <> (more +fields are provided in the syslog output). -To configure a Log Exporter, please refer to the documentation by https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122323[Check Point]. +To configure a Log Exporter, please refer to the documentation by +https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk122323[Check +Point]. -Example below: +Example Log Exporter config: `cp_log_export add name testdestination target-server 192.168.1.1 target-port 9001 protocol udp format syslog` -The module that supports Check Point firewall logs sent in the CEF format requires the <> - -The Check Point and ECS fields that are the same between both modules will be mapped to the same names for compability between modules, though not all fields are included in CEF. Please reference the supported fields in the CEF documentation. - include::../include/gs-link.asciidoc[] [float] === Compatibility -This module has been tested against Check Point Log Exporter on R80.X but should also work with R77.30. +This module has been tested against Check Point Log Exporter on R80.X but should +also work with R77.30. include::../include/configuring-intro.asciidoc[] diff --git a/x-pack/filebeat/module/checkpoint/firewall/config/firewall.yml b/x-pack/filebeat/module/checkpoint/firewall/config/firewall.yml index 12440f8fffe..a505d3030eb 100644 --- a/x-pack/filebeat/module/checkpoint/firewall/config/firewall.yml +++ b/x-pack/filebeat/module/checkpoint/firewall/config/firewall.yml @@ -1,8 +1,7 @@ {{ if eq .input "syslog" }} -type: syslog -protocol.udp: - host: "{{.syslog_host}}:{{.syslog_port}}" +type: udp +host: "{{.syslog_host}}:{{.syslog_port}}" {{ else if eq .input "file" }}