Allow specified http ports to be ignored by packetbeat

Packetbeat monitors traffic for all http ports specified for heartbeat
services. This change provides an additional list of ports to ignore
to filter traffic at source e.g. that generated by Elasticsearch,
Kibana & Logstash itself.

Change-Id: I57ac8582c4cc8a6fe5826fdbffbac4ab4e98ac78
This commit is contained in:
Sam Choraria 2020-02-11 11:33:28 +00:00
parent 81eb58f1e8
commit 38a3ac3a5f
2 changed files with 4 additions and 1 deletions

View File

@ -28,3 +28,6 @@ ilm_policy_file_location: "{{ (packetbeat_ilm_policy_file_location | default(def
# beat processors. Empty dictionary sets `add_host_metadata: ~`
processors: {}
# optional list of ports to ignore
packetbeat_ignored_ports: []

View File

@ -167,7 +167,7 @@ packetbeat.protocols:
{% set ports = [] %}
{% for item in heartbeat_services %}
{% for port in item.ports %}
{% if (item.type == 'http') and (not port in used_ports) %}
{% if (item.type == 'http') and (not port in used_ports) and (not port in packetbeat_ignored_ports) %}
{% set _ = ports.extend([port]) %}
{% endif %}
{% endfor %}