browbeat/ansible/install/roles/grafana-dashboards/tasks/main.yml
Alex Krzos 966106905e Improve/Consolidate Collectd Configs & Grafana Dashboards
Collectd Configs:
+ Improvements to the maintainability of these config files
  + Versions appended to end of each per-process captured that
    the specific process was used in OpenStack
+ Collect on for Gnocchi, Aodh, and Sahara
+ Remove Satellite6 and OSE collectd configurations
+ Cleaned up Undercloud, Controller, Compute and Ceph Collectd
  Configurations to contain "mostly" processes that exist on
  machines of that type

Dashboards:
+ Add Gnocchi, Aodh, and Sahara per-process graphs
+ s/glance-agent/glance-api/ "bug"
+ Remove non-OpenStack Dashboards (OSE, Satellite 6) from Repo
+ Consolidate Guest, Baremetal, and Graphite Dashboards with OpenStack
  Dashboards in single playbook grafana-dashboards.yml
+ Update the Cloud System Performance Dashboard to allow comparsion
  with timeshifting
+ Add several comments to clarify the three types of dashboards
+ Removed DivideSeries from Graphite, Baremetal, and Guest Dashboards
  to match behavior of the OpenStack Dashboards for per-process
  graphs

Change-Id: I0c5c994324bd202b02a6175b261b84b183499d0e
2016-07-15 16:06:16 -04:00

81 lines
3.7 KiB
YAML

---
#
# Generate Browbeat OpenStack Grafana Dashboards
#
# Three types of Grafana Dashboards:
# * Static Dashboards (Ex. cloud_system_performance_comparsion.json)
# * Generic Generated Dashboards (Ex. OpenStack General System Performance)
# * Cloud Specific Dashboards (All Nodes CPU Graphs (for a specific cloud))
#
# The Cloud Specific Dashboards are the only ones that require a cloud's inventory be defined.
# You can deploy all of the Pre-Generated and Generated Dashboards and not the Cloud Specific
# Dashboards with cloud_dashboards=false
#
- name: Generate Generic Dashboards
template:
src: "{{role_path}}/templates/{{item.template_name}}_general_system_performance.json.j2"
dest: "{{role_path}}/files/{{item.process_list_name}}_general_system_performance.json"
with_items: "{{dashboards}}"
- name: Generate Cloud Specific CPU/Memory/Disk/Network Dashboards
template:
src: "{{item}}.json.j2"
dest: "{{role_path}}/files/{{item}}.json"
with_items:
- all_cpu_graphs
- all_memory_graphs
- all_disk_graphs
- all_network_graphs
when: cloud_dashboards
- name: Remove Existing Static Dashboard(s)
command: "curl -X DELETE -H 'Content-Type: application/json' http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db/{{item}}"
when: overwrite_existing
with_items:
- cloud-system-performance-comparsion
- name: Remove Existing Generic Dashboards
command: "curl -X DELETE -H 'Content-Type: application/json' http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db/{{item.process_list_name|lower}}-general-system-performance"
when: overwrite_existing
with_items: "{{dashboards}}"
- name: Remove Existing Cloud Specific CPU/Memory/Disk/Network Dashboards
command: "curl -X DELETE -H 'Content-Type: application/json' http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db/{{item}}"
when: overwrite_existing and cloud_dashboards
with_items:
- "{{dashboard_cloud_name}}-all-nodes-cpu"
- "{{dashboard_cloud_name}}-all-nodes-memory"
- "{{dashboard_cloud_name}}-all-nodes-disk"
- "{{dashboard_cloud_name}}-all-nodes-network"
- name: Upload Static Dashboards to Grafana
command: "curl -X POST -H 'Content-Type: application/json' -d @{{item}} http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db"
with_items:
- "{{role_path}}/files/cloud_system_performance_comparsion.json"
- name: Upload Generic Dashboards to Grafana
command: "curl -X POST -H 'Content-Type: application/json' -d @{{role_path}}/files/{{item.process_list_name}}_general_system_performance.json http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db"
with_items: "{{dashboards}}"
- name: Upload Cloud Specific CPU/Memory/Disk/Network Dashboards
command: "curl -X POST -H 'Content-Type: application/json' -d @{{item}} http://{{grafana_username}}:{{grafana_password}}@{{grafana_host}}:{{grafana_port}}/api/dashboards/db"
with_items:
- "{{role_path}}/files/all_cpu_graphs.json"
- "{{role_path}}/files/all_memory_graphs.json"
- "{{role_path}}/files/all_disk_graphs.json"
- "{{role_path}}/files/all_network_graphs.json"
when: cloud_dashboards
- name: Remove leftover json file(s) from Generic Dashboards
file: path={{role_path}}/files/{{item.process_list_name}}_general_system_performance.json state=absent
with_items: "{{dashboards}}"
- name: Remove leftover json file(s) from Cloud Specific CPU/Memory/Disk/Network Dashboards
file: path={{role_path}}/files/{{item}} state=absent
with_items:
- all_cpu_graphs.json
- all_memory_graphs.json
- all_disk_graphs.json
- all_network_graphs.json