Browse Source

metricbeat: disable cloud_metadata processor by default

alert5-minifirewall-restart
Jérémy Lecour 2 years ago
committed by Jérémy Lecour
parent
commit
c8e7675a49
  1. 1
      CHANGELOG.md
  2. 2
      metricbeat/defaults/main.yml
  3. 6
      metricbeat/handlers/main.yml
  4. 16
      metricbeat/tasks/main.yml

1
CHANGELOG.md

@ -12,6 +12,7 @@ The **patch** part changes incrementally at each release.
### Added
* filebeat: disable cloud_metadata processor by default
* metricbeat: disable cloud_metadata processor by default
* redis: add variable for configure unixsocketperm
### Changed

2
metricbeat/defaults/main.yml

@ -6,3 +6,5 @@ metricbeat_elasticsearch_hosts:
- "localhost:9200"
metricbeat_elasticsearch_auth_username: ""
metricbeat_elasticsearch_auth_password: ""
metricbeat_processors_cloud_metadata: False

6
metricbeat/handlers/main.yml

@ -0,0 +1,6 @@
---
- name: restart metricbeat
systemd:
name: metricbeat
state: restarted

16
metricbeat/tasks/main.yml

@ -72,3 +72,19 @@
when:
- metricbeat_elasticsearch_auth_username != ""
- metricbeat_elasticsearch_auth_password != ""
- name: disable cloud_metadata
replace:
dest: /etc/metricbeat/metricbeat.yml
regexp: '^(\s+)(- add_cloud_metadata:)'
replace: '\1# \2'
notify: restart metricbeat
when: not metricbeat_processors_cloud_metadata
- name: cloud_metadata processor is disabled
lineinfile:
dest: /etc/metricbeat/metricbeat.yml
line: " - add_cloud_metadata: ~"
insert_after: '^processors:'
notify: restart metricbeat
when: metricbeat_processors_cloud_metadata
Loading…
Cancel
Save