metricbeat: add a variable for the protocol to use with Elasticsearch
This commit is contained in:
parent
719e9b35b2
commit
7c2feea561
|
@ -13,6 +13,7 @@ The **patch** part changes incrementally at each release.
|
|||
### Added
|
||||
* apache: add Munin configuration for Apache server-status URL
|
||||
* evomaintenance: database variables must be set or the task fails
|
||||
* metricbeat: add a variable for the protocol to use with Elasticsearch
|
||||
* rbenv: add pkg-config to the list of packages to install
|
||||
* redis: Configure munin when working in instance mode
|
||||
* redis: add a variable for renamed/disabled commands
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
elastic_stack_version: "6.x"
|
||||
|
||||
metricbeat_elasticsearch_protocol: ""
|
||||
metricbeat_elasticsearch_hosts:
|
||||
- "localhost:9200"
|
||||
metricbeat_elasticsearch_auth_username: ""
|
||||
|
|
|
@ -50,6 +50,15 @@
|
|||
when:
|
||||
- metricbeat_elasticsearch_hosts
|
||||
|
||||
- name: Metricbeat protocol for Elasticsearch
|
||||
lineinfile:
|
||||
dest: /etc/metricbeat/metricbeat.yml
|
||||
regexp: '^ #?protocol: .*'
|
||||
line: " protocol: \"{{ metricbeat_elasticsearch_protocol }}\""
|
||||
insertafter: "output.elasticsearch:"
|
||||
notify: restart metricbeat
|
||||
when: metricbeat_elasticsearch_protocol == "http" or metricbeat_elasticsearch_protocol == "https"
|
||||
|
||||
- name: Metricbeat auth/username for Elasticsearch are configured
|
||||
lineinfile:
|
||||
dest: /etc/metricbeat/metricbeat.yml
|
||||
|
|
Loading…
Reference in a new issue