Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple IPs option #92

Merged
merged 2 commits into from
Nov 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playbooks/wazuh-logstash.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
- hosts: <your logstash host>
roles:
- { role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-logstash, elasticsearch_network_host: 'localhost' }
- { role: /etc/ansible/roles/wazuh-ansible/roles/elastic-stack/ansible-logstash, elasticsearch_network_host: ["localhost"] }
5 changes: 4 additions & 1 deletion roles/elastic-stack/ansible-logstash/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
logstash_create_config: true
logstash_input_beats: false

elasticsearch_network_host: "127.0.0.1"
#You can introduce Multiples IPs
# elasticseacrh_network_host: ["Localhost1", "Localhost2", "Localhost3", ...]
elasticsearch_network_host: ["Localhost"]

elasticsearch_http_port: "9200"
elasticsearch_shards: 5
elasticsearch_replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ filter {
output {
#stdout { codec => rubydebug }
elasticsearch {
hosts => ["{{ elasticsearch_network_host }}:{{ elasticsearch_http_port }}"]
hosts => {{ elasticsearch_network_host | to_json}}
index => "wazuh-alerts-3.x-%{+YYYY.MM.dd}"
document_type => "wazuh"
}
Expand Down