openstack-ansible-ops/elk_metrics_6x/createElasticIndexes.yml
Kevin Carter 40b7b525bb Add documentation on running os-profiler with ELK
The change documents adding os-profiler overrides into an
openstack-ansible deployment which will collect notification messages
when a profile command is executed.

To ensure the best possible outcome with os-profiler indexes a playbook
to create default indexes has been added which will create the known
index and apply appropriate settings.

Change-Id: Ie00424b2d3d123d8764cd201605ea5234a78bfbb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-05 07:10:10 +00:00

30 lines
780 B
YAML

---
- name: Create known indexes in Elasticsearch
hosts: "elastic-logstash[0]"
become: true
vars_files:
- vars/variables.yml
environment: "{{ deployment_environment_variables | default({}) }}"
tasks:
- name: Create basic indexes
uri:
url: http://127.0.0.1:9200/{{ item.name }}
method: PUT
body: "{{ item.index_options | to_json }}"
status_code: 200,400
body_format: json
with_items:
- name: "osprofiler-notifications"
index_options:
settings:
index:
codec: "best_compression"
mapping:
total_fields:
limit: "10000"
refresh_interval: "5s"
number_of_replicas: "1"