browbeat/ansible/install/roles/grafana-dashboards/templates/partials/per_process_rows.yaml.j2

38 lines
1.3 KiB
Django/Jinja

#jinja2:lstrip_blocks: True
{% for metrics in per_process_metrics %}
- title: {{per_process_row_title_prefix}} {{metrics.name}}
collapse: true
height: 200px
showTitle: true
panels:
{% for panel in per_process_panels[item.process_list_name] %}
- title: {{panel.name}}
type: graph
fill: 0
legend:
alignAsTable: true
avg: false
current: true
max: true
min: true
rightSide: true
show: true
total: false
values: true
nullPointMode: '{{metrics.nullPointMode}}'
targets:
{% for process in panel.processes %}
{% for metric in metrics.metrics %}
{% if metrics.name|match('Process CPU') %}
- target: alias(scale($Cloud.$Node.processes-{{process|replace('.', '_')|replace(':', '_')}}{{metric.query}}, 0.0001), '{{process}} {{metric.name}}')
{% else %}
- target: alias($Cloud.$Node.processes-{{process|replace('.', '_')|replace(':', '_')}}{{metric.query}}, '{{process}} {{metric.name}}')
{% endif %}
{% endfor %}
{% endfor %}
yaxes:
- format: {{metrics.y1units}}
- format: short
{% endfor %}
{% endfor %}