metricbeat: disable cloud_metadata processor by default

This commit is contained in:
Jérémy Lecour 2019-01-29 17:04:36 +01:00 committed by Jérémy Lecour
parent ff275efd95
commit c8e7675a49
4 changed files with 25 additions and 0 deletions

View file

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

View file

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

View file

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

View file

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