openstack-ansible-ops/elk_metrics_6x/templates/30-elasticsearch-output.conf.j2
Per Abildgaard Toft 48e2b8e998 Updatev version of ELK stack for openstack ansible
This addition is an updated of the curent elk_metrics which will install Elasticsearc, Logstash and Kibana 6.x.
It also include configuration guide for haproxy endpoints

Change-Id: Iac4dec6d17bc75433e5fe672f3b9781536b8e619
2018-03-06 14:21:23 +00:00

10 lines
526 B
Django/Jinja

output {
elasticsearch {
hosts => {% set IP_ARR=[] %}{% for host in groups['elastic-logstash'] | union(groups['kibana']) %}{% if IP_ARR.insert(loop.index,hostvars[host]['ansible_host']) %}{% endif %}{% endfor %}[{{ IP_ARR | map('regex_replace', '$', ':' ~ elastic_port|string()) | map('regex_replace', '$', '"') | map('regex_replace', '^', '"') | list | join(',' ) }}]
sniffing => true
manage_template => false
index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"
document_type => "%{[@metadata][type]}"
}
}