diff --git a/elk_metrics_7x/roles/elastic_packetbeat/defaults/main.yml b/elk_metrics_7x/roles/elastic_packetbeat/defaults/main.yml index f629df39..a5fb3e2d 100644 --- a/elk_metrics_7x/roles/elastic_packetbeat/defaults/main.yml +++ b/elk_metrics_7x/roles/elastic_packetbeat/defaults/main.yml @@ -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: [] diff --git a/elk_metrics_7x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 b/elk_metrics_7x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 index 715a844e..42597021 100644 --- a/elk_metrics_7x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 +++ b/elk_metrics_7x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 @@ -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 %}