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 <kevin@cloudnull.com>
This commit is contained in:
Kevin Carter 2019-01-10 16:00:37 -06:00
parent 7491b6df8e
commit a1d6ebe4d3

View File

@ -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.