From a1d6ebe4d3dd01cae9248ee5129883e02a7a13ce Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 10 Jan 2019 16:00:37 -0600 Subject: [PATCH] remove dynamic ns.enable generators The ns.enabled generators will fail when running packetbeat with a limit. These generators were dynamically enabling/disabling packetbeat features based on things discovered in the environment however they we're attempting to be a little to fancy, especially when running packetbeat in a non-osa cloud. The values for the services have been reset to the provider defaults and should teh deployer want to configure these option they can use config_template. Change-Id: I36d7298ca5142e8b5f926ab5d59ab8283704b5af Signed-off-by: Kevin Carter --- .../templates/packetbeat.yml.j2 | 50 ++----------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/elk_metrics_6x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 b/elk_metrics_6x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 index ab434f6f..d6c3e146 100644 --- a/elk_metrics_6x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 +++ b/elk_metrics_6x/roles/elastic_packetbeat/templates/packetbeat.yml.j2 @@ -63,15 +63,7 @@ packetbeat.protocols: - type: amqp # Enable AMQP monitoring. Default: true -{% set ns = namespace(enabled=(inventory_hostname in groups['rabbitmq_all'] | default([]))) %} -{% if not ns.enabled | bool %} -{% for _item in groups['rabbitmq_all'] | default([]) %} -{% if not ns.enabled | bool | bool or _item in groups[inventory_hostname + '-host_containers'] | default([]) %} -{% set ns.enabled = true %} -{% endif %} -{% endfor %} -{% endif %} - enabled: {{ ns.enabled | bool }} + enabled: true # Configure the ports where to listen for AMQP traffic. You can disable # the AMQP protocol by commenting out the list of ports. @@ -230,15 +222,7 @@ packetbeat.protocols: - type: memcache # Enable memcache monitoring. Default: true -{% set ns = namespace(enabled=(inventory_hostname in groups['memcached_all'] | default([]))) %} -{% if not ns.enabled | bool %} -{% for _item in groups['memcached_all'] | default([]) %} -{% if not ns.enabled | bool or _item in groups[inventory_hostname + '-host_containers'] | default([]) %} -{% set ns.enabled = true %} -{% endif %} -{% endfor %} -{% endif %} - enabled: {{ ns.enabled }} + enabled: true # Configure the ports where to listen for memcache traffic. You can disable # the Memcache protocol by commenting out the list of ports. @@ -287,15 +271,7 @@ packetbeat.protocols: - type: mysql # Enable mysql monitoring. Default: true -{% set ns = namespace(enabled=(inventory_hostname in groups['galera_all'] | default([]))) %} -{% if not ns.enabled | bool %} -{% for _item in groups['galera_all'] | default([]) %} -{% if not ns.enabled | bool and _item in groups[inventory_hostname + '-host_containers'] | default([]) %} -{% set ns.enabled = true %} -{% endif %} -{% endfor %} -{% endif %} - enabled: {{ ns.enabled }} + enabled: true # Configure the ports where to listen for MySQL traffic. You can disable # the MySQL protocol by commenting out the list of ports. @@ -440,15 +416,7 @@ packetbeat.protocols: - type: nfs # Enable NFS monitoring. Default: true -{% set ns = namespace(enabled=((inventory_hostname in groups['glance_all'] | default([])) or (inventory_hostname in groups['nova_compute'] | default([])) or 'nfs4' in (ansible_mounts | map(attribute='fstype') | list))) %} -{% if not ns.enabled | bool %} -{% for _item in groups['glance_all'] | default([]) + groups['nova_compute'] | default([]) %} -{% if not ns.enabled | bool or _item in groups[inventory_hostname + '-host_containers'] | default([]) %} -{% set ns.enabled = true %} -{% endif %} -{% endfor %} -{% endif %} - enabled: {{ ns.enabled }} + enabled: true # Configure the ports where to listen for NFS traffic. You can disable # the NFS protocol by commenting out the list of ports. @@ -468,15 +436,7 @@ packetbeat.protocols: - type: tls # Enable TLS monitoring. Default: true -{% set ns = namespace(enabled=((inventory_hostname in groups['haproxy_all'] | default([])) or (inventory_hostname in groups['horizon_all'] | default([])))) %} -{% if not ns.enabled | bool %} -{% for _item in groups['haproxy_all'] | default([]) + groups['horizon_all'] | default([]) %} -{% if not ns.enabled | bool or _item in groups[inventory_hostname + '-host_containers'] | default([]) %} -{% set ns.enabled = true %} -{% endif %} -{% endfor %} -{% endif %} - enabled: {{ ns.enabled }} + enabled: true # Configure the ports where to listen for TLS traffic. You can disable # the TLS protocol by commenting out the list of ports.