Add template for Elastic
This work will help Elastic/Kibana from processing our UUID's into multiple strings. Before this work, Kibana would display parts of our UUID since they contained '-'. If the user installs ELK from Browbeat they will have these templates installed for them. If the user wants to install these templates into a existing Elasticsearch they can with the es-template.yml Change-Id: I04165c50dfac9cbd1f05b4bcd2ac78fbdb4da0a2
This commit is contained in:
parent
ec90189db0
commit
ef02b53e0e
@ -13,3 +13,8 @@
|
||||
- { role: nginx }
|
||||
- { role: curator, when: install_curator_tool }
|
||||
- { role: kibana }
|
||||
|
||||
- hosts: localhost
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
roles:
|
||||
- { role: es-template }
|
||||
|
6
ansible/install/es-template.yml
Normal file
6
ansible/install/es-template.yml
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
|
||||
- hosts: localhost
|
||||
remote_user: "{{ local_remote_user }}"
|
||||
roles:
|
||||
- { role: es-template }
|
11
ansible/install/roles/es-template/tasks/main.yml
Normal file
11
ansible/install/roles/es-template/tasks/main.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
|
||||
- name: Upload templates
|
||||
uri:
|
||||
url: http://{{ es_ip }}:{{ es_local_port }}/_template/{{ item | basename | regex_replace('\.json','') }}*
|
||||
method: PUT
|
||||
body: "{{ lookup('file', item) }}"
|
||||
body_format: json
|
||||
with_fileglob:
|
||||
- "{{ browbeat_path }}/elastic/templates/browbeat*"
|
||||
ignore_errors: true
|
14
elastic/README.rst
Normal file
14
elastic/README.rst
Normal file
@ -0,0 +1,14 @@
|
||||
ElasticSearch Configuration for Browbeat
|
||||
-----------------------------------------
|
||||
|
||||
**+ templates/**
|
||||
|
||||
Will contain Elasticsearch templates to account for things like the Browbeat UUID.
|
||||
These Templates will be installed if you run through our Elasticsearch installer. If
|
||||
you already have a Elasticsearch Host, you can install them by running the following::
|
||||
|
||||
$ cd ../ansible
|
||||
$ vi install/group_vars/all.yml
|
||||
# Update your es_ip
|
||||
$ ansible-playbook -i hosts install/es-template.yml
|
||||
|
4
elastic/templates/README.rst
Normal file
4
elastic/templates/README.rst
Normal file
@ -0,0 +1,4 @@
|
||||
ElasticSearch / Kibana Template
|
||||
----------------------------------
|
||||
|
||||
Template to instruct elasticSearch & Kibana to not processes some of our fields. For example, our UUIDs would turn into multiple strings due the default tokenizer's use of '-', '.', '/', etc. as token separators.
|
71
elastic/templates/browbeat-perfkit-.json
Normal file
71
elastic/templates/browbeat-perfkit-.json
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
template: "browbeat-perfkit-*",
|
||||
mappings: {
|
||||
result: {
|
||||
properties: {
|
||||
browbeat_rerun: {
|
||||
type: "long"
|
||||
},
|
||||
browbeat_scenario: {
|
||||
properties: {
|
||||
benchmarks: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
browbeat_uuid: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
cloud_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
grafana_url: {
|
||||
properties: {
|
||||
openstack-general-system-performance: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
perfkit_setup: {
|
||||
properties: {
|
||||
cloud: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
image: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
machine_instance: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
machine_type: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
perfkitbenchmarker_version: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
vm_count: {
|
||||
type: "string"
|
||||
},
|
||||
zone: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
timestamp: {
|
||||
type: "date",
|
||||
format: "strict_date_optional_time||epoch_millis"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
72
elastic/templates/browbeat-rally-.json
Normal file
72
elastic/templates/browbeat-rally-.json
Normal file
@ -0,0 +1,72 @@
|
||||
{
|
||||
template: "browbeat-rally-*",
|
||||
mappings: {
|
||||
result: {
|
||||
properties: {
|
||||
action: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
browbeat_uuid: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
cloud_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
grafana_url: {
|
||||
properties: {
|
||||
openstack-general-system-performance: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
result: {
|
||||
type: "string"
|
||||
},
|
||||
scenario: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
timestamp: {
|
||||
type: "date",
|
||||
format: "strict_date_optional_time||epoch_millis"
|
||||
}
|
||||
}
|
||||
},
|
||||
error: {
|
||||
properties: {
|
||||
action: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
action_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
browbeat_uuid: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
cloud_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
error_msg: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
error_type: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
timestamp: {
|
||||
type: "date",
|
||||
format: "strict_date_optional_time||epoch_millis"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
112
elastic/templates/browbeat-shaker-.json
Normal file
112
elastic/templates/browbeat-shaker-.json
Normal file
@ -0,0 +1,112 @@
|
||||
{
|
||||
aliases: { },
|
||||
template: "browbeat-shaker-*",
|
||||
mappings: {
|
||||
result: {
|
||||
properties: {
|
||||
browbeat_scenario: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
browbeat_uuid: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
cloud_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
grafana_url: {
|
||||
properties: {
|
||||
openstack-general-system-performance: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
result: {
|
||||
properties: {
|
||||
metric: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
result_type: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
value: {
|
||||
type: "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
run: {
|
||||
type: "long"
|
||||
},
|
||||
shaker_test_info: {
|
||||
properties: {
|
||||
deployment: {
|
||||
properties: {
|
||||
template: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
description: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
execution: {
|
||||
properties: {
|
||||
progression: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
tests: {
|
||||
properties: {
|
||||
class: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
method: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
time: {
|
||||
index: "not_analyzed",
|
||||
type: "long"
|
||||
},
|
||||
title: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
file_name: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
title: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
shaker_uuid: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
template: {
|
||||
index: "not_analyzed",
|
||||
type: "string"
|
||||
},
|
||||
timestamp: {
|
||||
type: "date",
|
||||
format: "dateOptionalTime"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user