akrzos c5e90363bb Keystone Templatize Dashboards
Dashboards are templatized to allow for mass-creation/editing in
automated fashion.  The yml format is fairly easy to decipher to
add more dashboards.

Keystone Dashboards for:
* Comparing Process Counts Performance
* Comparing Thread Counts Performance
* OSP Version comparing UUID/Fernet Tokens Performance

Change-Id: Ic8db4a2fdcb8376fe4326c5b8905b1be159dc235
2016-10-03 14:47:51 -04:00

103 lines
3.3 KiB
YAML

---
#
# Tasks to generate/upload Searches/Visuals/Dashboards to Kibana
#
- name: Generate Keystone Visualizations
template:
src: "{{item.template}}"
dest: "{{browbeat_path}}/visualization/Keystone/visualization/{{item.title}}.json"
with_flattened:
- "{{keystone_osp_version_token_visualizations}}"
- "{{keystone_processes_threads_visualizations}}"
- name: Generate Keystone Dashboards
template:
src: dashboard.json.j2
dest: "{{browbeat_path}}/visualization/Keystone/dashboard/{{item.file_name}}"
with_flattened:
- "{{keystone_osp_version_token_dashboards}}"
- "{{keystone_processes_threads_dashboards}}"
- name: Remove Searches
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/search/{{ item | basename | regex_replace('\.json','') }}
method: DELETE
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 404, 200
with_fileglob:
- "{{ browbeat_path }}/visualization/*/search/*"
ignore_errors: true
- name: Remove Visuals
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/visualization/{{ item | basename | regex_replace('\.json','')}}
method: DELETE
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 404, 200
with_fileglob:
- "{{ browbeat_path }}/visualization/*/visualization/*"
ignore_errors: true
- name: Remove Dashboards
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/dashboard/{{ item | basename | regex_replace('\.json','')}}
method: DELETE
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 404, 200
with_fileglob:
- "{{ browbeat_path }}/visualization/*/dashboard/*"
ignore_errors: true
- name: Upload Searches
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/search/{{ item | basename | regex_replace('\.json','') }}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 201
with_fileglob:
- "{{ browbeat_path }}/visualization/*/search/*"
ignore_errors: true
- name: Upload Visuals
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/visualization/{{ item | basename | regex_replace('\.json','')}}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 201
with_fileglob:
- "{{ browbeat_path }}/visualization/*/visualization/*"
ignore_errors: true
- name: Upload Dashboards
uri:
url: http://{{ es_ip }}:{{ es_local_port }}/{{ es_kibana_index }}/dashboard/{{ item | basename | regex_replace('\.json','')}}
method: PUT
body: "{{ lookup('file', item) }}"
body_format: json
status_code: 201
with_fileglob:
- "{{ browbeat_path }}/visualization/*/dashboard/*"
ignore_errors: true
- name: Cleanup Keystone Visualizations
file:
path: "{{browbeat_path}}/visualization/Keystone/visualization/{{item.title}}.json"
state: absent
with_flattened:
- "{{keystone_osp_version_token_visualizations}}"
- "{{keystone_processes_threads_visualizations}}"
- name: Cleanup Keystone Dashboards
file:
path: "{{browbeat_path}}/visualization/Keystone/dashboard/{{item.file_name}}"
state: absent
with_flattened:
- "{{keystone_osp_version_token_dashboards}}"
- "{{keystone_processes_threads_dashboards}}"