openstack-ansible-ops/elk_metrics/loadKibana.yml
Ala Raddaoui b7a6ceb086 Added playbooks to install ELK stack with topbeat
This set of playbooks install an Elasticsearch cluster,
Logstash and a kibana dashboard inside containers
and then install Topbeat in your cloud to ship system metrics
to the Elastic cluster.

Change-Id: I0c8c853ee48bd9278bd7b08719be4bde5f8c3df6
2017-12-20 13:27:22 +00:00

26 lines
841 B
YAML

---
- name: load beats dashboards to Kibana
hosts: kibana
become: true
vars_files:
- vars/variables.yml
tasks:
- name: download sample dashboards
get_url:
url: https://download.elastic.co/beats/dashboards/beats-dashboards-1.1.0.zip
dest: /root/
- name: Ensure unzip is installed.
apt: name=unzip state=present
- name: extract archive
command: unzip -o /root/beats-dashboards-1.1.0.zip -d /root/
- command: ./load.sh
args:
chdir: /root/beats-dashboards-1.1.0
- name: copy topbeat index template in Elastic search
copy: src=templates/topbeat.template.json dest=/root mode=0644
- name: load it in elasticsearch
command: "curl -XPUT 'http://localhost:{{ elastic_port }}/_template/topbeat' -d@topbeat.template.json"
args:
chdir: /root/