Merge "Allow specified http ports to be ignored by packetbeat"

This commit is contained in:
Zuul 2020-02-14 15:52:05 +00:00 committed by Gerrit Code Review
commit bfedb5da0d
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 %}