Supporting ELK 7 cluster
This commit is contained in:
parent
7619b44426
commit
6b95e304b6
@ -6,5 +6,4 @@
|
|||||||
- hosts: <your elastic stack server host>
|
- hosts: <your elastic stack server host>
|
||||||
roles:
|
roles:
|
||||||
- {role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-elasticsearch, elasticsearch_network_host: 'localhost'}
|
- {role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-elasticsearch, elasticsearch_network_host: 'localhost'}
|
||||||
- {role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-logstash, logstash_input_beats: true, elasticsearch_network_host: 'localhost'}
|
|
||||||
- {role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-kibana, elasticsearch_network_host: 'localhost'}
|
- {role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-kibana, elasticsearch_network_host: 'localhost'}
|
||||||
|
|||||||
@ -95,6 +95,8 @@
|
|||||||
url: "http://{{elasticsearch_network_host}}:{{elasticsearch_http_port}}/_template/wazuh"
|
url: "http://{{elasticsearch_network_host}}:{{elasticsearch_http_port}}/_template/wazuh"
|
||||||
method: GET
|
method: GET
|
||||||
status_code: 200, 404
|
status_code: 200, 404
|
||||||
|
when: not elasticsearch_bootstrap_node or single_node
|
||||||
|
poll: 30
|
||||||
register: wazuh_alerts_template_exits
|
register: wazuh_alerts_template_exits
|
||||||
tags: init
|
tags: init
|
||||||
|
|
||||||
@ -105,7 +107,9 @@
|
|||||||
status_code: 200
|
status_code: 200
|
||||||
body_format: json
|
body_format: json
|
||||||
body: "{{ lookup('template','wazuh-elastic7-template-alerts.json.j2') }}"
|
body: "{{ lookup('template','wazuh-elastic7-template-alerts.json.j2') }}"
|
||||||
when: wazuh_alerts_template_exits.status != 200
|
when:
|
||||||
|
- wazuh_alerts_template_exits.status is defined
|
||||||
|
- wazuh_alerts_template_exits.status != 200
|
||||||
tags: init
|
tags: init
|
||||||
|
|
||||||
- import_tasks: "RMRedHat.yml"
|
- import_tasks: "RMRedHat.yml"
|
||||||
|
|||||||
@ -10,11 +10,13 @@ network.host: {{ elasticsearch_network_host }}
|
|||||||
{% if single_node %}
|
{% if single_node %}
|
||||||
discovery.type: single-node
|
discovery.type: single-node
|
||||||
{% elif elasticsearch_bootstrap_node %}
|
{% elif elasticsearch_bootstrap_node %}
|
||||||
|
node.master: true
|
||||||
cluster.initial_master_nodes:
|
cluster.initial_master_nodes:
|
||||||
{% for item in elasticsearch_cluster_nodes %}
|
{% for item in elasticsearch_cluster_nodes %}
|
||||||
- {{ item }}
|
- {{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% elif elasticsearch_master_candidate %}
|
{% elif elasticsearch_master_candidate %}
|
||||||
|
node.master: true
|
||||||
discovery.seed_hosts:
|
discovery.seed_hosts:
|
||||||
{% for item in elasticsearch_cluster_nodes %}
|
{% for item in elasticsearch_cluster_nodes %}
|
||||||
- {{ item }}
|
- {{ item }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user