
{{- $Values := (.helm).Values | default .Values }}
{{- $multicluster := ((($Values.grafana).sidecar).dashboards).multicluster | default false }}
{{- $defaultDatasource := "prometheus" -}}
{{- $clusterLabel := ($Values.global).clusterLabel | default "cluster" }}
{{- range (($Values.defaultDatasources).victoriametrics).datasources | default list }}
  {{- if and .isDefault .type }}{{ $defaultDatasource = .type }}{{- end }}
{{- end }}
title: Kubernetes / Views / Namespaces
templating:
  list:
  - name: datasource
    type: datasource
    query: {{ $defaultDatasource }}
    hide: 0
    current: {}
    options: []
    queryValue: ""
    refresh: 1
    regex: ""
    skipUrlSync: false
  - name: cluster
    datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    type: {{ ternary "query" "constant" $multicluster }}
    query: {{ ternary (printf "{\"qryType\":1,\"query\":\"label_values(kube_node_info, %s)\",\"refId\":\"PrometheusVariableQueryEditor-VariableQuery\"}" $clusterLabel) ".*" $multicluster }}
    definition: {{ ternary (printf "label_values(kube_node_info, %s)" $clusterLabel) ".*" $multicluster }}
    hide: {{ ternary 0 2 $multicluster }}
    current: {}
    options: []
    refresh: 1
    regex: ""
    skipUrlSync: false
    sort: 1
  - name: namespace
    multi: true
    includeAll: true
    datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    type: query
    query:
      query: {{ printf "label_values(kube_pod_info{%s=~\"$cluster\"}, namespace)" $clusterLabel }}
      refId: StandardVariableQuery
    definition: {{ printf "label_values(kube_pod_info{%s=~\"$cluster\"}, namespace)" $clusterLabel }}
    hide: 0
    allValue: .*
    current: {}
    options: []
    refresh: 1
    regex: ""
    skipUrlSync: false
    sort: 1
    tagValuesQuery: ""
    tagsQuery: ""
    useTags: false
  - name: resolution
    type: custom
    query: 1s, 15s, 30s, 1m, 3m, 5m
    hide: 0
    current:
      selected: false
      text: 30s
      value: 30s
    options:
    - selected: false
      text: 1s
      value: 1s
    - selected: false
      text: 15s
      value: 15s
    - selected: true
      text: 30s
      value: 30s
    - selected: false
      text: 1m
      value: 1m
    - selected: false
      text: 3m
      value: 3m
    - selected: false
      text: 5m
      value: 5m
    queryValue: ""
    skipUrlSync: false
  - name: created_by
    multi: true
    includeAll: true
    datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    type: query
    query:
      query: {{ printf "label_values(kube_pod_info{namespace=~\"$namespace\",%s=~\"$cluster\"}, created_by_name)" $clusterLabel }}
      refId: PrometheusVariableQueryEditor-VariableQuery
    definition: {{ printf "label_values(kube_pod_info{namespace=~\"$namespace\",%s=~\"$cluster\"}, created_by_name)" $clusterLabel }}
    hide: 0
    allValue: .*
    current: {}
    description: Can be used to filter on a specific deployment, statefulset or deamonset (only relevant panels).
    options: []
    refresh: 2
    regex: ""
    skipUrlSync: false
    sort: 1
editable: false
timezone: {{ default "utc" ($Values.defaultDashboards).defaultTimezone }}
tags:
- Kubernetes
- Prometheus
- vm-k8s-stack
annotations:
  list:
  - name: Annotations & Alerts
    datasource:
      type: datasource
      uid: grafana
    builtIn: 1
    enable: true
    hide: true
    iconColor: rgba(0, 211, 255, 1)
    target:
      limit: 100
      matchAny: false
      tags: []
      type: dashboard
    type: dashboard
  - name: terraform
    datasource:
      type: datasource
      uid: grafana
    enable: true
    hide: false
    iconColor: '#5c4ee5'
    target:
      limit: 100
      matchAny: false
      tags:
      - terraform
      type: tags
  - name: oncall
    datasource:
      type: datasource
      uid: grafana
    enable: true
    hide: false
    iconColor: red
    target:
      limit: 100
      matchAny: false
      tags:
      - oncall
      type: tags
