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
|
### Added
|
||||||
* apache: add Munin configuration for Apache server-status URL
|
* apache: add Munin configuration for Apache server-status URL
|
||||||
* evomaintenance: database variables must be set or the task fails
|
* 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
|
* rbenv: add pkg-config to the list of packages to install
|
||||||
* redis: Configure munin when working in instance mode
|
* redis: Configure munin when working in instance mode
|
||||||
* redis: add a variable for renamed/disabled commands
|
* redis: add a variable for renamed/disabled commands
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
elastic_stack_version: "6.x"
|
elastic_stack_version: "6.x"
|
||||||
|
|
||||||
|
metricbeat_elasticsearch_protocol: ""
|
||||||
metricbeat_elasticsearch_hosts:
|
metricbeat_elasticsearch_hosts:
|
||||||
- "localhost:9200"
|
- "localhost:9200"
|
||||||
metricbeat_elasticsearch_auth_username: ""
|
metricbeat_elasticsearch_auth_username: ""
|
||||||
|
|
|
@ -50,6 +50,15 @@
|
||||||
when:
|
when:
|
||||||
- metricbeat_elasticsearch_hosts
|
- 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
|
- name: Metricbeat auth/username for Elasticsearch are configured
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /etc/metricbeat/metricbeat.yml
|
dest: /etc/metricbeat/metricbeat.yml
|
||||||
|
|
Loading…
Reference in a new issue