fde2f649bf
These files provide an alternative for those who want their custom dashboards on kibana. The playbook setupKibanaDashboards.yml installs elasticdump and uses it to dump into kibana's index a simple dashboard that collects logs from filebeat. Change-Id: Ibb3407b1f19eac5f7cda753e00c3bc6f3ff16da7
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
- name: Install Kibana Dashboards
|
|
hosts: "elastic-logstash"
|
|
become: true
|
|
vars_files:
|
|
- vars/variables.yml
|
|
|
|
environment: "{{ deployment_environment_variables | default({}) }}"
|
|
|
|
tasks:
|
|
- name: Add nodejs 6.x source
|
|
shell: "curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -"
|
|
|
|
- name: Install nodejs
|
|
apt:
|
|
name: nodejs
|
|
state: "present"
|
|
update_cache: yes
|
|
register: _apt_task
|
|
until: _apt_task is success
|
|
retries: 3
|
|
delay: 2
|
|
|
|
- name: Install elasticdump
|
|
npm:
|
|
name: elasticdump
|
|
path: /opt/elasticdump
|
|
state: "present"
|
|
|
|
- block:
|
|
- name: Copy openstack dashboard json template to /tmp dir
|
|
template:
|
|
src: templates/openstack-log-dashboard.json
|
|
dest: /tmp/openstack-log-dashboard.json
|
|
|
|
- name: Upload Custom Openstack Log Dashboard
|
|
shell: "/opt/elasticdump/node_modules/elasticdump/bin/elasticdump --input=/tmp/openstack-log-dashboard.json --output={{ kibana_index_on_elasticsearch }} --type=data"
|