panels:
- title: Overview
  datasource:
    type: datasource
    uid: grafana
  collapsed: false
  gridPos:
    h: 1
    w: 24
    x: 0
    "y": 0
  id: 38
  type: row
- title: Namespace(s) usage on total cluster CPU in %
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",image!=\"\",%s=~\"$cluster\"}[$__rate_interval])) by(%s) / sum(machine_cpu_cores{%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: false
    instant: true
    interval: ""
    legendFormat: ""
    range: false
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      decimals: 2
      mappings: []
      max: 1
      min: 0
      thresholds:
        mode: percentage
        steps:
        - color: green
          value: null
        - color: orange
          value: 50
        - color: red
          value: 70
      unit: percentunit
    overrides: []
  gridPos:
    h: 7
    w: 6
    x: 0
    "y": 1
  id: 46
  options:
    minVizHeight: 75
    minVizWidth: 75
    orientation: auto
    reduceOptions:
      calcs:
      - lastNotNull
      fields: ""
      values: false
    showThresholdLabels: false
    showThresholdMarkers: true
    sizing: auto
    text: {}
  pluginVersion: 11.2.1
  type: gauge
- title: Namespace(s) usage on total cluster RAM in %
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(container_memory_working_set_bytes{namespace=~\"$namespace\",image!=\"\",%s=~\"$cluster\"}) by(%s) / sum(machine_memory_bytes{%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    exemplar: true
    interval: ""
    legendFormat: ""
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      decimals: 2
      mappings: []
      max: 1
      min: 0
      thresholds:
        mode: percentage
        steps:
        - color: green
          value: null
        - color: orange
          value: 50
        - color: red
          value: 70
      unit: percentunit
    overrides: []
  gridPos:
    h: 7
    w: 6
    x: 6
    "y": 1
  id: 48
  options:
    minVizHeight: 75
    minVizWidth: 75
    orientation: auto
    reduceOptions:
      calcs:
      - lastNotNull
      fields: ""
      values: false
    showThresholdLabels: false
    showThresholdMarkers: true
    sizing: auto
    text: {}
  pluginVersion: 11.2.1
  type: gauge
- title: Kubernetes Resource Count
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Running Pods
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_service_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Services
    refId: B
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_ingress_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Ingresses
    refId: C
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_deployment_labels{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Deployments
    refId: D
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_statefulset_labels{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Statefulsets
    refId: E
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_daemonset_labels{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Daemonsets
    refId: F
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_persistentvolumeclaim_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Persistent Volume Claims
    refId: G
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_hpa_labels{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Horizontal Pod Autoscalers
    refId: H
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_configmap_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Configmaps
    refId: I
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_secret_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Secrets
    refId: J
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_networkpolicy_labels{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Network Policies
    refId: K
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 11
    w: 12
    x: 12
    "y": 1
  id: 32
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Namespace(s) CPU Usage in cores
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",image!=\"\",%s=~\"$cluster\"}[$__rate_interval])) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: Real
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\",resource=\"cpu\",%s=~\"$cluster\"} and on(namespace,pod,%s) max(kube_pod_status_phase{phase=\"Running\",namespace=~\"$namespace\",%s=~\"$cluster\"} == 1) by(namespace,pod,%s)) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Requests
    range: true
    refId: B
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\",resource=\"cpu\",%s=~\"$cluster\"} and on(namespace,pod,%s) max(kube_pod_status_phase{phase=\"Running\",namespace=~\"$namespace\",%s=~\"$cluster\"} == 1) by(namespace,pod,%s)) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Limits
    range: true
    refId: C
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(machine_cpu_cores{%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Cluster Total
    range: true
    refId: D
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      mappings: []
      noValue: "0"
      thresholds:
        mode: absolute
        steps:
        - color: rgb(255, 255, 255)
          value: null
      unit: none
    overrides: []
  gridPos:
    h: 4
    w: 6
    x: 0
    "y": 8
  id: 62
  options:
    colorMode: none
    graphMode: none
    justifyMode: center
    orientation: auto
    percentChangeColorMode: standard
    reduceOptions:
      calcs:
      - lastNotNull
      fields: ""
      values: false
    showPercentChange: false
    text: {}
    textMode: auto
    wideLayout: true
  pluginVersion: 11.2.1
  type: stat
- title: Namespace(s) RAM Usage in bytes
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(container_memory_working_set_bytes{namespace=~\"$namespace\",image!=\"\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: Real
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\",resource=\"memory\",%s=~\"$cluster\"} and on(namespace,pod,%s) max(kube_pod_status_phase{phase=\"Running\",namespace=~\"$namespace\",%s=~\"$cluster\"} == 1) by(namespace,pod,%s)) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Requests
    range: true
    refId: B
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\",resource=\"memory\",%s=~\"$cluster\"} and on(namespace,pod,%s) max(kube_pod_status_phase{phase=\"Running\",namespace=~\"$namespace\",%s=~\"$cluster\"} == 1) by(namespace,pod,%s)) by(%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Limits
    range: true
    refId: C
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(machine_memory_bytes{%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Cluster Total
    range: true
    refId: D
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      mappings: []
      noValue: "0"
      thresholds:
        mode: absolute
        steps:
        - color: rgb(255, 255, 255)
          value: null
      unit: bytes
    overrides: []
  gridPos:
    h: 4
    w: 6
    x: 6
    "y": 8
  id: 64
  options:
    colorMode: none
    graphMode: none
    justifyMode: auto
    orientation: auto
    percentChangeColorMode: standard
    reduceOptions:
      calcs:
      - lastNotNull
      fields: ""
      values: false
    showPercentChange: false
    text: {}
    textMode: auto
    wideLayout: true
  pluginVersion: 11.2.1
  type: stat
- title: Resources
  datasource:
    type: datasource
    uid: grafana
  collapsed: false
  gridPos:
    h: 1
    w: 24
    x: 0
    "y": 12
  id: 40
  type: row
- title: CPU usage by Pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",image!=\"\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: '{{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: CPU CORES
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: none
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 13
  id: 29
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: single
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Memory usage by Pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(container_memory_working_set_bytes{namespace=~\"$namespace\",image!=\"\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: '{{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: bytes
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 13
  id: 30
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: single
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: CPU Throttled seconds by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\",image!=\"\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s) > 0" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: '{{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  description: ""
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: SECONDS
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineStyle:
          fill: solid
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 2
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: s
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 21
  id: 68
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Kubernetes
  collapsed: false
  gridPos:
    h: 1
    w: 24
    x: 0
    "y": 29
  id: 73
  type: row
- title: Kubernetes Pods QoS classes
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_status_qos_class{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(qos_class,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} qos_class {{`}}`}} pods'
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_info{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    hide: false
    legendFormat: Total pods
    range: true
    refId: B
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 9
    w: 12
    x: 0
    "y": 30
  id: 70
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Kubernetes Pods Status Reason
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_status_reason{%s=~\"$cluster\"}) by(reason,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} reason {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 9
    w: 12
    x: 12
    "y": 30
  id: 72
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: OOM Events by namespace, pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(increase(container_oom_events_total{namespace=~\"${namespace}\",%s=~\"$cluster\"}[$__rate_interval])) by(namespace,pod,%s) > 0" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: 'namespace: {{`{{`}} namespace {{`}}`}} - pod: {{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  description: No data is generally a good thing here.
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: points
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 9
    w: 12
    x: 0
    "y": 39
  id: 74
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Container Restarts by namespace, pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\",%s=~\"$cluster\"}[$__rate_interval])) by(namespace,pod,%s) > 0" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: 'namespace: {{`{{`}} namespace {{`}}`}} - pod: {{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  description: No data is generally a good thing here.
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: points
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 9
    w: 12
    x: 12
    "y": 39
  id: 75
  options:
    legend:
      calcs:
      - min
      - max
      - mean
      displayMode: table
      placement: right
      showLegend: true
      sortBy: Max
      sortDesc: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Nb of pods by state
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_status_ready{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: Ready
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_status_running{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: Running
    range: true
    refId: B
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_status_waiting{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Waiting
    refId: C
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_status_restarts_total{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Restarts Total
    refId: D
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_status_terminated{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(%s)" $clusterLabel $clusterLabel }}
    interval: ""
    legendFormat: Terminated
    refId: E
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 0
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: none
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 48
  id: 5
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Nb of containers by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_container_info{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: '{{`{{`}} pod {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 0
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: none
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 48
  id: 2
  options:
    legend:
      calcs: []
      displayMode: hidden
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Replicas available by deployment
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_deployment_status_replicas_available{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(deployment,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} deployment {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 56
  id: 7
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Replicas unavailable by deployment
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_deployment_status_replicas_unavailable{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}) by(deployment,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: '{{`{{`}} deployment {{`}}`}}'
    range: true
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 56
  id: 8
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Pods with unexpected status
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(kube_pod_status_phase{phase!~\"Running|Succeeded\",namespace=~\"$namespace\",%s=~\"$cluster\"}) by(pod,%s) > 0" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: '{{`{{`}} deployment {{`}}`}}'
    range: true
    refId: A
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  description: List of pods that are not in Running or Succeeded status.
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 64
  id: 83
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Container Image Used
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "count(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\",image!=\"\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(image,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    interval: ""
    legendFormat: '{{`{{`}} image {{`}}`}}'
    range: true
    refId: A
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: bars
        fillOpacity: 25
        gradientMode: none
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: normal
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: short
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 64
  id: 82
  options:
    legend:
      calcs:
      - min
      - max
      - last
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Kubernetes Storage
  datasource:
    type: datasource
    uid: grafana
  collapsed: false
  gridPos:
    h: 1
    w: 24
    x: 0
    "y": 72
  id: 42
  type: row
- title: Persistent Volumes - Capacity and usage in %
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "max(kubelet_volume_stats_used_bytes{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,namespace,%s) / max(kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,namespace,%s)" $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} namespace {{`}}`}} - {{`{{`}} persistentvolumeclaim {{`}}`}}'
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 2
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: percentunit
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 73
  id: 65
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Persistent Volumes - Capacity and usage in bytes
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "max(kubelet_volume_stats_used_bytes{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,namespace,%s)" $clusterLabel $clusterLabel }}
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} namespace {{`}}`}} - {{`{{`}} persistentvolumeclaim {{`}}`}} - Used'
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "max(kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,namespace,%s)" $clusterLabel $clusterLabel }}
    exemplar: true
    hide: false
    interval: ""
    legendFormat: '{{`{{`}} namespace {{`}}`}} - {{`{{`}} persistentvolumeclaim {{`}}`}} - Capacity'
    refId: B
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 2
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: bytes
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 73
  id: 66
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Persistent Volumes - Inodes
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "1 - (sum(kubelet_volume_stats_inodes_used{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,%s) / sum(kubelet_volume_stats_inodes{namespace=~\"$namespace\",%s=~\"$cluster\"}) by(persistentvolumeclaim,%s))" $clusterLabel $clusterLabel $clusterLabel $clusterLabel }}
    exemplar: true
    interval: ""
    legendFormat: '{{`{{`}} persistentvolumeclaim {{`}}`}}'
    refId: A
  datasource:
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      decimals: 2
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: percentunit
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 81
  id: 27
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: false
    tooltip:
      mode: multi
      sort: desc
  pluginVersion: 8.3.3
  type: timeseries
- title: Network
  collapsed: false
  gridPos:
    h: 1
    w: 24
    x: 0
    "y": 89
  id: 76
  type: row
- title: Network - Bandwidth by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_network_receive_bytes_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Received - {{`{{`}} pod {{`}}`}}
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "0 - sum(rate(container_network_transmit_bytes_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Transmitted - {{`{{`}} pod {{`}}`}}
    range: true
    refId: B
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: binBps
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 90
  id: 78
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Network - Packets Rate by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_network_receive_packets_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Received - {{`{{`}} pod {{`}}`}}
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "0 - sum(rate(container_network_transmit_packets_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Transmitted - {{`{{`}} pod {{`}}`}}
    range: true
    refId: B
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: pps
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 90
  id: 79
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Network - Packets Dropped by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Received - {{`{{`}} pod {{`}}`}}
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "0 - sum(rate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Transmitted - {{`{{`}} pod {{`}}`}}
    range: true
    refId: B
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: pps
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 0
    "y": 98
  id: 80
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
- title: Network - Errors by pod
  targets:
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "sum(rate(container_network_receive_errors_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Received - {{`{{`}} pod {{`}}`}}
    range: true
    refId: A
  - datasource:
      type: {{ $defaultDatasource }}
      uid: ${datasource}
    expr: {{ printf "0 - sum(rate(container_network_transmit_errors_total{namespace=~\"$namespace\",pod=~\"${created_by}.*\",%s=~\"$cluster\"}[$__rate_interval])) by(pod,%s)" $clusterLabel $clusterLabel }}
    editorMode: code
    exemplar: true
    interval: $resolution
    legendFormat: Transmitted - {{`{{`}} pod {{`}}`}}
    range: true
    refId: B
  datasource:
    default: false
    type: {{ $defaultDatasource }}
    uid: ${datasource}
  fieldConfig:
    defaults:
      color:
        mode: palette-classic
      custom:
        axisBorderShow: false
        axisCenteredZero: false
        axisColorMode: text
        axisLabel: ""
        axisPlacement: auto
        barAlignment: 0
        barWidthFactor: 0.6
        drawStyle: line
        fillOpacity: 25
        gradientMode: opacity
        hideFrom:
          legend: false
          tooltip: false
          viz: false
        insertNulls: false
        lineInterpolation: smooth
        lineWidth: 2
        pointSize: 5
        scaleDistribution:
          type: linear
        showPoints: never
        spanNulls: false
        stacking:
          group: A
          mode: none
        thresholdsStyle:
          mode: "off"
      mappings: []
      thresholds:
        mode: absolute
        steps:
        - color: green
          value: null
        - color: red
          value: 80
      unit: pps
    overrides: []
  gridPos:
    h: 8
    w: 12
    x: 12
    "y": 98
  id: 81
  options:
    legend:
      calcs: []
      displayMode: table
      placement: right
      showLegend: true
    tooltip:
      mode: multi
      sort: none
  pluginVersion: 8.3.3
  type: timeseries
__elements: {}
__inputs:
- description: ""
  label: Prometheus
  name: DS_PROMETHEUS
  pluginId: prometheus
  pluginName: Prometheus
  type: datasource
__requires:
- id: gauge
  name: Gauge
  type: panel
  version: ""
- id: grafana
  name: Grafana
  type: grafana
  version: 10.3.1
- id: prometheus
  name: Prometheus
  type: datasource
  version: 1.0.0
- id: stat
  name: Stat
  type: panel
  version: ""
- id: timeseries
  name: Time series
  type: panel
  version: ""
condition: {{ ($Values.kubelet).enabled }}
description: 'This is a modern ''Namespaces View'' dashboard for your Kubernetes cluster(s). Made for kube-prometheus-stack and take advantage of the latest Grafana features. GitHub repository: https://github.com/dotdc/grafana-dashboards-kubernetes'
fiscalYearStartMonth: 0
graphTooltip: 1
links: []
liveNow: false
refresh: 30s
schemaVersion: 39
time:
  from: now-1h
  to: now
timepicker: {}
uid: k8s_views_ns
version: 45
weekStart: ""
