akrzos c34543f909 Transition to GrafYaml for Dashboard Storage
Reasons to move from json, json.j2 to yaml/yaml.j2 + GrafYaml:
* Yaml is less lines
* Yaml allows comments
* Yaml means less curly braces and quotes
* GrafYaml manages panel ids and target refIds
* GrafYaml defaults reduce number of lines stored
* GrafYaml allows more easily cut/paste management of Dashboards

Identified Downsides:
* GrafYaml will be behind the Grafana Dashboard Model (Until code is updated)
* Json will always allow full feature set
* Installing Dashboards now requires GrafYaml

New Dashboards/Features:
* Templated Dashboards (Reduce line count in "static" dashboards)
* Cloud Specific networks - all dashboard
* Three Node Performance Food groups Enhanced
* Networker Node added for Cloud Specific Dashboards and Total Memory

Change-Id: I55ce9f9f6c28497c8b4ed7a19d42657a8eb14170
2018-02-27 10:20:18 -05:00

62 lines
1.8 KiB
Django/Jinja

#jinja2:lstrip_blocks: True
{% set log_types = ['error', 'warn', 'info'] %}
---
dashboard:
title: {{dashboard_cloud_name}} - Log
links:
- type: dashboards
asDropdown: true
icon: external link
includeVars: true
keepTime: true
tags:
- {{dashboard_cloud_name}}
targetBlank: true
title: "{{dashboard_cloud_name}} Dashboards"
tags:
- {{dashboard_cloud_name}}
time:
from: now-1h
to: now
rows:
- title: description row
height: 50px
panels:
- title: Browbeat provided Dashboard
content: "**This dashboard is provided by Browbeat and managed via Grafyaml**"
type: text
{% for log_type in log_types %}
{% for group in dashboard_groups %}
{% if group in groups %}
{% for batched_hosts in groups[group]|hosts_to_dictionary|dictsort|batch(dashboards_batch) %}
{% if 'undercloud' in group %}
- title: {{group}} {{log_type}} Rate in Logs
{% else %}
- title: {{group}} ({{batched_hosts[0][0]}} - {{batched_hosts[-1][0]}}) {{log_type}} Rate in Logs
{% endif %}
collapse: true
height: 250px
showTitle: true
panels:
{% for index, host in batched_hosts %}
- title: {{host}} Tail
type: graph
legend:
alignAsTable: true
avg: true
current: true
max: true
min: true
rightSide: true
show: true
total: false
values: true
nullPointMode: 'null'
targets:
- target: aliasByNode(consolidateBy(scale(aliasSub(aliasSub({{dashboard_cloud_name}}.{{host}}.tail-*.counter-*{{log_type}}, 'tail-', ''), 'counter-', ''), 10), 'max'), 2, 3)
{% endfor %}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}