| {%- from "linux/map.jinja" import network with context %} |
| dashboard: |
| linux_overview_prometheus: |
| datasource: prometheus |
| format: json |
| template: linux/files/grafana_dashboards/system_overview_prometheus.json |
| linux_disk_prometheus: |
| datasource: prometheus |
| format: json |
| template: linux/files/grafana_dashboards/system_disk_prometheus.json |
| linux_network_prometheus: |
| datasource: prometheus |
| format: json |
| template: linux/files/grafana_dashboards/system_network_prometheus.json |
| linux_influxdb: |
| datasource: influxdb |
| format: json |
| template: linux/files/grafana_dashboards/system_influxdb.json |
| {%- set bond_interfaces = [] %} |
| {%- for interface_name, interface in network.interface.items() %} |
| {%- if interface.type == 'bond' and interface.enabled == True %} |
| {%- do bond_interfaces.append(interface_name) %} |
| {%- endif %} |
| {%- endfor %} |
| {%- if bond_interfaces|length > 0 %} |
| linux_bond: |
| datasource: prometheus |
| format: json |
| template: linux/files/grafana_dashboards/bond_prometheus.json |
| {%- endif %} |