| {%- from "kubernetes/map.jinja" import common with context %} |
| |
| dashboard: |
| {%- if common.monitoring is defined %} |
| {%- set backend = common.monitoring.get('backend') %} |
| {%- if backend is string %} |
| {%- set backend = [backend] %} |
| {%- endif %} |
| {%- else %} |
| {# legacy StackLight behavior #} |
| {% set backend = ['influxdb'] %} |
| {%- endif %} |
| |
| {%- if 'prometheus' in backend %} |
| kubernetes-application-prometheus: |
| format: json |
| template: kubernetes/files/grafana_dashboards/kubernetes_app_prometheus.json |
| {%- endif %} |
| {%- if 'influxdb' in backend %} |
| kubernetes: |
| format: json |
| template: kubernetes/files/grafana_dashboards/kubernetes_influxdb.json |
| calico: |
| format: json |
| template: kubernetes/files/grafana_dashboards/calico_influxdb.json |
| main: |
| row: |
| kubernetes-control-plane: |
| title: Kubernetes Control Plane |
| panel: |
| kubernetes: |
| title: Kubernetes |
| links: |
| - dashboard: Kubernetes |
| title: Kubernetes |
| type: dashboard |
| target: |
| cluster_status: |
| rawQuery: true |
| query: SELECT last(value) FROM cluster_status WHERE cluster_name = 'k8s-master' AND environment_label = '$environment' AND $timeFilter GROUP BY time($interval) fill(null) |
| kubernetes-data-plane: |
| title: Kubernetes Data Plane |
| panel: |
| kubernetes: |
| title: Kubernetes |
| links: |
| - dashboard: Kubernetes |
| title: Kubernetes |
| type: dashboard |
| target: |
| cluster_status: |
| rawQuery: true |
| query: SELECT last(value) FROM cluster_status WHERE cluster_name = 'k8s-pool' AND environment_label = '$environment' AND $timeFilter GROUP BY time($interval) fill(null) |
| {%- endif %} |