diff --git a/bootstrap/deploy.sh b/bootstrap/deploy.sh new file mode 100755 index 00000000..6c78ca0c --- /dev/null +++ b/bootstrap/deploy.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +helm upgrade --install --create-namespace argocd argo/argo-cd -n argocd +helm upgrade --install --create-namespace --values values-apps.yaml argocd-apps argo/argocd-apps -n argocd + + diff --git a/bootstrap/purge.sh b/bootstrap/purge.sh new file mode 100755 index 00000000..a559d614 --- /dev/null +++ b/bootstrap/purge.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +helm uninstall argocd argo/argocd-apps -n argocd +helm uninstall argocd argo/argo-cd -n argocd + + diff --git a/bootstrap/values-apps.yaml.template b/bootstrap/values-apps.yaml.template new file mode 100644 index 00000000..d08b0070 --- /dev/null +++ b/bootstrap/values-apps.yaml.template @@ -0,0 +1,36 @@ +## !! +# This values files only contains the bare minimum to get argo up and running. +# Only update things like initial argo-cd version here +# Rest of config is located in argocd-apps/sys/argocd.yaml +## +applications: + sys: + namespace: argocd + additionalAnnotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + destination: + namespace: argocd + server: https://kubernetes.default.svc + project: sys + sources: + - directory: + recurse: true + path: sys/_rendered//sys/templates + repoURL: https://gitlab.com/serit/k8s/serit-platform.git + targetRevision: main +projects: + sys: + namespace: argocd + additionalLabels: {} + additionalAnnotations: {} + description: sys components project + sourceRepos: + - '*' + destinations: + - namespace: '*' + server: https://kubernetes.default.svc + clusterResourceWhitelist: + - group: '*' + kind: '*' + orphanedResources: + warn: false diff --git a/charts/sys/.helmignore b/charts/sys/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/charts/sys/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/sys/Chart.yaml b/charts/sys/Chart.yaml new file mode 100644 index 00000000..4cd2a5ed --- /dev/null +++ b/charts/sys/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: sys +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/charts/sys/templates/alerts/x509-certificates.yaml b/charts/sys/templates/alerts/x509-certificates.yaml new file mode 100644 index 00000000..a488fd04 --- /dev/null +++ b/charts/sys/templates/alerts/x509-certificates.yaml @@ -0,0 +1,48 @@ +{{- if .Values.x509_exporter.alerts }} +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + labels: + # Some labels for various prometheus matching + k8s-app: x509-exporter + prometheus: k8s + role: alert-rules + name: x509-exporter-x509-certificate-exporter + namespace: x509-exporter +spec: + groups: + - name: x509-certificate-exporter.rules + rules: + - alert: X509ExporterReadErrors + annotations: + description: Over the last 15 minutes, this x509-certificate-exporter instance has experienced errors reading certificate files or querying the Kubernetes API. This could be caused by a misconfiguration if triggered when the exporter starts. + summary: Increasing read errors for x509-certificate-exporter + expr: delta(x509_read_errors[15m]) > 0 + for: 5m + labels: + severity: warning + - alert: CertificateError + annotations: + description: Certificate could not be decoded {{`{{`}}if $labels.secret_name {{`}}`}} in Kubernetes secret "{{`{{`}} $labels.secret_namespace {{`}}`}}/{{`{{`}} $labels.secret_name {{`}}`}}"{{`{{`}}else{{`}}`}}at location "{{`{{`}} $labels.filepath {{`}}`}}"{{`{{`}}end{{`}}`}} + summary: Certificate cannot be decoded + expr: x509_cert_error > 0 + for: 15m + labels: + severity: warning + - alert: CertificateRenewal + annotations: + description: Certificate for "{{`{{`}} $labels.subject_CN {{`}}`}}" should be renewed {{`{{`}}if $labels.secret_name {{`}}`}}in Kubernetes secret "{{`{{`}} $labels.secret_namespace {{`}}`}}/{{`{{`}} $labels.secret_name {{`}}`}}"{{`{{`}}else{{`}}`}}at location "{{`{{`}} $labels.filepath {{`}}`}}"{{`{{`}}end{{`}}`}} + summary: Certificate should be renewed + expr: ((x509_cert_not_after{secret_name!="linkerd-identity-issuer", issuer_O="", issuer_CN!="webhook.linkerd.cluster.local"} - time()) / 86400) < 28 + for: 15m + labels: + severity: warning + - alert: CertificateExpiration + annotations: + description: Certificate for "{{`{{`}} $labels.subject_CN {{`}}`}}" is about to expire {{`{{`}}if $labels.secret_name {{`}}`}}in Kubernetes secret "{{`{{`}} $labels.secret_namespace {{`}}`}}/{{`{{`}} $labels.secret_name {{`}}`}}"{{`{{`}}else{{`}}`}}at location "{{`{{`}} $labels.filepath {{`}}`}}"{{`{{`}}end{{`}}`}} + summary: Certificate is about to expire + expr: ((x509_cert_not_after{secret_name!="linkerd-identity-issuer", issuer_O="", issuer_CN!="webhook.linkerd.cluster.local"} - time()) / 86400) < 14 + for: 15m + labels: + severity: critical +{{- end }} diff --git a/charts/sys/templates/app-actions-runner-controller.yaml b/charts/sys/templates/app-actions-runner-controller.yaml new file mode 100644 index 00000000..b3f34e57 --- /dev/null +++ b/charts/sys/templates/app-actions-runner-controller.yaml @@ -0,0 +1,42 @@ +{{ if .Values.actions_runner_controller.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: actions-runner-controller + namespace: argocd #TODO move arc to isolated project +spec: + destination: + namespace: actions-runner-controller + server: 'https://kubernetes.default.svc' + sources: + - repoURL: 'https://actions-runner-controller.github.io/actions-runner-controller' + targetRevision: {{ .Values.actions_runner_controller.version }} + chart: actions-runner-controller + helm: + values: | + replicaCount: 1 + # Webhook + webhookPort: 9443 + syncPeriod: 1m + defaultScaleDownDelay: 10m + # Authentication + authSecret: + enabled: true + create: false + name: arc-gh-token + annotations: {} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + {{- if .Values.actions_runner_controller.version }} + automated: + # selfHeal: false + prune: true + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-argo-rollouts.yaml b/charts/sys/templates/app-argo-rollouts.yaml new file mode 100644 index 00000000..136bced8 --- /dev/null +++ b/charts/sys/templates/app-argo-rollouts.yaml @@ -0,0 +1,37 @@ +{{- if .Values.argo_rollouts.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-rollouts + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + destination: + namespace: argocd + server: 'https://kubernetes.default.svc' + sources: + #- repoURL: {{ .Values.cluster_config.manifests }} + # path: {{ .Values.cluster_config.policies }}/argo-rollouts + # targetRevision: HEAD + - repoURL: 'https://argoproj.github.io/argo-helm' + targetRevision: {{ .Values.argo_rollouts.version }} + chart: argo-rollouts + helm: + values: | + dashboard: + enabled: {{ .Values.argo_rollouts.dashboard_enabled }} + {{- with .Values.argo_rollouts.metrics.enabled }} + controller: + metrics: + enabled: true + serviceMonitor: + enabled: true + {{- end }} + project: sys + {{- if .Values.argo_rollouts.autosync }} + syncPolicy: + automated: + prune: true + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-argo-workflows.yaml b/charts/sys/templates/app-argo-workflows.yaml new file mode 100644 index 00000000..b7515f71 --- /dev/null +++ b/charts/sys/templates/app-argo-workflows.yaml @@ -0,0 +1,43 @@ +{{- if .Values.argo_workflows.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argo-workflows + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + destination: + namespace: argocd + server: 'https://kubernetes.default.svc' + sources: + - repoURL: 'https://argoproj.github.io/argo-helm' + targetRevision: {{ .Values.argo_workflows.version }} + chart: argo-workflows + helm: + values: | + controller: + workflowNamespaces: + {{- .Values.argo_workflows.allowed_namespaces | toYaml | nindent 10 }} + {{- with .Values.argo_workflows.metrics.enabled }} + metricsConfig: + enabled: true + serviceMonitor: + enabled: true + {{- end }} + server: + extraArgs: + - --auth-mode=server + workflow: + rbac: + create: true + serviceAccount: + create: true + name: argo-workflow + project: argo-workflows + {{- if .Values.argo_workflows.autosync }} + syncPolicy: + automated: + prune: true + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-argocd-apps.yaml b/charts/sys/templates/app-argocd-apps.yaml new file mode 100644 index 00000000..8e217ce1 --- /dev/null +++ b/charts/sys/templates/app-argocd-apps.yaml @@ -0,0 +1,153 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argocd-apps + namespace: argocd +spec: + destination: + namespace: argocd + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://argoproj.github.io/argo-helm' + targetRevision: {{ .Values.argocd_apps.version }} + chart: argocd-apps + helm: + values: | + projects: + # System component project + - name: sys + namespace: argocd + description: sys components project + sourceRepos: + - '{{ .Values.cluster_config.manifests }}' + - 'https://argoproj.github.io/argo-helm' + - 'https://kubernetes-sigs.github.io/metrics-server/' + - 'https://kubernetes.github.io/ingress-nginx' + - 'https://cloudnative-pg.github.io/charts' + - 'https://charts.jetstack.io' + - 'https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/' + - 'https://github.com/kubernetes/dashboard' + - 'https://bitnami-labs.github.io/sealed-secrets' + - 'https://prometheus-community.github.io/helm-charts' + - 'https://github.com/prometheus-community/helm-charts.git' + - 'https://charts.gitlab.io/' + - 'https://charts.bitnami.com/bitnami' + - 'https://helm.linkerd.io/stable' + - 'https://github.com/jaegertracing/jaeger-operator' + - 'https://kyverno.github.io/kyverno/' + - 'https://vmware-tanzu.github.io/helm-charts' + - 'https://grafana.github.io/helm-charts' + - 'https://charts.enix.io' + - 'https://helm.mariadb.com/mariadb-operator' + - 'https://helm.cilium.io' + - 'https://chartmuseum.github.io/charts' + - 'https://open-telemetry.github.io/opentelemetry-helm-charts' + - 'https://strimzi.io/charts' + - 'https://helm.elastic.co' + - 'https://1password.github.io/connect-helm-charts' + - 'https://actions-runner-controller.github.io/actions-runner-controller' + - 'https://imio.github.io/helm-charts' + - 'https://docs.altinity.com/clickhouse-operator' + + destinations: + - namespace: argocd + server: https://kubernetes.default.svc + - namespace: kube-system + server: https://kubernetes.default.svc + - namespace: ingress-nginx + server: https://kubernetes.default.svc + - namespace: prometheus + server: https://kubernetes.default.svc + - namespace: cnpg + server: https://kubernetes.default.svc + - namespace: cert-manager + server: https://kubernetes.default.svc + - namespace: kubernetes-dashboard + server: https://kubernetes.default.svc + - namespace: rabbitmq + server: https://kubernetes.default.svc + - namespace: sealed-secrets + server: https://kubernetes.default.svc + - namespace: gitlab + server: https://kubernetes.default.svc + - namespace: thanos + server: https://kubernetes.default.svc + - namespace: linkerd + server: https://kubernetes.default.svc + - namespace: linkerd-multicluster + server: https://kubernetes.default.svc + - namespace: observability + server: https://kubernetes.default.svc + - namespace: kyverno + server: https://kubernetes.default.svc + - namespace: velero + server: https://kubernetes.default.svc + - namespace: loki + server: https://kubernetes.default.svc + - namespace: tempo + server: https://kubernetes.default.svc + - namespace: otel + server: https://kubernetes.default.svc + - namespace: x509-exporter + server: https://kubernetes.default.svc + - namespace: mariadb-operator + server: https://kubernetes.default.svc + - namespace: cilium-spire + server: https://kubernetes.default.svc + - namespace: cilium-secrets + server: https://kubernetes.default.svc + - namespace: actions-runner-controller + server: https://kubernetes.default.svc + - namespace: analytics + server: https://kubernetes.default.svc + - namespace: clickhouse + server: https://kubernetes.default.svc + clusterResourceWhitelist: + - group: '*' + kind: '*' + + {{- if .Values.argo_workflows.enabled }} + - name: argo-workflows + namespace: argocd + description: argo-workflows resources + sourceRepos: + - 'https://argoproj.github.io/argo-helm' + destinations: + - namespace: argocd + server: https://kubernetes.default.svc + {{- range .Values.argo_workflows.allowed_namespaces }} + - namespace: {{.}} + server: https://kubernetes.default.svc + {{- end }} + namespaceResourceWhitelist: + - group: "rbac.authorization.k8s.io" + kind: Role + - group: "rbac.authorization.k8s.io" + kind: RoleBinding + - group: "" + kind: ConfigMap + - group: "" + kind: Secret + - group: "" + kind: Service + - group: "" + kind: ServiceAccount + - group: apps + kind: Deployment + - group: "monitoring.coreos.com" + kind: ServiceMonitor + clusterResourceWhitelist: + - group: rbac.authorization.k8s.io + kind: ClusterRole + - group: rbac.authorization.k8s.io + kind: ClusterRoleBinding + - group: apiextensions.k8s.io + kind: CustomResourceDefinition + {{- end }} + project: sys + syncPolicy: + automated: {} + syncOptions: + - ServerSideApply=true + - CreateNamespace=true + - ApplyOutOfSyncOnly=true diff --git a/charts/sys/templates/app-argocd.yaml b/charts/sys/templates/app-argocd.yaml new file mode 100644 index 00000000..505e37f8 --- /dev/null +++ b/charts/sys/templates/app-argocd.yaml @@ -0,0 +1,325 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: argocd + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + destination: + namespace: argocd + server: 'https://kubernetes.default.svc' + sources: + - path: {{ .Values.cluster_config.policies }}/argocd + repoURL: {{ .Values.cluster_config.manifests }} + targetRevision: HEAD + - repoURL: 'https://argoproj.github.io/argo-helm' + targetRevision: {{ .Values.argocd.version }} + chart: argo-cd + helm: + values: | + global: + domain: argocd.{{ .Values.cluster_config.domain }} + ## ArgoCD configuration + ## Ref: https://github.com/argoproj/argo-cd + ## + configs: + {{- if .Values.argocd.anyNamespaces.enabled }} + params: + applicationsetcontroller.namespaces: "{{ .Values.argocd.anyNamespaces.glob }}" + # TODO(kai): anyapp will disable PR review apps. Look into anyapp settings to fix it + applicationsetcontroller.enable.scm.providers: "false" + application.namespaces: "{{ .Values.argocd.anyNamespaces.glob }}" + {{- end }} + cm: + application.resourceTrackingMethod: annotation+label + application.instanceLabelKey: app.kubernetes.io/instance + create: true + # NOTE(kai): callback URL for dex + url: "https://argocd.{{ .Values.cluster_config.domain }}" + resource.compareoptions: | + ignoreAggregatedRoles: true + resource.exclusions: | + - apiGroups: + - cilium.io + kinds: + - CiliumIdentity + clusters: + - "*" + - apiGroups: + - kyverno.io + kinds: + - AdmissionReport + - BackgroundScanReport + - ClusterAdmissionReport + - ClusterBackgroundScanReport + clusters: + - "*" + # dex saml config + dex.config: | + logger: + level: debug + format: json + connectors: + {{- with .Values.cluster_config.oidc }} + {{- range . }} + {{- if eq .provider "azuread" }} + - type: oidc + id: {{ .name }} + name: {{ .name }} + config: + issuer: https://login.microsoftonline.com/{{ .tenant }}/v2.0 + clientID: ${{ .name | replace "-" "_" }}_client_id + clientSecret: ${{ .name | replace "-" "_" }}_client_secret + insecureSkipEmailVerified: true + requestedIDTokenClaims: + groups: + essential: true + insecureEnableGroups: true + requestedScopes: + - openid + - profile + - email + - groups + {{- else if eq .provider "github" }} + - type: github + id: {{ .name }} + name: {{ .name }} + config: + clientID: ${{ .name | replace "-" "_" }}_client_id + clientSecret: ${{ .name | replace "-" "_" }}_client_secret + redirectURI: https://argocd.{{ $.Values.cluster_config.domain }}/api/dex/callback + orgs: + - name: {{ .allowed_organizations }} + loadAllGroups: true + teamNameField: slug + useLoginAsID: false + staticClients: + - id: ${{ .name | replace "-" "_" }}_client_id + name: Kubernetes + # These are kubectl oidc plugin internal URLs + redirectURIs: + - http://localhost:8000 + - http://localhost:18000 + # Random secret for the user to authenticat dex client + secret: 8d52926efe879ee505391b75f4b046cf + {{- end }} + {{- end }} + {{- end }} + admin.enabled: '{{ .Values.argocd.adminLogin }}' + rbac: + # NOTE(kai): dd2aa2d6 ... is ID for azure kubernetes_operator group + policy.csv: | + p, role:org-admin, applications, *, */*, allow + p, role:org-admin, projects, *, *, allow + p, role:org-admin, logs, get, *, allow + p, role:org-admin, clusters, get, *, allow + p, role:org-admin, clusters, update, *, allow + p, role:org-admin, repositories, get, *, allow + p, role:org-admin, repositories, create, *, allow + p, role:org-admin, repositories, update, *, allow + p, role:org-admin, repositories, delete, *, allow + g, "dd2aa2d6-269d-48fe-90cc-04fd5c08bd29", role:org-admin + {{- if .Values.cluster_config.external_access.enabled }} + p, role:external-admin, applications, *, sys/*, deny + p, role:external-admin, applications, *, oxb/*, deny + p, role:external-admin, applications, *, */*, allow + p, role:external-admin, projects, *, oxb, deny + p, role:external-admin, projects, *, sys, deny + p, role:external-admin, projects, get, *, allow + p, role:external-admin, logs, get, *, allow + p, role:external-admin, clusters, get, *, allow + p, role:external-admin, repositories, get, *, allow + p, role:external-admin, repositories, create, *, allow + p, role:external-admin, repositories, update, *, allow + p, role:external-admin, repositories, delete, *, allow + g, "{{ .Values.cluster_config.external_access.admin_group }}", role:external-admin + {{- end }} + {{- if .Values.cluster_config.external_access.enabled }} + {{- range .Values.cluster_config.external_access.groups }} + {{- "\n" -}} + {{- $name := .name }} + p, role:{{$name}}, projects, get, {{$name}}, allow + p, role:{{$name}}, applications, get, {{$name}}/*, allow + p, role:{{$name}}, logs, get, {{$name}}/*, allow + {{- range .group_id }} + g, {{ . }}, role:{{$name}} + {{- end }} + {{- end }} + {{- end }} + {{- with .Values.argocd.additional_rbac_settings }} + {{- range .}} + {{ . }} + {{- end }} + {{- end }} + repositories: + # Repositories for applications + argo-helm: + type: helm + url: https://argoproj.github.io/argo-helm + # UI changes based on env + styles: | + /* blue, orange, red depending on env */ + :root { + --test-color: #0f2cbd; + --dev-color: #33b025; + --staging-color: #ebac2f; + --prod-color: #ff000d; + } + .top-bar__breadcrumbs::after { + content: "cluster: {{.Values.cluster_config.cluster}}, env: {{.Values.cluster_config.env}} "; + color: var(--{{.Values.cluster_config.env}}-color); + font-weight: bolder; + font-size: larger; + position: fixed; + left: 50%; + } + + controller: + metrics: + enabled: true + serviceMonitor: + enabled: true + resources: + limits: + memory: {{ .Values.argocd.resources.controller.memory | default "1000Mi" }} + requests: + cpu: {{ .Values.argocd.resources.controller.cpu | default "250m" }} + memory: {{ .Values.argocd.resources.controller.memory | default "1000Mi" }} + + # Mount azure ca as file for SAML auth + dex: + metrics: + enabled: true + serviceMonitor: + enabled: true + {{- with .Values.cluster_config.oidc }} + env: + {{- range . }} + - name: {{ .name | replace "-" "_" }}_client_secret + valueFrom: + secretKeyRef: + name: {{ .secret_ref.name }} + key: client_secret + - name: {{ .name | replace "-" "_" }}_client_id + valueFrom: + secretKeyRef: + name: {{ .secret_ref.name }} + key: client_id + {{- end }} + {{- end }} + + redis: + metrics: + enabled: true + serviceMonitor: + enabled: true + + repoServer: + metrics: + enabled: true + serviceMonitor: + enabled: true + {{- if .Values.argocd.repoServer.cmp.enabled }} + extraContainers: + - command: + - /var/run/argocd/argocd-cmp-server + image: {{ .Values.argocd.repoServer.cmp.image }} + imagePullPolicy: Always + name: {{ .Values.argocd.repoServer.cmp.name }} + securityContext: + runAsNonRoot: true + runAsUser: 999 + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /var/run/argocd + name: var-files + - mountPath: /home/argocd/cmp-server/plugins + name: plugins + - mountPath: /tmp + name: cmp-tmp + - mountPath: /helm-working-dir + name: helm-working-dir + {{- with .Values.argocd.repoServer.cmp.initContainers }} + initContainers: + {{- toYaml . | nindent 10}} + {{- end }} + volumes: + - name: cmp-tmp + emptyDir: {} + {{- if .Values.argocd.repoServer.cmp.imagePullSecret }} + imagePullSecrets: + {{- range .Values.argocd.repoServer.cmp.imagePullSecret}} + - name: {{ .name }} + {{- end }} + {{- end }} + {{- end }} + + # Configuration for argocd server instance + server: + metrics: + enabled: true + serviceMonitor: + enabled: true + ingress: + enabled: {{ .Values.argocd.ingress.enabled }} + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-passthrough: "true" + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + hosts: + - "argocd.{{ .Values.cluster_config.domain }}" + tls: + - secretName: argocd-tls + hosts: + - "argocd.{{ .Values.cluster_config.domain }}" + applicationSet: + metrics: + enabled: true + serviceMonitor: + enabled: true + {{- if .Values.argocd.anyNamespaces.enabled }} + allowAnyNamespaces: true + {{- end }} + ingress: + enabled: {{ .Values.argocd.applicationset_webhook.enabled }} + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + # {{- with .Values.cluster_config.ingress_whitelist_ips}} + # NOTE(kai): include gitlab and github webhook ranges + # nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }},192.30.252.0/22,140.82.112.0/20,34.74.226.27/28,34.74.226.0/24 + # {{- end }} + hostname: "argocd-applicationset.{{ .Values.cluster_config.domain }}" + tls: + - secretName: argocd-applicationset-tls + hosts: + - "argocd-applicationset.{{ .Values.cluster_config.domain }}" + notifications: + metrics: + enabled: true + serviceMonitor: + enabled: true + secret: + create: false + cm: + create: false + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.argocd.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} diff --git a/charts/sys/templates/app-cert-manager.yaml b/charts/sys/templates/app-cert-manager.yaml new file mode 100644 index 00000000..c510a4f8 --- /dev/null +++ b/charts/sys/templates/app-cert-manager.yaml @@ -0,0 +1,36 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cert-manager + namespace: argocd +spec: + destination: + namespace: cert-manager + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/cert-manager + targetRevision: HEAD + - repoURL: 'https://charts.jetstack.io' + targetRevision: {{ .Values.cert_manager.version }} + chart: cert-manager + helm: + values: | + installCRDs: true + enableCertificateOwnerRef: true + startupapicheck: + podAnnotations: + linkerd.io/inject: disabled + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.cert_manager.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} diff --git a/charts/sys/templates/app-chartmuseum.yaml b/charts/sys/templates/app-chartmuseum.yaml new file mode 100644 index 00000000..bd727e45 --- /dev/null +++ b/charts/sys/templates/app-chartmuseum.yaml @@ -0,0 +1,60 @@ +{{- if .Values.chartmuseum.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: chartmuseum + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: argocd + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://chartmuseum.github.io/charts' + targetRevision: {{ .Values.chartmuseum.version }} + chart: chartmuseum + helm: + values: | + env: + open: + ENABLE_METRICS: true + DISABLE_API: false + ALLOW_OVERWRITE: false + CHART_URL: "" + AUTH_ANONYMOUS_GET: true + existingSecret: chartmuseum-basic-auth + existingSecretMappings: + BASIC_AUTH_USER: user + BASIC_AUTH_PASS: password + extraArgs: + - --web-template-path=/storage/web + serviceMonitor: + enabled: false + persistence: + enabled: true + accessMode: ReadWriteOnce + size: {{ .Values.chartmuseum.storage.size }} + path: /storage + storageClass: "nutanix-volume" + ingress: + enabled: {{ .Values.chartmuseum.ingress.enabled }} + annotations: + {{- with .Values.cluster_config.ingress_whitelist_ips}} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + ingressClassName: nginx + hosts: + - name: charts.{{ .Values.cluster_config.domain }} + path: / + tls: true + tlsSecret: chartmuseum-tls + project: sys + {{- if .Values.chartmuseum.autosync }} + syncPolicy: + automated: + prune: true + # selfHeal: false + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-cilium.yaml b/charts/sys/templates/app-cilium.yaml new file mode 100644 index 00000000..46a7e6cf --- /dev/null +++ b/charts/sys/templates/app-cilium.yaml @@ -0,0 +1,165 @@ +{{- if .Values.cilium.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: cilium + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + destination: + namespace: kube-system + server: 'https://kubernetes.default.svc' + sources: + {{- if .Values.cilium.spire.enabled }} + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/cilium-spire + targetRevision: HEAD + {{- end }} + - repoURL: 'https://helm.cilium.io' + targetRevision: {{ .Values.cilium.version }} + chart: cilium + helm: + values: | + authentication: + mutual: + spire: + enabled: {{ .Values.cilium.spire.enabled }} + cgroup: + autoMount: + enabled: false + hostRoot: /sys/fs/cgroup + dashboards: + enabled: true + namespace: prometheus + enableXTSocketFallback: false + encryption: + enabled: {{ .Values.cilium.encryption.enabled }} + type: {{ .Values.cilium.encryption.type}} + envoy: + enabled: {{ .Values.cilium.envoy.enabled }} + prometheus: + serviceMonitor: + enabled: {{ .Values.cilium.envoy.enabled }} + extraConfig: + enable-envoy-config: "true" + hubble: + enabled: true + tls: + auto: + method: cronJob + metrics: + dashboards: + enabled: true + namespace: prometheus + enabled: + - dns:query;ignoreAAAA + - drop + - tcp + - flow + - icmp + - policy:sourceContext=app|workload-name|pod|reserved-identity;destinationContext=app|workload-name|pod|dns|reserved-identity;labelsContext=source_namespace,destination_namespace + - httpV2:exemplars=false;labelsContext=source_ip,source_namespace,source_workload,destination_ip,destination_namespace,destination_workload,traffic_direction + port: 12304 + serviceMonitor: + enabled: true + redact: + enabled: true + relay: + enabled: true + prometheus: + enabled: true + serviceMonitor: + enabled: true + ui: + enabled: {{ .Values.cilium.hubble.ui }} + ipam: + mode: kubernetes + kubeProxyReplacement: {{ .Values.cilium.kubeProxyReplacement }} + l2announcements: + enabled: {{ .Values.cilium.l2announcement.enabled }} + k8sServiceHost: {{ .Values.cilium.k8sServiceHost }} + k8sServicePort: {{ .Values.cilium.k8sServicePort }} + nodePort: + enabled: {{ .Values.cilium.nodePort.enabled }} + gatewayAPI: + enabled: {{ .Values.cilium.gatewayAPI.enabled }} + ingressController: + enabled: {{ .Values.cilium.ingressController.enabled }} + default: {{ .Values.cilium.ingressController.defaultClass }} + loadbalancerMode: {{ .Values.cilium.ingressController.loadbalancerMode }} + operator: + dashboards: + enabled: true + namespace: prometheus + prometheus: + enabled: true + port: 12301 + serviceMointor: + enabled: true + port: 12302 + rollOutPods: true + policyAuditMode: {{ .Values.cilium.policyAuditMode }} + prometheus: + enabled: true + port: 12300 + serviceMonitor: + enabled: true + rollOutCiliumPods: true + securityContext: + capabilities: + ciliumAgent: + - CHOWN + - KILL + - NET_ADMIN + - NET_RAW + - IPC_LOCK + - SYS_ADMIN + - SYS_RESOURCE + - DAC_OVERRIDE + - FOWNER + - SETGID + - SETUID + cleanCiliumState: + - NET_ADMIN + - SYS_ADMIN + - SYS_RESOURCE + {{- with .Values.cilium.upgradeCompatability}} + upgradeCompatability: {{ . }} + {{- end }} + project: sys + syncPolicy: + syncOptions: + - ServerSideApply=true + {{- if .Values.cilium.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} + ignoreDifferences: + - group: apps + jqPathExpressions: + - .spec.volumeClaimTemplates + kind: StatefulSet + name: spire-server + - group: monitoring.coreos.com + jqPathExpressions: + - .spec.endpoints[]?.relabelings[]?.action + kind: ServiceMonitor + - group: '' + jsonPointers: + - /data/ca.crt + kind: ConfigMap + name: hubble-ca-cert + - group: '' + jsonPointers: + - /data/ca.crt + - /data/ca.key + kind: Secret + name: cilium-ca + - group: '' + jqPathExpressions: + - .spec.ports[]?.nodePort + kind: Service + name: cilium-ingress +{{- end }} diff --git a/charts/sys/templates/app-clickhouse.yaml b/charts/sys/templates/app-clickhouse.yaml new file mode 100644 index 00000000..af8799cc --- /dev/null +++ b/charts/sys/templates/app-clickhouse.yaml @@ -0,0 +1,45 @@ +{{ if .Values.clickhouse_operator.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: clickhouse-operator + namespace: argocd +spec: + destination: + namespace: clickhouse + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/clickhouse + targetRevision: HEAD + - repoURL: 'https://docs.altinity.com/clickhouse-operator' + targetRevision: {{ .Values.clickhouse_operator.version }} + chart: altinity-clickhouse-operator + helm: + values: | + configs: + files: + config.yaml: + watch: + namespaces: ["analytics", "analytics-production"] + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + {{- if .Values.clickhouse_operator.version }} + automated: + # selfHeal: false + prune: true + {{- end }} + ignoreDifferences: + - group: apps + kind: Deployment + jqPathExpressions: + - .spec.template.spec.containers[].env[].valueFrom.resourceFieldRef.divisor + - .spec.template.spec.initContainers[].env[].valueFrom.resourceFieldRef.divisor +{{ end }} diff --git a/charts/sys/templates/app-downscaler.yaml b/charts/sys/templates/app-downscaler.yaml new file mode 100644 index 00000000..54910d53 --- /dev/null +++ b/charts/sys/templates/app-downscaler.yaml @@ -0,0 +1,47 @@ +{{ if .Values.downscaler.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: downscaler + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kube-downscaler + server: 'https://kubernetes.default.svc' + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.downscaler.autosync }} + automated: + prune: true + # selfHeal: true + {{- end }} + sources: + - repoURL: '{{ .Values.cluster_config.manifests }}' + path: {{ .Values.cluster_config.policies }}/downscaler + targetRevision: HEAD + - repoURL: 'https://caas-team.github.io/helm-charts/' + targetRevision: {{ .Values.downscaler.version }} + chart: py-kube-downscaler + helm: + values: | + arguments: + - --interval=60 + - --include-resources=deployments,statefulsets,scaledobjects,cronjobs + # Namespaces being excluded from the 'downscale for non-work hours' + # DEFAULT_UPTIME: "Mon-Fri 07:30-20:30 CET" + {{- with .Values.downscaler.excludedNamespaces }} + excludedNamespaces: {{ join "," . }} + {{- end }} + extraConfig: {{- toYaml .Values.downscaler.extraConfig | nindent 8 }} +{{ end }} + diff --git a/charts/sys/templates/app-gitlab-runner.yaml b/charts/sys/templates/app-gitlab-runner.yaml new file mode 100644 index 00000000..b8e1ad9a --- /dev/null +++ b/charts/sys/templates/app-gitlab-runner.yaml @@ -0,0 +1,78 @@ +{{ if .Values.gitlab_runner.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: gitlab-runner + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: gitlab + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://charts.gitlab.io/' + targetRevision: {{ .Values.gitlab_runner.version }} + chart: gitlab-runner + helm: + releaseName: runner-gitlab-runner + values: | + gitlabUrl: https://gitlab.com/ + # certsSecretName: cluster-ca + # sentryDsn: https://cb9cbeb704c4454fadf0d231602b7abc@o990465.ingest.sentry.io/5996879 + + checkInterval: 15 + + rbac: + create: true + clusterWideAccess: true + + service: + enabled: true + + metrics: + enabled: true + serviceMonitor: + enabled: true + + runners: + tags: kubernetes, {{ .Values.gitlab_runner.tag }}, {{ .Values.cluster_config.cluster }}, {{ .Values.cluster_config.env}} + executor: kubernetes + cache: + secretName: s3access + secret: runner-token + + # tpl: https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function + # runner configuration: https://docs.gitlab.com/runner/configuration/advanced-configurati> + config: | + [[runners]] + [runners.kubernetes] + pull_policy = "always" + namespace = "gitlab" + image = "ubuntu:24.04" + [runners.cache] + Path = "" + Shared = true + Type = "s3" + [runners.cache.s3] + BucketLocation = "us-east-1" + AuthenticationType = "access-key" + AccessKey = {{ .Values.gitlab_runner.s3.access_key }} + SecretKey = {{ .Values.gitlab_runner.s3.secret_key }} + ServerAddress = {{ .Values.gitlab_runner.s3.server }} + BucketName = "gitlab-runner" + Insecure = false + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.gitlab_runner.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-ingress-nginx.yaml b/charts/sys/templates/app-ingress-nginx.yaml new file mode 100644 index 00000000..0e37dfa2 --- /dev/null +++ b/charts/sys/templates/app-ingress-nginx.yaml @@ -0,0 +1,132 @@ +{{- if .Values.nginx.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ingress-nginx + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true +spec: + destination: + namespace: ingress-nginx + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/ingress-nginx + targetRevision: HEAD + - repoURL: 'https://kubernetes.github.io/ingress-nginx' + targetRevision: {{ .Values.nginx.version }} + chart: ingress-nginx + helm: + values: | + ## nginx configuration + ## Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/index.md + ## + ## Overrides for generated resource names + # See templates/_helpers.tpl + # nameOverride: + fullnameOverride: main-ingress-nginx + controller: + resources: + limits: + memory: {{ .Values.nginx.resources.controller.memory }} + requests: + cpu: {{ .Values.nginx.resources.controller.cpu }} + memory: {{ .Values.nginx.resources.controller.memory }} + + ingressClassResource: + default: true + + tolerations: + - key: unschedulable + operator: Exists + effect: NoSchedule + - key: node-role.kubernetes.io/control-plane + operator: Exists + effect: NoSchedule + + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: {{ .Values.cluster_config.ingress_nodes }} + + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app.kubernetes.io/instance + operator: In + values: + - ingress-nginx + - key: app.kubernetes.io/component + operator: In + values: + - controller + topologyKey: "kubernetes.io/hostname" + + podAnnotations: + config.linkerd.io/skip-inbound-ports: 80,443 + + replicaCount: {{ .Values.cluster_config.ingress_replica_count }} + + minAvailable: {{ .Values.nginx.pdb.minAvailable }} + + service: + externalTrafficPolicy: Local + # type: ClusterIP + type: NodePort + # nodePorts: + # http: 32080 + # https: 32443 + # tcp: + # 8080: 32808 + nodePorts: + http: 30080 + https: 30443 + tcp: {} + udp: {} + + metrics: + enabled: true + + service: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "10254" + + servicePort: 9913 + type: ClusterIP + + serviceMonitor: + enabled: true + + admissionWebhooks: + enabled: false + + ## Default 404 backend + ## + defaultBackend: + enabled: true + + tolerations: + - key: unschedulable + operator: Exists + effect: NoSchedule + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.nginx.autosync}} + automated: + prune: true + # selfHeal: false + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-jaeger-operator.yaml b/charts/sys/templates/app-jaeger-operator.yaml new file mode 100644 index 00000000..fd309841 --- /dev/null +++ b/charts/sys/templates/app-jaeger-operator.yaml @@ -0,0 +1,36 @@ +{{ if .Values.jaeger_operator.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: jaeger-operator + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: observability + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/jaeger-operator + targetRevision: HEAD + - repoURL: "https://github.com/jaegertracing/jaeger-operator" + targetRevision: v{{ .Values.jaeger_operator.version }} + path: bundle/manifests + directory: + # Exclude jaeger-operator clusterserviceversion, as we don't have operator lifecycle manager installed + exclude: jaeger-operator.clusterserviceversion.yaml + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.jaeger_operator.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-kubernetes-dashboard.yaml b/charts/sys/templates/app-kubernetes-dashboard.yaml new file mode 100644 index 00000000..1b2efa19 --- /dev/null +++ b/charts/sys/templates/app-kubernetes-dashboard.yaml @@ -0,0 +1,30 @@ +{{ if .Values.kubernetes_dashboard.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kubernetes-dashboard + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kubernetes-dashboard + server: 'https://kubernetes.default.svc' + source: + path: aio/deploy/recommended + repoURL: https://github.com/kubernetes/dashboard + targetRevision: {{ .Values.kubernetes_dashboard.version }} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.kubernetes_dashboard.autosync }} + automated: + prune: true + # selfHeal: false + {{ end }} +{{ end }} diff --git a/charts/sys/templates/app-kyverno.yaml b/charts/sys/templates/app-kyverno.yaml new file mode 100644 index 00000000..ca1ba2fe --- /dev/null +++ b/charts/sys/templates/app-kyverno.yaml @@ -0,0 +1,84 @@ +{{ if .Values.kyverno.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: kyverno + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kyverno + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/kyverno + targetRevision: HEAD + - repoURL: 'https://kyverno.github.io/kyverno/' + targetRevision: {{ .Values.kyverno.version }} + chart: kyverno + helm: + values: | + replicaCount: 3 + {{ if .Values.kyverno.metrics }} + admissionController: + serviceMonitor: + enabled: true + metricsService: + create: true + backgroundController: + serviceMonitor: + enabled: true + metricsService: + create: true + cleanupController: + serviceMonitor: + enabled: true + metricsService: + create: true + reportsController: + serviceMonitor: + enabled: true + metricsService: + create: true + {{ end }} + cleanupController: + resources: + limits: + memory: {{ .Values.kyverno.resources.cleanupController.memory }} + requests: + memory: {{ .Values.kyverno.resources.cleanupController.memory }} + reportsController: + resources: + limits: + memory: {{ .Values.kyverno.resources.reportsController.memory }} + requests: + memory: {{ .Values.kyverno.resources.reportsController.memory }} + backgroundController: + resources: + limits: + memory: {{ .Values.kyverno.resources.backgroundController.memory }} + requests: + memory: {{ .Values.kyverno.resources.backgroundController.memory }} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + {{- if .Values.kyverno.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} + ignoreDifferences: + - group: batch + kind: CronJob + jqPathExpressions: + - '.spec.jobTemplate.spec.template.spec.containers[]?.resources' +{{ end }} diff --git a/charts/sys/templates/app-linkerd-crds.yaml b/charts/sys/templates/app-linkerd-crds.yaml new file mode 100644 index 00000000..5bceb653 --- /dev/null +++ b/charts/sys/templates/app-linkerd-crds.yaml @@ -0,0 +1,35 @@ +{{ if .Values.linkerd.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: linkerd-crds + namespace: argocd + #finalizers: + #- resources-finalizer.argocd.argoproj.io +spec: + ignoreDifferences: + - group: apiextensions.k8s.io + kind: CustomResourceDefinition + jsonPointers: + - /spec/names/shortNames + destination: + namespace: linkerd + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://helm.linkerd.io/stable' + targetRevision: {{ .Values.linkerd.crds.version }} + chart: linkerd-crds + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.linkerd.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-linkerd-multicluster.yaml b/charts/sys/templates/app-linkerd-multicluster.yaml new file mode 100644 index 00000000..c7ad1afc --- /dev/null +++ b/charts/sys/templates/app-linkerd-multicluster.yaml @@ -0,0 +1,35 @@ +{{ if .Values.linkerd.multicluster.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: linkerd-multicluster + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io + annotations: + # Should sync after linkerd (which is wave 0) + argocd.argoproj.io/sync-wave: "1" +spec: + destination: + namespace: linkerd-multicluster + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://helm.linkerd.io/stable' + targetRevision: {{ .Values.linkerd.multicluster.version }} + chart: linkerd-multicluster + helm: + values: | + gateway: + serviceType: "NodePort" + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + automated: + prune: true + # selfHeal: false +{{ end }} diff --git a/charts/sys/templates/app-linkerd.yaml b/charts/sys/templates/app-linkerd.yaml new file mode 100644 index 00000000..39117348 --- /dev/null +++ b/charts/sys/templates/app-linkerd.yaml @@ -0,0 +1,100 @@ +{{ if .Values.linkerd.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: linkerd + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "5" + #finalizers: + #- resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: linkerd + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/linkerd + targetRevision: HEAD + - repoURL: 'https://helm.linkerd.io/stable' + targetRevision: {{ .Values.linkerd.version }} + chart: linkerd-control-plane + helm: + values: | + identityTrustAnchorsPEM: {{- .Values.linkerd.trustAnchorPEM | toYaml | indent 7 }} + identity: + issuer: + scheme: {{ .Values.linkerd.secretScheme }} + {{- if .Values.linkerd.identityIssuerPEM }} + tls: + crtPEM: {{- .Values.linkerd.identityIssuerPEM | toYaml | indent 14 }} + {{- end }} + policyValidator: + externalSecret: true + caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }} + proxyInjector: + externalSecret: true + caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }} + profileValidator: + externalSecret: true + caBundle: {{- .Values.linkerd.webhookPEM | toYaml | indent 9 }} + + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.linkerd.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} + ignoreDifferences: + - group: batch + kind: CronJob + jsonPointers: + - /spec/schedule + - kind: Secret + name: linkerd-proxy-injector-k8s-tls + jsonPointers: + - /data/tls.crt + - /data/tls.key + - kind: Secret + name: linkerd-sp-validator-k8s-tls + jsonPointers: + - /data/tls.crt + - /data/tls.key + - kind: Secret + name: linkerd-tap-k8s-tls + jsonPointers: + - /data/tls.crt + - /data/tls.key + - kind: Secret + name: linkerd-policy-validator-k8s-tls + jsonPointers: + - /data/tls.crt + - /data/tls.key + - group: admissionregistration.k8s.io + kind: MutatingWebhookConfiguration + name: linkerd-proxy-injector-webhook-config + jqPathExpressions: + - '.webhooks[0].clientConfig.caBundle' + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + name: linkerd-sp-validator-webhook-config + jqPathExpressions: + - '.webhooks[0].clientConfig.caBundle' + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + name: linkerd-policy-validator-webhook-config + jqPathExpressions: + - '.webhooks[0].clientConfig.caBundle' + - group: apiregistration.k8s.io/v1 + kind: APIService + name: v1alpha1.tap.linkerd.io + jsonPointers: + - /spec/caBundle +{{ end }} diff --git a/charts/sys/templates/app-loki.yaml b/charts/sys/templates/app-loki.yaml new file mode 100644 index 00000000..7a4f8406 --- /dev/null +++ b/charts/sys/templates/app-loki.yaml @@ -0,0 +1,145 @@ +{{ if .Values.loki.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: loki + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: loki + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/loki + targetRevision: HEAD + - repoURL: 'https://grafana.github.io/helm-charts' + targetRevision: {{ .Values.loki.version }} + chart: loki + helm: + values: | + loki: + auth_enabled: false + storage: + bucketNames: + chunks: {{ .Values.loki.buckets.chunks }} + ruler: {{ .Values.loki.buckets.ruler }} + admin: {{ .Values.loki.buckets.admin }} + s3: + endpoint: {{ .Values.loki.s3.endpoint | default "https://s3.production.itpartner.no" }} + region: {{ .Values.loki.s3.region | default "us-east-1" }} + secretAccessKey: ${S3SECRET} + accessKeyId: ${S3KEY} + s3ForcePathStyle: true + {{- if .Values.loki.s3.insecure_skip_verify }} + http_config: + insecure_skip_verify: true + {{- end }} + schemaConfig: + configs: + - from: "2022-09-28" + index: + period: 24h + prefix: loki_index_ + object_store: s3 + schema: v13 + store: tsdb + {{- if .Values.loki.compactor }} + compactor: + compaction_interval: 10m + working_directory: /tmp/loki/compactor + retention_enabled: true + retention_delete_delay: 2h + retention_delete_worker_count: 150 + delete_request_store: s3 + {{- end }} + write: + extraArgs: + - -config.expand-env=true + extraEnv: + - name: S3KEY + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_key" }} + - name: S3SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_secret" }} + tolerations: + - effect: "NoSchedule" + operator: "Equal" + key: "unschedulable" + value: "true" + read: + extraArgs: + - -config.expand-env=true + extraEnv: + - name: S3KEY + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_key" }} + - name: S3SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_secret" }} + tolerations: + - effect: "NoSchedule" + operator: "Equal" + key: "unschedulable" + value: "true" + {{- if .Values.loki.compactor }} + compactor: + extraArgs: + - -config.expand-env=true + extraEnv: + - name: S3KEY + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_key" }} + - name: S3SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_secret" }} + {{- end }} + backend: + extraArgs: + - -config.expand-env=true + extraEnv: + - name: S3KEY + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_key" }} + - name: S3SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.loki.secret.name | default "nutanix-s3"}} + key: {{ .Values.loki.secret.access_key | default "access_secret" }} + project: sys + ignoreDifferences: + - group: apps + kind: StatefulSet + jsonPointers: + - /spec/persistentVolumeClaimRetentionPolicy + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.loki.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-mariadb-operator.yaml b/charts/sys/templates/app-mariadb-operator.yaml new file mode 100644 index 00000000..a91f4a83 --- /dev/null +++ b/charts/sys/templates/app-mariadb-operator.yaml @@ -0,0 +1,46 @@ +{{- if .Values.mariadb_operator.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mariadb-operator + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" +spec: + destination: + namespace: mariadb-operator + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/mariadb-operator + targetRevision: HEAD + - repoURL: 'https://helm.mariadb.com/mariadb-operator' + targetRevision: {{ .Values.mariadb_operator.version }} + chart: mariadb-operator + helm: + values: | + ha: + enabled: false + metrics: + enabled: true + serviceMonitor: + additionalLabels: + release: prometheus + enabled: true + webhook: + certificate: + certManager: false + serviceMonitor: + additionalLabels: + release: prometehus + project: sys + syncPolicy: + syncOptions: + - CreateNamespace=true + - ServerSideApply=true + {{- if .Values.mariadb_operator.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-metricserver.yaml b/charts/sys/templates/app-metricserver.yaml new file mode 100644 index 00000000..e3068402 --- /dev/null +++ b/charts/sys/templates/app-metricserver.yaml @@ -0,0 +1,39 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: metrics-server + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: kube-system + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://kubernetes-sigs.github.io/metrics-server/' + targetRevision: {{ .Values.metrics_server.version }} + chart: metrics-server + helm: + values: | + containerPort: 10250 + resources: + requests: + cpu: 100m + memory: 200Mi + {{- if .Values.metrics_server.ignoreTLS }} + args: + - "--kubelet-insecure-tls" + {{- end }} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.metrics_server.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} diff --git a/charts/sys/templates/app-nfs-provisioner.yaml b/charts/sys/templates/app-nfs-provisioner.yaml new file mode 100644 index 00000000..7866b236 --- /dev/null +++ b/charts/sys/templates/app-nfs-provisioner.yaml @@ -0,0 +1,46 @@ +{{- if .Values.nfs_provisioner.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: nfs-provisioner + namespace: argocd +spec: + destination: + namespace: kube-system + server: 'https://kubernetes.default.svc' + source: + #- repoURL: {{ .Values.cluster_config.manifests }} + # path: {{ .Values.cluster_config.policies }}/nfs-provisioner + # targetRevision: HEAD + repoURL: 'https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner/' + targetRevision: {{ .Values.nfs_provisioner.version }} + chart: nfs-subdir-external-provisioner + helm: + values: | + nfs: + server: {{ .Values.cluster_config.fileserver }} + path: /{{ default (.Values.cluster_config.cluster) .Values.nfs_provisioner.path }} + mountOptions: + - nfsvers=4.2 + {{- range .Values.nfs_provisioner.extraMountOpts }} + - {{ . }} + {{- end }} + storageClass: + defaultClass: {{ .Values.nfs_provisioner.defaultClass}} + name: managed-nfs-storage + archiveOnDelete: {{ .Values.nfs_provisioner.archiveOnDelete }} + tolerations: + - key: unschedulable + operator: Exists + effect: NoSchedule + project: sys + syncPolicy: + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.nfs_provisioner.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-oncall.yaml b/charts/sys/templates/app-oncall.yaml new file mode 100644 index 00000000..8b7f3287 --- /dev/null +++ b/charts/sys/templates/app-oncall.yaml @@ -0,0 +1,104 @@ +{{ if .Values.oncall.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: oncall + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: prometheus + server: 'https://kubernetes.default.svc' + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{ if .Values.oncall.autosync }} + automated: + prune: true + # selfHeal: false + {{ end }} + sources: +# - repoURL: {{ .Values.cluster_config.manifests }} +# path: {{ .Values.cluster_config.policies }}/oncall +# targetRevision: HEAD + - repoURL: 'https://grafana.github.io/helm-charts' + targetRevision: '{{ .Values.oncall.version }}' + chart: oncall + helm: + values: | + base_url: oncall.{{ .Values.cluster_config.domain }} + base_url_protocol: https + image: + repository: grafana/oncall + pullPolicy: IfNotPresent + ingress-nginx: + enabled: false + cert-manager: + enabled: false + installCRDs: false + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + path: / + pathType: Prefix + hosts: + - oncall.{{ .Values.cluster_config.domain }} + tls: + - secretName: oncall-tls + hosts: + - oncall.{{ .Values.cluster_config.domain }} + + {{- if .Values.oncall.slack }} + oncall: + slack: + enabled: true + clientId: {{ .Values.oncall.slack.clientId }} + clientSecret: {{ .Values.oncall.slack.clientSecret }} + signingSecret: {{ .Values.oncall.slack.signingSecret }} + redirectHost: https://oncall.{{ .Values.cluster_config.domain }} + {{- end }} + + {{- if .Values.oncall.smtp }} + oncall: + smtp: + enabled: true + host: {{ .Values.oncall.smtp.host }} + port: {{ .Values.oncall.smtp.port }} + username: {{ .Values.oncall.smtp.username }} + password: {{ .Values.oncall.smtp.password }} + tls: {{ .Values.oncall.smtp.tls }} + fromEmail: {{ .Values.oncall.smtp.fromEmail }} + {{- end }} + database: + type: postgresql + postgresql: + enabled: true + auth: + database: oncall + mariadb: + enabled: false + redis: + enabled: true + broker: + type: rabbitmq + rabbitmq: + enabled: true + grafana: + enabled: false + externalGrafana: + url: {{ .Values.oncall.externalGrafana.url }} +{{- end }} diff --git a/charts/sys/templates/app-otel-collector.yaml b/charts/sys/templates/app-otel-collector.yaml new file mode 100644 index 00000000..c80353d0 --- /dev/null +++ b/charts/sys/templates/app-otel-collector.yaml @@ -0,0 +1,117 @@ +{{ if .Values.otel.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: opentelemetry-collector + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: otel + server: 'https://kubernetes.default.svc' + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.otel.autosync }} + automated: + prune: true + # selfHeal: true + {{- end }} + sources: + - repoURL: '{{ .Values.cluster_config.manifests }}' + path: {{ .Values.cluster_config.policies }}/otel + targetRevision: HEAD + - repoURL: 'https://open-telemetry.github.io/opentelemetry-helm-charts' + targetRevision: {{ .Values.otel.version }} + chart: opentelemetry-collector + helm: + values: | + mode: deployment + image: + repository: otel/opentelemetry-collector-k8s + config: + receivers: + prometheus/collector: + config: + scrape_configs: + - job_name: 'opentelemetry-collector' + static_configs: + - targets: + - ${env:MY_POD_IP}:8888 + zipkin: + endpoint: ${env:MY_POD_IP}:9411 + exporters: + otlp: + endpoint: "tempo.tempo.svc:4317" + tls: + insecure: true + ## + otlphttp/metrics: + endpoint: http://prom-prometheus.prometheus:9090/api/v1/otlp + tls: + insecure: true + otlphttp/logs: + endpoint: http://loki-write-headless.loki:3100/otlp + tls: + insecure: true + ## Detailed? make toggleable with values + debug/metrics: + verbosity: detailed + debug/traces: + verbosity: detailed + debug/logs: + verbosity: detailed + service: + telemetry: + logs: + level: "info" + pipelines: + traces: + receivers: [otlp,zipkin] + processors: [batch] + exporters: [otlp] + # exporters: [otlphttp/traces,debug/traces] + metrics: + receivers: [otlp,prometheus/collector] + processors: [batch] + exporters: [otlphttp/metrics] + # exporters: [otlphttp/metrics,debug/metrics] + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlphttp/logs] + # exporters: [otlphttp/logs,debug/logs] + ports: + metrics: + enabled: true + # presets: + # logsCollection: + # enabled: true + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + hosts: + - host: opentelemetry-collector.{{ .Values.cluster_config.domain }} + paths: + - path: / + pathType: Prefix + port: 4318 + tls: + - secretName: collector-tls + hosts: + - opentelemetry-collector.{{ .Values.cluster_config.domain }} +{{ end }} diff --git a/charts/sys/templates/app-postgres-operator.yaml b/charts/sys/templates/app-postgres-operator.yaml new file mode 100644 index 00000000..9abdd60d --- /dev/null +++ b/charts/sys/templates/app-postgres-operator.yaml @@ -0,0 +1,39 @@ +{{ if .Values.postgres_operator.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: postgres-operator + namespace: argocd +spec: + destination: + namespace: cnpg + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/cnpg + targetRevision: HEAD + - repoURL: 'https://cloudnative-pg.github.io/charts' + targetRevision: {{ .Values.postgres_operator.version }} + chart: cloudnative-pg + helm: + values: | + additionalArgs: [] + config: + data: + INHERITED_ANNOTATIONS: "linkerd.io/*" + INHERITED_LABELS: "velero.io/*" + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + {{- if .Values.postgres_operator.version }} + automated: + # selfHeal: false + prune: true + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-prometheus-thanos.yaml b/charts/sys/templates/app-prometheus-thanos.yaml new file mode 100644 index 00000000..b1b4f3f6 --- /dev/null +++ b/charts/sys/templates/app-prometheus-thanos.yaml @@ -0,0 +1,342 @@ +{{ if .Values.thanos.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: thanos + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: thanos + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://charts.bitnami.com/bitnami' + targetRevision: {{ .Values.thanos.version }} + chart: thanos + helm: + values: | + ## Handled by sealed secret now, and uses minio root user + #objstoreConfig: |- + # type: s3 + # config: + # bucket: thanos + # endpoint: thanos-minio.thanos.svc.cluster.local:9000 + # access_key: "thanos" + # secret_key: "en to tre fire" + # insecure: true + + ## @param indexCacheConfig The [index cache configuration](https://thanos.io/components/store.md/) + ## Specify content for index-cache.yml + indexCacheConfig: "" + ## @param bucketCacheConfig The [bucket cache configuration](https://thanos.io/components/store.md/) + ## Specify content for bucket-cache.yml + ## + bucketCacheConfig: "" + ## @param existingObjstoreSecret Secret with Objstore Configuration + ## Note: This will override objstoreConfig + ## + existingObjstoreSecret: "thanos-objstore-secret" + existingObjstoreSecretItems: [] + existingServiceAccount: "" + + query: + enabled: true + stores: + - {{ .Values.prometheus.fullname | default "prometheus-kube-prometheus" }}-prometheus.prometheus.svc:10901 + - thanos-envoy:10000 + - thanos-envoy:10002 + - thanos-envoy:11000 + ingress: + enabled: true + certManager: false + hostname: thanos.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos.{{ .Values.cluster_config.domain }} + secretName: thanos-tls + + ## @section Thanos Query Frontend parameters + + queryFrontend: + enabled: true + ingress: + enabled: true + certManager: false + hostname: thanos-query.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-query.{{ .Values.cluster_config.domain }} + secretName: thanos-query-tls + + ## @section Thanos Bucket Web parameters + + bucketweb: + enabled: true + ingress: + enabled: true + certManager: false + hostname: thanos-bucketweb.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos-bucketweb.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-bucketweb.{{ .Values.cluster_config.domain }} + secretName: thanos-bucketweb-tls + + ## @section Thanos Compactor parameters + + compactor: + enabled: true + ingress: + enabled: true + certManager: false + hostname: thanos-compactor.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-compactor.{{ .Values.cluster_config.domain }} + secretName: thanos-compactor-tls + persistence: + enabled: true + storageClass: "local-storage" + accessModes: + - ReadWriteOnce + size: 8Gi + + ## @section Thanos Store Gateway parameters + + storegateway: + enabled: true + + ingress: + enabled: true + certManager: false + hostname: thanos-storage.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-storage.{{ .Values.cluster_config.domain }} + secretName: thanos-storage-tls + persistence: + enabled: true + storageClass: "local-storage" + accessModes: + - ReadWriteOnce + size: 8Gi + + ## @section Thanos Ruler parameters + + ruler: + enabled: true + alertmanagers: + - https://alertmanager.k1.itpartner.no + - https://alertmanager.k2.itpartner.no + - https://alertmanager.k0.itpartner.no + config: |- + groups: + - name: "metamonitoring" + rules: + - alert: "PrometheusDown" + expr: absent(up{container="prometheus",job="prometheus-kube-prometheus-prometheus",namespace="prometheus"}) + global: + resolve_timeout: 5m + route: + receiver: pagerduty + group_by: + - alertname + routes: + - receiver: snitch + match: + alertname: Watchdog + group_wait: 0s + group_interval: 1m + repeat_interval: 50s + group_wait: 60s + group_interval: 15m + repeat_interval: 24h + receivers: + - name: pagerduty + pagerduty_configs: + - routing_key: e67f3a24f11c450ad060128f20ffa5d1 + url: https://events.pagerduty.com/v2/enqueue + + ingress: + enabled: true + certManager: false + hostname: thanos-ruler.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-ruler.{{ .Values.cluster_config.domain }} + secretName: thanos-ruler-tls + persistence: + enabled: true + storageClass: "local-storage" + accessModes: + - ReadWriteOnce + size: 8Gi + + ## @section Thanos Receive parameters + + receive: + enabled: false + mode: standalone + replicationFactor: 1 + replicaLabel: replica + tsdbRetention: 15d + config: + - endpoints: + - "127.0.0.1:10901" + ingress: + enabled: true + certManager: false + hostname: thanos-receive.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-receive.{{ .Values.cluster_config.domain }} + secretName: thanos-receive-tls + persistence: + enabled: true + storageClass: "local-storage" + accessModes: + - ReadWriteOnce + size: 8Gi + + ## @section Metrics parameters + + metrics: + enabled: true + serviceMonitor: + enabled: true + + ## @section MinIO® chart parameters + + minio: + enabled: true + accessKey: + password: "thanos" + secretKey: + password: "en to tre fire" + defaultBuckets: thanos + ingress: + enabled: true + certManager: false + hostname: thanos-minio.{{ .Values.cluster_config.domain }} + ingressClassName: "nginx" + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/backend-protocol: HTTP + nginx.ingress.kubernetes.io/proxy-body-size: 1024m + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/whitelist-source-range: 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,172.19.255.0/24 + ## extraHosts: + ## - name: thanos.local + ## path: / + ## pathType: ImplementationSpecific + ## + extraHosts: [] + extraTls: + - hosts: + - thanos-minio.{{ .Values.cluster_config.domain }} + secretName: thanos-minio-tls + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.prometheus.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-prometheus.yaml b/charts/sys/templates/app-prometheus.yaml new file mode 100644 index 00000000..3b4ad8d7 --- /dev/null +++ b/charts/sys/templates/app-prometheus.yaml @@ -0,0 +1,625 @@ +{{- if .Values.prometheus.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: prometheus + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: prometheus + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/prometheus + targetRevision: HEAD + - repoURL: 'https://prometheus-community.github.io/helm-charts' + targetRevision: '{{ .Values.prometheus.version }}' + chart: kube-prometheus-stack + helm: + skipCrds: true + values: | + crds: + enabled: false + + fullnameOverride: {{ .Values.prometheus.fullname | default "prometheus-kube-prometheus" }} + + {{- with .Values.prometheus.defaultRules }} + defaultRules: + {{- . | toYaml | nindent 10 }} + {{- end}} + + ## Configuration for alertmanager + ## ref: https://prometheus.io/docs/alerting/alertmanager/ + ## + alertmanager: + config: + route: + {{- if .Values.prometheus.alert_group_by }} + group_by: + {{- range .Values.prometheus.alert_group_by }} + - {{ . | quote }} + {{- end }} + {{- else }} + group_by: ["alertname"] + {{- end }} + group_wait: 60s + group_interval: 15m + repeat_interval: 24h + receiver: {{ .Values.prometheus.alert_receiver | default "pagerduty" }} + routes: + - match: + alertname: Watchdog + group_wait: 0s + group_interval: 1m + repeat_interval: 50s + receiver: snitch + {{- if .Values.prometheus.oncallUrl}} + - match: + alertname: .* + receiver: oncall + continue: true + {{- end }} + receivers: + - name: pagerduty + pagerduty_configs: + - routing_key: {{ default "key" .Values.prometheus.pagerdutyRoutingKey }} + url: "https://events.pagerduty.com/v2/enqueue" + severity: {{`'{{ if .CommonLabels.severity }}{{ .CommonLabels.severity | toLower }}{{ else }}critical{{ end }}'`}} + {{- if .Values.prometheus.snitchUrl}} + - name: snitch + webhook_configs: + - url: "{{ .Values.prometheus.snitchUrl }}" + send_resolved: false + {{- end }} + - name: teams + webhook_configs: + - url: "https://prometheus-msteams.{{ .Values.cluster_config.domain }}/{{ .Values.cluster_config.cluster }}" + http_config: + tls_config: + insecure_skip_verify: true + {{- if .Values.prometheus.oncallUrl}} + - name: oncall + webhook_configs: + - url: "{{ .Values.prometheus.oncallUrl }}" + send_resolved: true + {{- end }} + + storage: {} + + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + hosts: + - alertmanager.{{ .Values.cluster_config.domain }} + paths: + - / + pathType: ImplementationSpecific + tls: + - secretName: alertmanager-general-tls + hosts: + - alertmanager.{{ .Values.cluster_config.domain }} + + ingressPerReplica: + pathType: ImplementationSpecific + + alertmanagerSpec: + affinity: {} + # nodeAffinity: + # requiredDuringSchedulingIgnoredDuringExecution: + # nodeSelectorTerms: + # - matchExpressions: + # - key: kubernetes.io/hostname + # operator: In + # values: + # - {{ .Values.cluster_config.cluster }}-0.itpartner.intern + + tolerations: [] + # - key: unschedulable + # operator: Exists + # effect: NoSchedule + + grafana: + defaultDashboardsEnabled: {{ .Values.prometheus.grafana.defaultDashboardsEnabled }} + {{- if .Values.prometheus.grafana.plugins }} + plugins: + {{- range .Values.prometheus.grafana.plugins }} + - {{ . }} + {{- end }} + {{- end }} + grafana.ini: + server: + root_url: "https://grafana.{{.Values.cluster_config.domain}}:443" + security: + allow_embedding: "true" + auth: + disable_login_form: "{{ .Values.prometheus.grafana.disable_login_form }}" + users: + auto_assign_org_role: "Admin" + {{- range .Values.cluster_config.oidc }} + {{- if eq .provider "azuread" }} + auth.{{ .provider }}: + enabled: true + name: {{ .name }} + client_id: $__file{/etc/secrets/oauth/{{ .name }}/client_id} + client_secret: $__file{/etc/secrets/oauth/{{ .name }}/client_secret} + scopes: openid email profile + auth_url: https://login.microsoftonline.com/{{ .tenant }}/oauth2/v2.0/authorize + token_url: https://login.microsoftonline.com/{{ .tenant }}/oauth2/v2.0/token + allowed_groups: {{ .group_id }} + allow_sign_up: true + role_attribute_strict: false + allow_assign_grafana_admin: true + {{- else if eq .provider "github" }} + auth.{{ .provider }}: + name: {{ .name }} + enabled: true + client_id: $__file{/etc/secrets/oauth/{{ .name }}/client_id} + client_secret: $__file{/etc/secrets/oauth/{{ .name }}/client_secret} + allowed_organizations: {{ .allowed_organizations }} + {{- if .allowed_teams }} + allowed_teams: "{{ .allowed_teams }}" + {{- end }} + scopes: user:email,read:org + auth_url: https://github.com/login/oauth/authorize + token_url: https://github.com/login/oauth/access_token + allow_sign_up: true + role_attribute_strict: false + allow_assign_grafana_admin: true + {{- end }} + {{- end }} + extraSecretMounts: + {{- range .Values.cluster_config.oidc }} + - name: {{ .name }} + secretName: {{ .secret_ref.name }} + defaultMode: 0440 + mountPath: /etc/secrets/oauth/{{ .name }} + readOnly: true + {{- end }} + + {{- if .Values.prometheus.grafana.persistence }} + persistence: + enabled: true + size: 10Gi + {{- end }} + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips}} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + hosts: + - grafana.{{ .Values.cluster_config.domain }} + path: / + tls: + - secretName: grafana-general-tls + hosts: + - grafana.{{ .Values.cluster_config.domain }} + sidecar: + dashboards: + enabled: true + label: grafana_dashboard + folderAnnotation: grafana_folder + annotations: {} + multicluster: + global: + enabled: true + etcd: + enabled: false + provider: + allowUiUpdates: false + foldersFromFilesStructure: true + {{- if .Values.prometheus.thanos.datasource.enabled }} + datasources: + enabled: true + defaultDatasourceEnabled: true + url: http://thanos-query-frontend.thanos.svc:9090/ + # defaultDatasourceScrapeInterval: 15s + annotations: {} + + ## Create datasource for each Pod of Prometheus StatefulSet; + ## this uses headless service `prometheus-operated` which is + ## created by Prometheus Operator + ## ref: https://git.io/fjaBS + createPrometheusReplicasDatasources: false + label: grafana_datasource + {{ end }} + {{- if or .Values.loki.enabled .Values.prometheus.additionalDataSources }} + additionalDataSources: + {{- end }} + {{- if .Values.tempo.enabled }} + - name: Tempo + type: tempo + uid: tempo + orgId: 1 + url: http://tempo.tempo:3100 + isDefault: false + version: 1 + access: proxy + jsonData: + nodeGraph: + enabled: true + serviceMap: + datasourceUid: 'Prometheus' + tracesToLogs: + datasourceUid: loki + filterByTraceID: false + spanEndTimeShift: "500ms" + spanStartTimeShift: "-500ms" + timeInterval: 30s + {{- end }} + {{- if .Values.loki.enabled }} + - name: loki + type: loki + uid: loki + access: proxy + basicAuth: false + editable: false + jsonData: + tlsSkipVerify: false + {{- if .Values.tempo.enabled }} + derivedFields: + - datasourceUid: tempo + matcherRegex: trace_id + matcherType: label + name: Trace ID + url: $${__value.raw} + urlDisplayLabel: 'Trace ID: $${__value.raw}' + {{- end }} + orgId: 1 + url: http://loki-read-headless.loki:3100 + version: 1 + {{- end }} + {{- with .Values.prometheus.additionalDataSources }} + {{- toYaml . | nindent 10 }} + {{- end }} + + kubeApiServer: + tlsConfig: + serverName: kubernetes + insecureSkipVerify: true + + kubelet: + serviceMonitor: + https: {{ .Values.prometheus.kubelet.https }} + cAdvisor: true + + # NOTE(simkir): Including throttling seconds by setting this. We use that in some dashboards, and could be useful + ## MetricRelabelConfigs to apply to samples after scraping, but before ingestion. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#relabelconfig + ## + cAdvisorMetricRelabelings: + # Drop less useful container CPU metrics. + - sourceLabels: [__name__] + action: drop + regex: 'container_cpu_(load_average_10s|system_seconds_total|user_seconds_total)' + # Drop less useful container / always zero filesystem metrics. + - sourceLabels: [__name__] + action: drop + regex: 'container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)' + # Drop less useful / always zero container memory metrics. + - sourceLabels: [__name__] + action: drop + regex: 'container_memory_(mapped_file|swap)' + # Drop less useful container process metrics. + - sourceLabels: [__name__] + action: drop + regex: 'container_(file_descriptors|tasks_state|threads_max)' + # Drop container_memory_failures_total{scope="hierarchy"} metrics, + # we only need the container scope. + - sourceLabels: [__name__, scope] + action: drop + regex: 'container_memory_failures_total;hierarchy' + # Drop container_network_... metrics that match various interfaces that + # correspond to CNI and similar interfaces. This avoids capturing network + # metrics for host network containers. + - sourceLabels: [__name__, interface] + action: drop + regex: 'container_network_.*;(cali|cilium|cni|lxc|nodelocaldns|tunl).*' + # Drop container spec metrics that overlap with kube-state-metrics. + - sourceLabels: [__name__] + action: drop + regex: 'container_spec.*' + # Drop cgroup metrics with no pod. + - sourceLabels: [id, pod] + action: drop + regex: '.+;' + # - sourceLabels: [__name__, image] + # separator: ; + # regex: container_([a-z_]+); + # replacement: $1 + # action: drop + # - sourceLabels: [__name__] + # separator: ; + # regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s) + # replacement: $1 + # action: drop + + kubeControllerManager: + enabled: false + {{- if .Values.cluster_config.apiserverip }} + endpoints: + - {{ .Values.cluster_config.apiserverip }} + {{- end }} + service: + port: 10252 + selector: + k8s-app: kube-controller-manager + serviceMonitor: + enabled: true + https: true + insecureSkipVerify: true + + coreDns: + enabled: true + service: + targetPort: {{ .Values.prometheus.coredns.targetPort | default 10055 }} + selector: + k8s-app: kube-dns + + kubeEtcd: + enabled: true + {{- if .Values.cluster_config.etcd_nodes }} + endpoints: {{ .Values.cluster_config.etcd_nodes }} + {{- end }} + service: + port: {{ .Values.prometheus.etcd.targetPort | default 2379 }} + targetPort: {{ .Values.prometheus.etcd.targetPort | default 2379 }} + serviceMonitor: + enabled: true + scheme: https + insecureSkipVerify: true + caFile: /etc/prometheus/secrets/etcd-client-cert/ca.pem + certFile: /etc/prometheus/secrets/etcd-client-cert/etcd.pem + keyFile: /etc/prometheus/secrets/etcd-client-cert/etcd-key.pem + + kubeScheduler: + enabled: false + {{- if .Values.cluster_config.apiserverip }} + endpoints: + - {{ .Values.cluster_config.apiserverip }} + {{- end }} + service: + port: {{ .Values.prometheus.scheduler.targetPort | default 10251 }} + targetPort: {{ .Values.prometheus.scheduler.targetPort | default 10251 }} + selector: + k8s-app: kube-scheduler + + kubeProxy: + enabled: false + {{- if .Values.cluster_config.k8s_nodes }} + endpoints: {{ .Values.cluster_config.k8s_nodes }} + {{- else }} + service: + selector: + k8s-app: kube-proxy + {{- end }} + + prometheusOperator: + enabled: true + + admissionWebhooks: + certManager: + enabled: true + issuerRef: + name: "ca-issuer" + kind: "ClusterIssuer" + + kubeletService: + enabled: {{ .Values.prometheus.kubelet.enabled }} + + prometheus: + enabled: true + {{- if .Values.otel.enabled }} + enableRemoteWriteReceiver: true + {{- end }} + + thanosService: + enabled: false + type: ClusterIP + + ## gRPC port config + portName: grpc + port: 10901 + targetPort: "grpc" + + ## HTTP port config (for metrics) + httpPortName: http + httpPort: 10902 + targetHttpPort: "http" + + # Default is to make this a headless service ("None") + # clusterIP: "None" + + ## Port to expose on each node, if service type is NodePort + ## + nodePort: 30901 + httpNodePort: 30902 + + {{- if .Values.prometheus.thanos.enabled }} + # ServiceMonitor to scrape Sidecar metrics + # Needs thanosService to be enabled as well + thanosServiceMonitor: + enabled: true + interval: "" + + thanosIngress: + enabled: true + servicePort: 10901 + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + nginx.ingress.kubernetes.io/backend-protocol: "GRPC" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + kubernetes.io/ingress.allow-http: "false" + hosts: + - thanos-gateway.{{ .Values.cluster_config.domain }} + paths: + - / + pathType: ImplementationSpecific + tls: + - secretName: thanos-gateway-tls + hosts: + - thanos-gateway.{{ .Values.cluster_config.domain }} + {{- end }} + + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + hosts: + - prometheus.{{ .Values.cluster_config.domain }} + paths: + - / + pathType: ImplementationSpecific + tls: + - secretName: prometheus-general-tls + hosts: + - prometheus.{{ .Values.cluster_config.domain }} + + ingressPerReplica: + enabled: false + pathType: ImplementationSpecific + + prometheusSpec: + tolerations: [] + # - key: unschedulable + # operator: Exists + # effect: NoSchedule + secrets: + - etcd-client-cert + storageSpec: + volumeClaimTemplate: + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: {{ .Values.prometheus.storage.size }} + {{- with .Values.prometheus.enableFeatures}} + enableFeatures: + {{- range . }} + - {{ . }} + {{- end }} + {{- end }} + + ## External labels to add to any time series or alerts when communicating with external systems + ## + externalLabels: + cluster: {{ .Values.cluster_config.cluster }} + + ## Name of the external label used to denote replica name + ## + replicaExternalLabelName: "" + + ## If true, the Operator won't add the external label used to denote replica name + ## + replicaExternalLabelNameClear: true + + ## Name of the external label used to denote Prometheus instance name + ## + prometheusExternalLabelName: "" + + ## If true, the Operator won't add the external label used to denote Prometheus instance name + ## + prometheusExternalLabelNameClear: true + + serviceMonitorSelectorNilUsesHelmValues: false + podMonitorSelectorNilUsesHelmValues: false + ruleSelectorNilUsesHelmValues: false + + ## Thanos configuration allows configuring various aspects of a Prometheus server in a Thanos environment. + ## This section is experimental, it may change significantly without deprecation notice in any release. + ## This is experimental and may change significantly without backward compatibility in any release. + ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#thanosspec + ## + {{- if .Values.prometheus.thanos.enabled }} + thanos: + objectStorageConfig: + key: thanos.yaml + name: thanos-objstore-config + {{- end }} + # remoteWrite: + # - url: https://thanos-receive.k1.itpartner.no/api/v1/receive + # name: {{ .Values.cluster_config.cluster }} + {{- with .Values.prometheus.additionalScrapeConfigs}} + additionalScrapeConfigs: + {{- toYaml . | nindent 12 }} + {{- end }} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - ServerSideApply=true + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.prometheus.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} + ignoreDifferences: + - group: apps + kind: Deployment + jqPathExpressions: + - '.spec.template.spec.containers[]?.resources' + - group: monitoring.coreos.com + kind: ServiceMonitor + jqPathExpressions: + - '.spec.endpoints[]?.relabelings' + - group: admissionregistration.k8s.io + kind: MutatingWebhookConfiguration + jqPathExpressions: + - '.webhooks[]?.clientConfig.caBundle' + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + jqPathExpressions: + - '.webhooks[]?.clientConfig.caBundle' +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: prometheus-crd + namespace: argocd + annotations: + argocd.argoproj.io/sync-wave: "-1" + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: prometheus + server: 'https://kubernetes.default.svc' + source: + repoURL: 'https://prometheus-community.github.io/helm-charts' + targetRevision: '{{ .Values.prometheus.crd_version }}' + chart: prometheus-operator-crds + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + automated: {} + syncOptions: + - ServerSideApply=true + - CreateNamespace=true + - ApplyOutOfSyncOnly=true +{{- end }} diff --git a/charts/sys/templates/app-promtail.yaml b/charts/sys/templates/app-promtail.yaml new file mode 100644 index 00000000..c2602d57 --- /dev/null +++ b/charts/sys/templates/app-promtail.yaml @@ -0,0 +1,50 @@ +{{ if .Values.promtail.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: promtail + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: loki + server: 'https://kubernetes.default.svc' + sources: + #- repoURL: {{ .Values.cluster_config.manifests }} + # path: {{ .Values.cluster_config.policies }}/promtail + # targetRevision: HEAD + - repoURL: 'https://grafana.github.io/helm-charts' + targetRevision: {{ .Values.promtail.version }} + chart: promtail + helm: + values: | + config: + snippets: + pipelineStages: + - labelallow: + - app + - app_kubernetes_io_component + - app_kubernetes_io_instance + - app_kubernetes_io_version + - container + - instance + - namespace + - pod + - stream + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.promtail.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-rabbitmq-operator.yaml b/charts/sys/templates/app-rabbitmq-operator.yaml new file mode 100644 index 00000000..1b39a4c0 --- /dev/null +++ b/charts/sys/templates/app-rabbitmq-operator.yaml @@ -0,0 +1,60 @@ +{{ if .Values.rabbitmq_operator.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: rabbitmq-operator + namespace: argocd +spec: + destination: + namespace: rabbitmq + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/rabbitmq + targetRevision: HEAD + - repoURL: 'https://charts.bitnami.com/bitnami' + targetRevision: {{ .Values.rabbitmq_operator.version }} + chart: rabbitmq-cluster-operator + helm: + # NOTE(mrtz): Also add metrics for topology operator? + values: | + fullnameOverride: rabbitmq-operator + additionalArgs: [] + useCertManager: true + {{ if .Values.rabbitmq_operator.metrics }} + clusterOperator: + metrics: + service: + enabled: true + serviceMonitor: + enabled: true + podMonitor: + enabled: true + {{ end }} + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + - ServerSideApply=true + {{- if .Values.rabbitmq_operator.version }} + automated: + prune: true + # selfHeal: false + ignoreDifferences: + - group: "" + kind: Secret + name: rabbitmq-operator-messaging-topology-operator-webhook + jsonPointers: + - /data/ca.crt + - /data/tls.crt + - /data/tls.key + - group: admissionregistration.k8s.io + kind: ValidatingWebhookConfiguration + jqPathExpressions: + - '.webhooks[]?.clientConfig.caBundle' + {{- end }} +{{ end }} diff --git a/charts/sys/templates/app-sealed-secrets.yaml b/charts/sys/templates/app-sealed-secrets.yaml new file mode 100644 index 00000000..c8ad408c --- /dev/null +++ b/charts/sys/templates/app-sealed-secrets.yaml @@ -0,0 +1,32 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: sealed-secrets + namespace: argocd +spec: + destination: + namespace: sealed-secrets + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/sealed-secrets + targetRevision: HEAD + - repoURL: 'https://bitnami-labs.github.io/sealed-secrets' + targetRevision: {{ .Values.sealed_secrets.version }} + chart: sealed-secrets + helm: + values: | + fullnameOverride: "vault-sealed-secrets" + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.sealed_secrets.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} diff --git a/charts/sys/templates/app-tempo.yaml b/charts/sys/templates/app-tempo.yaml new file mode 100644 index 00000000..9ed71cac --- /dev/null +++ b/charts/sys/templates/app-tempo.yaml @@ -0,0 +1,90 @@ +{{ if .Values.tempo.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: tempo + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: tempo + server: 'https://kubernetes.default.svc' + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{ if .Values.tempo.autosync }} + automated: + prune: true + # selfHeal: false + {{ end }} + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/tempo + targetRevision: HEAD + - repoURL: 'https://grafana.github.io/helm-charts' + targetRevision: {{ .Values.tempo.version }} + chart: tempo + helm: + values: | + tempo: + reportingEnabled: false + storage: + trace: + backend: s3 + s3: + bucket: {{ .Values.tempo.bucketName | default "tempo-traces" }} + endpoint: {{ .Values.tempo.s3.endpoint | default "https://s3.production.itpartner.no" }} + prefix: traces + access_key: ${S3KEY} + secret_key: ${S3SECRET} + forcepathstyle: true + region: us-east-1 + {{- if .Values.tempo.s3.insecure_skip_verify }} + tls_insecure_skip_verify: true + {{- end }} + local: + path: /var/tempo/traces + wal: + path: /var/tempo/wal + metricsGenerator: + enabled: true + remoteWriteUrl: "http://prom-prometheus.prometheus:9090/api/v1/write" + extraArgs: { config.expand-env=true } + extraEnv: + - name: S3KEY + valueFrom: + secretKeyRef: + name: {{ .Values.tempo.secret.name | default "nutanix-s3"}} + key: {{ .Values.tempo.secret.access_key | default "access_key" }} + - name: S3SECRET + valueFrom: + secretKeyRef: + name: {{ .Values.tempo.secret.name | default "nutanix-s3"}} + key: {{ .Values.tempo.secret.access_key | default "access_secret" }} + tempoQuery: + ingress: + enabled: true + ingressClassName: nginx + annotations: + cert-manager.io/cluster-issuer: {{ .Values.cluster_config.ingress_clusterissuer }} + nginx.ingress.kubernetes.io/ssl-redirect: "true" + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: {{ join "," . }} + {{- end }} + path: / + pathType: Prefix + hosts: + - query.tempo.{{ .Values.cluster_config.domain }} + tls: + - secretName: tempo-query-tls + hosts: + - query.tempo.{{ .Values.cluster_config.domain }} +{{ end }} diff --git a/charts/sys/templates/app-velero.yaml b/charts/sys/templates/app-velero.yaml new file mode 100644 index 00000000..eea109e0 --- /dev/null +++ b/charts/sys/templates/app-velero.yaml @@ -0,0 +1,111 @@ +{{ if .Values.velero.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: velero + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true +spec: + destination: + namespace: velero + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/velero + targetRevision: HEAD + - repoURL: 'https://vmware-tanzu.github.io/helm-charts' + targetRevision: {{ .Values.velero.version }} + chart: velero + helm: + values: | + initContainers: + - name: velero-plugin-for-aws + image: velero/velero-plugin-for-aws:v1.9.0 + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /target + name: plugins + credentials: + useSecret: true + existingSecret: {{ .Values.velero.credentials.secretName }} + deployNodeAgent: true + nodeAgent: + podVolumePath: {{ .Values.velero.kubeletRootDir }} + resources: + requests: + cpu: {{ .Values.velero.resources.nodeAgent.request.cpu | default "500m" }} + memory: {{ .Values.velero.resources.nodeAgent.request.memory | default "1Gi" }} + limits: + memory: {{ .Values.velero.resources.nodeAgent.limit.memory | default "2Gi" }} + snapshotsEnabled: false + resources: + requests: + cpu: {{ .Values.velero.resources.velero.request.cpu | default "500m" }} + memory: {{ .Values.velero.resources.velero.request.memory | default "1Gi" }} + limits: + memory: {{ .Values.velero.resources.velero.limit.memory | default "1Gi" }} + configuration: + uploaderType: kopia + # Backup all volumes by default + defaultVolumesToFsBackup: {{ .Values.velero.backupAllVolumes }} + ## https://velero.io/docs/v1.6/api-types/backupstoragelocation/ + backupStorageLocation: + - name: {{ .Values.velero.bsl }} + bucket: {{ .Values.velero.bucket }} + provider: aws + default: true + ## prefix is the directory under which all Velero data should be stored within the bucket. Optional. + prefix: {{ .Values.cluster_config.cluster }}/velero + accessMode: ReadWrite + config: + ## ONLY us-east-1 region is supported by nutanix + region: {{ .Values.velero.s3.region }} + s3ForcePathStyle: "true" + {{- if .Values.velero.s3.url }} + s3Url: {{ .Values.velero.s3.url }} + {{- end }} + {{- if .Values.velero.s3.insecureSkipTLSVerify }} + insecureSkipTLSVerify: true + {{- end }} + metrics: + serviceMonitor: + enabled: true + additionalLabels: + k8s-app: "velero" + release: "prometheus" + prometheusRule: + enabled: true + # namespace: "" + # Rules to be deployed + spec: + - alert: VeleroBackupPartialFailures + annotations: + message: Velero backup {{` {{ $labels.schedule }} `}} has {{` {{$value | humanizePercentage}} `}} partialy failed backups. + expr: |- + velero_backup_partial_failure_total{schedule!=""} / velero_backup_attempt_total{schedule!=""} > 0.25 + for: 15m + labels: + severity: critical + - alert: VeleroBackupFailures + annotations: + message: Velero backup {{` {{$labels.schedule}} `}} has {{` {{$value | humanizePercentage}} `}} failed backups. + expr: |- + velero_backup_failure_total{schedule!=""} / velero_backup_attempt_total{schedule!=""} > 0.25 + for: 15m + labels: + severity: critical + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.velero.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{- end }} diff --git a/charts/sys/templates/app-x509-exporter.yaml b/charts/sys/templates/app-x509-exporter.yaml new file mode 100644 index 00000000..659acc2b --- /dev/null +++ b/charts/sys/templates/app-x509-exporter.yaml @@ -0,0 +1,53 @@ +{{ if .Values.x509_exporter.enabled }} +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: x509-exporter + namespace: argocd + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: x509-exporter + server: 'https://kubernetes.default.svc' + sources: + - repoURL: {{ .Values.cluster_config.manifests }} + path: {{ .Values.cluster_config.policies }}/x509-exporter + targetRevision: HEAD + - repoURL: 'https://charts.enix.io' + targetRevision: {{ .Values.x509_exporter.version }} + chart: x509-certificate-exporter + helm: + values: | + secretsExporter: + excludeNamespaces: + - sealed-secrets + excludeLabels: + - cert-manager.io/* + resources: + limits: + memory: 100Mi + requests: + cpu: 20m + memory: 100Mi + prometheusServiceMonitor: + extraLabels: + k8s-app: x509-exporter + prometheusRules: + create: false + project: sys + syncPolicy: + managedNamespaceMetadata: + labels: + component: sys + syncOptions: + - CreateNamespace=true + - ApplyOutOfSyncOnly=true + {{- if .Values.x509_exporter.autosync }} + automated: + prune: true + # selfHeal: false + {{- end }} +{{ end }} diff --git a/charts/sys/templates/dashboards/argocd.yaml b/charts/sys/templates/dashboards/argocd.yaml new file mode 100644 index 00000000..ffdb9ae5 --- /dev/null +++ b/charts/sys/templates/dashboards/argocd.yaml @@ -0,0 +1,4260 @@ +apiVersion: v1 +data: + argocd.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 68, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 26, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "![argoimage](https://avatars1.githubusercontent.com/u/30269780?s=110&v=4)", + "mode": "markdown" + }, + "pluginVersion": "9.2.4", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 2, + "y": 1 + }, + "id": 32, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.4", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "time() - max(process_start_time_seconds{job=\"argocd-server-metrics\",namespace=~\"$namespace\"})", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 5, + "y": 1 + }, + "id": 94, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.4", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "count(count by (server) (argocd_cluster_info{namespace=~\"$namespace\"}))", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Clusters", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 8, + "y": 1 + }, + "id": 75, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.4", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_app_info{namespace=~\"$namespace\",dest_server=~\"$cluster\",health_status=~\"$health_status\",sync_status=~\"$sync_status\"})", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Applications", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 11, + "y": 1 + }, + "id": 107, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.2.4", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "count(count by (repo) (argocd_app_info{namespace=~\"$namespace\"}))", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Repositories", + "type": "stat" + }, + { + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "id": 0, + "op": "=", + "text": "0", + "type": 1, + "value": "null" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 3, + "x": 14, + "y": 1 + }, + "id": 100, + "links": [], + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "9.2.4", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_app_info{namespace=~\"$namespace\",dest_server=~\"$cluster\",operation!=\"\"})", + "format": "time_series", + "instant": true, + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Operations", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 4, + "w": 7, + "x": 17, + "y": 1 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_app_info{namespace=~\"$namespace\",dest_server=~\"$cluster\",health_status=~\"$health_status\",sync_status=~\"$sync_status\"}) by (namespace)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Applications", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 77, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Application Status", + "type": "row" + }, + { + "aliasColors": { + "Degraded": "semi-dark-red", + "Healthy": "green", + "Missing": "semi-dark-purple", + "Progressing": "semi-dark-blue", + "Suspended": "semi-dark-orange", + "Unknown": "rgb(255, 255, 255)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 105, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_app_info{namespace=~\"$namespace\",dest_server=~\"$cluster\",health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"}) by (health_status)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{`{{health_status}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Health Status", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "Degraded": "semi-dark-red", + "Healthy": "green", + "Missing": "semi-dark-purple", + "OutOfSync": "semi-dark-yellow", + "Progressing": "semi-dark-blue", + "Suspended": "semi-dark-orange", + "Synced": "semi-dark-green", + "Unknown": "rgb(255, 255, 255)" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 106, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_app_info{namespace=~\"$namespace\",dest_server=~\"$cluster\",health_status=~\"$health_status\",sync_status=~\"$sync_status\",health_status!=\"\"}) by (sync_status)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{`{{sync_status}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Sync Status", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 2, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 104, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Sync Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 13 + }, + "hiddenSeries": false, + "id": 56, + "interval": "", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "total", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(round(increase(argocd_app_sync_total{namespace=~\"$namespace\",dest_server=~\"$cluster\"}[$interval]))) by ($grouping)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{$grouping}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Sync Activity", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "decimals": -12, + "format": "short", + "label": "", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 19 + }, + "hiddenSeries": false, + "id": 73, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "hideEmpty": true, + "hideZero": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "total", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(round(increase(argocd_app_sync_total{namespace=~\"$namespace\",phase=~\"Error|Failed\",dest_server=~\"$cluster\"}[$interval]))) by ($grouping, phase)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{phase}}`}}: {{`{{$grouping}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Sync Failures", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "none", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "label": "", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 24 + }, + "id": 64, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Controller Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 25 + }, + "hiddenSeries": false, + "id": 58, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "total", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_app_reconcile_count{namespace=~\"$namespace\",dest_server=~\"$cluster\"}[$interval])) by ($grouping)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{$grouping}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Reconciliation Activity", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "cards": {}, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 31 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 60, + "legend": { + "show": true + }, + "links": [], + "options": { + "calculate": false, + "calculation": {}, + "cellGap": 2, + "cellValues": { + "decimals": 0 + }, + "color": { + "exponent": 0.5, + "fill": "#b4ff00", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Spectral", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "showValue": "never", + "tooltip": { + "show": true, + "yHistogram": true + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "short" + } + }, + "pluginVersion": "9.2.4", + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_app_reconcile_bucket{namespace=~\"$namespace\"}[$interval])) by (le)", + "format": "heatmap", + "instant": false, + "intervalFactor": 10, + "legendFormat": "{{`{{le}}`}}", + "refId": "A" + } + ], + "title": "Reconciliation Performance", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": 0, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "short", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 38 + }, + "hiddenSeries": false, + "id": 80, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_app_k8s_request_total{namespace=~\"$namespace\",server=~\"$cluster\"}[$interval])) by (verb, resource_kind)", + "format": "time_series", + "instant": false, + "intervalFactor": 1, + "legendFormat": "{{`{{verb}}`}} {{`{{resource_kind}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "K8s API Activity", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 44 + }, + "hiddenSeries": false, + "id": 96, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(workqueue_depth{namespace=~\"$namespace\",name=~\"app_.*\"}) by (name)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{name}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Workqueue Depth", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 44 + }, + "hiddenSeries": false, + "id": 98, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideZero": false, + "max": true, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_kubectl_exec_pending{namespace=~\"$namespace\"}) by (command)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{command}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Pending kubectl run", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "min": "0", + "show": true + }, + { + "decimals": 0, + "format": "short", + "label": "", + "logBase": 1, + "min": "0", + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 51 + }, + "id": 102, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Controller Telemetry", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 52 + }, + "hiddenSeries": false, + "id": 34, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "go_memstats_heap_alloc_bytes{job=~\"argocd-application-controller-metrics|argocd-applicationset-controller-metrics\",namespace=\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Memory Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 59 + }, + "hiddenSeries": false, + "id": 108, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "irate(process_cpu_seconds_total{job=~\"argocd-notifications-controller-metrics|argocd-applicationset-controller-metrics\",namespace=~\"$namespace\"}[1m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU Usage", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": 1, + "format": "none", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 66 + }, + "hiddenSeries": false, + "id": 62, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "go_goroutines{job=~\"argocd-application-controller-metrics|argocd-applicationset-controller-metrics\",namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Goroutines", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 88, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Cluster Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 74 + }, + "hiddenSeries": false, + "id": 90, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(argocd_cluster_api_resource_objects{namespace=~\"$namespace\",server=~\"$cluster\"}) by (server)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{server}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Resource Objects Count", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 81 + }, + "hiddenSeries": false, + "id": 92, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": " sum(argocd_cluster_api_resources{namespace=~\"$namespace\",server=~\"$cluster\"}) by (server)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{server}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "API Resources Count", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 87 + }, + "hiddenSeries": false, + "id": 86, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_cluster_events_total{namespace=~\"$namespace\",server=~\"$cluster\"}[$interval])) by (server)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{server}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cluster Events Count", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 94 + }, + "id": 70, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Repo Server Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 95 + }, + "hiddenSeries": false, + "id": 82, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_git_request_total{request_type=\"ls-remote\", namespace=~\"$namespace\"}[10m])) by (namespace)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Git Requests (ls-remote)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 95 + }, + "hiddenSeries": false, + "id": 84, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_git_request_total{request_type=\"fetch\", namespace=~\"$namespace\"}[10m])) by (namespace)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{namespace}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Git Requests (checkout)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "cards": {}, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 103 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 114, + "legend": { + "show": false + }, + "options": { + "calculate": false, + "calculation": {}, + "cellGap": 2, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "#b4ff00", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Spectral", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": false + }, + "rowsFrame": { + "layout": "auto" + }, + "showValue": "never", + "tooltip": { + "show": true, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "short" + } + }, + "pluginVersion": "9.2.4", + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_git_request_duration_seconds_bucket{request_type=\"fetch\", namespace=~\"$namespace\"}[$interval])) by (le)", + "format": "heatmap", + "intervalFactor": 10, + "legendFormat": "{{`{{le}}`}}", + "refId": "A" + } + ], + "title": "Git Fetch Performance", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "short", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" + }, + { + "cards": {}, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": { + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 103 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 116, + "legend": { + "show": false + }, + "options": { + "calculate": false, + "calculation": {}, + "cellGap": 2, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "#b4ff00", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Spectral", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": false + }, + "rowsFrame": { + "layout": "auto" + }, + "showValue": "never", + "tooltip": { + "show": true, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "short" + } + }, + "pluginVersion": "9.2.4", + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(argocd_git_request_duration_seconds_bucket{request_type=\"ls-remote\", namespace=~\"$namespace\"}[$interval])) by (le)", + "format": "heatmap", + "intervalFactor": 10, + "legendFormat": "{{`{{le}}`}}", + "refId": "A" + } + ], + "title": "Git Ls-Remote Performance", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "short", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 111 + }, + "hiddenSeries": false, + "id": 71, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "go_memstats_heap_alloc_bytes{job=\"argocd-repo-server-metrics\",namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{pod}}`}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Memory Used", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 119 + }, + "hiddenSeries": false, + "id": 72, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "editorMode": "code", + "expr": "go_goroutines{job=\"argocd-repo-server-metrics\",namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{pod}}`}}", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Goroutines", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "uid": "$datasource" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 126 + }, + "id": 66, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "refId": "A" + } + ], + "title": "Server Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 127 + }, + "hiddenSeries": false, + "id": 61, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "go_memstats_heap_alloc_bytes{job=\"argocd-server-metrics\",namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Memory Used", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "logBase": 1, + "min": "0", + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 135 + }, + "hiddenSeries": false, + "id": 36, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "go_goroutines{job=\"argocd-server-metrics\",namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Goroutines", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 144 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "go_gc_duration_seconds{job=\"argocd-server-metrics\", quantile=\"1\", namespace=~\"$namespace\"}", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "GC Time Quantiles", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "gridPos": { + "h": 2, + "w": 24, + "x": 0, + "y": 153 + }, + "id": 54, + "links": [], + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "#### gRPC Services:", + "mode": "markdown" + }, + "pluginVersion": "9.2.4", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 155 + }, + "hiddenSeries": false, + "id": 40, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "sort": "total", + "sortDesc": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"application.ApplicationService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "ApplicationService Requests", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 155 + }, + "hiddenSeries": false, + "id": 42, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"cluster.ClusterService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "ClusterService Requests", + "tooltip": { + "shared": false, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 164 + }, + "hiddenSeries": false, + "id": 44, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"project.ProjectService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "ProjectService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 164 + }, + "hiddenSeries": false, + "id": 46, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"repository.RepositoryService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [ + { + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "yaxis": "left" + } + ], + "timeRegions": [], + "title": "RepositoryService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 173 + }, + "hiddenSeries": false, + "id": 48, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"session.SessionService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "SessionService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 173 + }, + "hiddenSeries": false, + "id": 49, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"version.VersionService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "VersionService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 182 + }, + "hiddenSeries": false, + "id": 50, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"account.AccountService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "AccountService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "$datasource" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 182 + }, + "hiddenSeries": false, + "id": 99, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "hideZero": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "paceLength": 10, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "uid": "$datasource" + }, + "expr": "sum(increase(grpc_server_handled_total{job=\"argocd-server-metrics\",grpc_service=\"settings.SettingsService\",namespace=~\"$namespace\"}[$interval])) by (grpc_code, grpc_method)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{`{{grpc_code}}`}},{{`{{grpc_method}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "SettingsService Requests", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 191 + }, + "id": 110, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Redis Stats", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 192 + }, + "hiddenSeries": false, + "id": 112, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "9.2.4", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(increase(argocd_redis_request_total{namespace=~\"$namespace\"}[$interval])) by (failed)", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Requests by result", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "logBase": 1, + "show": true + }, + { + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": false, + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": "argocd", + "value": "argocd" + }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(kube_pod_info, namespace)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(kube_pod_info, namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "refresh": 1, + "regex": ".*argocd.*", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "auto": true, + "auto_count": 30, + "auto_min": "1m", + "current": { + "selected": false, + "text": "auto", + "value": "$__auto_interval_interval" + }, + "hide": 0, + "name": "interval", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_interval" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "10m", + "value": "10m" + }, + { + "selected": false, + "text": "30m", + "value": "30m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "2h", + "value": "2h" + }, + { + "selected": false, + "text": "4h", + "value": "4h" + }, + { + "selected": false, + "text": "8h", + "value": "8h" + } + ], + "query": "1m,5m,10m,30m,1h,2h,4h,8h", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "allValue": "", + "current": { + "selected": true, + "text": "namespace", + "value": "namespace" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "grouping", + "options": [ + { + "selected": true, + "text": "namespace", + "value": "namespace" + }, + { + "selected": false, + "text": "name", + "value": "name" + }, + { + "selected": false, + "text": "project", + "value": "project" + } + ], + "query": "namespace,name,project", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(argocd_cluster_info, server)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "label_values(argocd_cluster_info, server)", + "refId": "Prometheus-cluster-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "hide": 0, + "includeAll": true, + "multi": false, + "name": "health_status", + "options": [ + { + "selected": true, + "text": "All", + "value": "$__all" + }, + { + "selected": false, + "text": "Healthy", + "value": "Healthy" + }, + { + "selected": false, + "text": "Progressing", + "value": "Progressing" + }, + { + "selected": false, + "text": "Suspended", + "value": "Suspended" + }, + { + "selected": false, + "text": "Missing", + "value": "Missing" + }, + { + "selected": false, + "text": "Degraded", + "value": "Degraded" + }, + { + "selected": false, + "text": "Unknown", + "value": "Unknown" + } + ], + "query": "Healthy,Progressing,Suspended,Missing,Degraded,Unknown", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": ".*", + "current": { + "selected": true, + "text": "All", + "value": "$__all" + }, + "hide": 0, + "includeAll": true, + "multi": false, + "name": "sync_status", + "options": [ + { + "selected": true, + "text": "All", + "value": "$__all" + }, + { + "selected": false, + "text": "Synced", + "value": "Synced" + }, + { + "selected": false, + "text": "OutOfSync", + "value": "OutOfSync" + }, + { + "selected": false, + "text": "Unknown", + "value": "Unknown" + } + ], + "query": "Synced,OutOfSync,Unknown", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "ArgoCD", + "uid": "LCAgc9rWz", + "version": 1, + "weekStart": "" + } +kind: ConfigMap +metadata: + name: argocd-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" diff --git a/charts/sys/templates/dashboards/cilium-policy-verdicts.yaml b/charts/sys/templates/dashboards/cilium-policy-verdicts.yaml new file mode 100644 index 00000000..1cf5c8de --- /dev/null +++ b/charts/sys/templates/dashboards/cilium-policy-verdicts.yaml @@ -0,0 +1,1116 @@ +{{ if .Values.cilium.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: prom-cilium-policy-verdicts-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +data: + cilium-policy-verdicts.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 18015, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 0, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "all" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "l3-only" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "l3-l4" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "none" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "l7/.*" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "continuous-BlPu" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (match) (rate(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\", source_namespace=~\"$other_namespace|\", source=~\"$other_workload\", action=~\"$action\"}[$__rate_interval])) * 60", + "instant": false, + "legendFormat": "{{`{{match}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Ingress Policy Verdict Rate per Minute by Match Type", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 0, + "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 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "all" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "l3-only" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "l3-l4" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "none" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "l7/.*" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "continuous-BlPu" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (match) (rate(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\", destination_namespace=~\"$other_namespace|\", destination=~\"$other_workload\", action=~\"$action\"}[$__rate_interval])) * 60", + "instant": false, + "legendFormat": "{{`{{match}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Egress Policy Verdict Rate per Minute by Match Type", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 0, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "redirected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "forwarded" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "dropped" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "audit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (action) (rate(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\", source_namespace=~\"$other_namespace|\", source=~\"$other_workload\", action=~\"$action\"}[$__rate_interval])) * 60", + "instant": false, + "legendFormat": "{{`{{action}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Ingress Policy Verdict Rate per Minute by Action", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 0, + "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 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "redirected" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "forwarded" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "dropped" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "audit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "semi-dark-orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (action) (rate(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\", destination_namespace=~\"$other_namespace|\", destination=~\"$other_workload\", action=~\"$action\"}[$__rate_interval])) * 60", + "instant": false, + "legendFormat": "{{`{{action}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Egress Policy Verdict Rate per Minute by Action", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "links": [ + { + "targetBlank": true, + "title": "live view in hubble", + "url": "https://hubble.{{.Values.cluster_config.domain}}/?namespace=${__data.fields[\"destination namespace\"]}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 6, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (source_namespace, source, destination_namespace, destination, match, action) (increase(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\", source_namespace=~\"$other_namespace|\", source=~\"$other_workload\", action=~\"$action\"}[$__range])) > 0", + "format": "table", + "instant": true, + "legendFormat": "source: {{`{{source_namespace}}`}}/{{`{{source}}`}} destination: {{`{{destination_namespace}}`}}/{{`{{destination}}`}} match: {{`{{match}}`}} action: {{`{{action}}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Current Ingress Policy Verdict Rate Per Minute", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "container": true, + "destination": false, + "direction": true, + "endpoint": true, + "instance": true, + "job": true, + "namespace": true, + "node": true, + "pod": true, + "service": true + }, + "indexByName": { + "Time": 0, + "Value": 7, + "action": 6, + "destination": 4, + "destination_namespace": 3, + "match": 5, + "source": 2, + "source_namespace": 1 + }, + "renameByName": { + "destination_namespace": "destination namespace", + "source_namespace": "source namespace" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "links": [ + { + "targetBlank": true, + "title": "show live view in hubble", + "url": "https://hubble.{{.Values.cluster_config.domain}}/?namespace=${__data.fields[\"source namespace\"]}" + } + ], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 7, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Value" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (destination_namespace, destination, source_namespace, source, match, action) (increase(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\", destination_namespace=~\"$other_namespace|\", destination=~\"$other_workload\", action=~\"$action\"}[$__range])) > 0", + "format": "table", + "instant": true, + "legendFormat": "destination: {{`{{destination_namespace}}`}}/{{`{{destination}}`}} source: {{`{{source_namespace}}`}}/{{`{{source}}`}} match: {{`{{match}}`}} action: {{`{{action}}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Current Egress Policy Verdict Rate Per Minute", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "container": true, + "destination": false, + "direction": true, + "endpoint": true, + "instance": true, + "job": true, + "namespace": true, + "node": true, + "pod": true, + "service": true, + "source": false + }, + "indexByName": { + "Time": 0, + "Value": 7, + "action": 6, + "destination": 2, + "destination_namespace": 1, + "match": 5, + "source": 4, + "source_namespace": 3 + }, + "renameByName": { + "Time": "", + "destination_namespace": "destination namespace", + "source_namespace": "source namespace" + } + } + } + ], + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "query_result(hubble_policy_verdicts_total)", + "description": "The Kubernetes namespace the Network Policies apply to", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "namespace", + "options": [], + "query": { + "query": "query_result(hubble_policy_verdicts_total)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*namespace=\"([^\"]+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"destination\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"source\", \"(.+)\"))", + "description": "The Kubernetes workload the Network Policies apply to", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "workload", + "options": [], + "query": { + "query": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"destination\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"source\", \"(.+)\"))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*workload=\"([^\"]+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\"}, \"other_namespace\", \"$1\", \"source_namespace\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\"}, \"other_namespace\", \"$1\", \"destination_namespace\", \"(.+)\"))", + "description": "The non-targeted Kubernetes namespace (source for Ingress, destination for Egress)", + "hide": 0, + "includeAll": true, + "label": "other namespace", + "multi": true, + "name": "other_namespace", + "options": [], + "query": { + "query": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\"}, \"other_namespace\", \"$1\", \"source_namespace\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\"}, \"other_namespace\", \"$1\", \"destination_namespace\", \"(.+)\"))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*other_namespace=\"([^\"]+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\", source_namespace=~\"$other_namespace|\"}, \"workload\", \"$1\", \"source\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\", destination_namespace=~\"$other_namespace|\"}, \"workload\", \"$1\", \"destination\", \"(.+)\"))", + "description": "The non-targeted Kubernetes workload (source for Ingress, destination for Egress)", + "hide": 0, + "includeAll": true, + "label": "other workload", + "multi": true, + "name": "other_workload", + "options": [], + "query": { + "query": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\", destination=~\"$workload\", source_namespace=~\"$other_namespace|\"}, \"workload\", \"$1\", \"source\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\", source=~\"$workload\", destination_namespace=~\"$other_namespace|\"}, \"workload\", \"$1\", \"destination\", \"(.+)\"))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*workload=\"([^\"]+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"destination\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"source\", \"(.+)\"))", + "description": "Action", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "action", + "options": [], + "query": { + "query": "query_result(label_replace(hubble_policy_verdicts_total{direction=\"ingress\", destination_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"destination\", \"(.+)\") OR label_replace(hubble_policy_verdicts_total{direction=\"egress\", source_namespace=~\"$namespace\"}, \"workload\", \"$1\", \"source\", \"(.+)\"))", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "/.*action=\"([^\"]+)\".*/", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Cilium Policy Verdicts", + "uid": "nLIA2E37k", + "version": 1, + "weekStart": "" + } +{{- end }} diff --git a/charts/sys/templates/dashboards/cnpg-postgres.yaml b/charts/sys/templates/dashboards/cnpg-postgres.yaml new file mode 100644 index 00000000..0b2b5007 --- /dev/null +++ b/charts/sys/templates/dashboards/cnpg-postgres.yaml @@ -0,0 +1,3908 @@ +{{- if .Values.postgres_operator.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: cnpg-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" + app.kubernetes.io/instance: prometheus-community + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: grafana + app.kubernetes.io/version: 9.1.7 + helm.sh/chart: grafana-6.40.4 +data: + cnp.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": null, + "graphTooltip": 0, + "iteration": 1637064390546, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 12, + "panels": [], + "title": "Server Health", + "type": "row" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 191, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Instance", + "transparent": true, + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 2, + "x": 3, + "y": 1 + }, + "id": 192, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Status", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 4, + "x": 5, + "y": 1 + }, + "id": 193, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Clustering / replicas", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 5, + "x": 9, + "y": 1 + }, + "id": 195, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Connections", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 14, + "y": 1 + }, + "id": 196, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Max Connections", + "type": "text" + }, + { + "datasource": "${DataSource}", + "description": "", + "gridPos": { + "h": 1, + "w": 3, + "x": 17, + "y": 1 + }, + "id": 197, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Wraparound", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 2, + "x": 20, + "y": 1 + }, + "id": 313, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Started", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 2, + "x": 22, + "y": 1 + }, + "id": 198, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Server Version", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 2 + }, + "id": 61, + "options": { + "content": "\n \n

$instances

\n
", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "text" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "index": 0, + "text": "Down" + }, + "1": { + "index": 1, + "text": "Up" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 3, + "y": 2 + }, + "id": 33, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "No" + }, + "1": { + "color": "green", + "index": 0, + "text": "Yes" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 5, + "y": 2 + }, + "id": 60, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "1 - cnpg_pg_replication_in_recovery{namespace=~\"$namespace\",pod=~\"$instances\"} + cnpg_pg_replication_is_wal_receiver_up{namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "transformations": [], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 7, + "y": 2 + }, + "id": 229, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_replication_streaming_replicas{namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "transformations": [], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 9, + "y": 2 + }, + "id": 58, + "options": { + "legend": { + "calcs": [ + "last", + "mean" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": false, + "interval": "", + "legendFormat": "-", + "refId": "A" + } + ], + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "max": 100, + "noValue": "<1%", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 75 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 14, + "y": 2 + }, + "id": 32, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "100 * sum by (pod) (cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) / sum by (pod) (cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "gauge" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "max": 2147483647, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 200000000 + }, + { + "color": "red", + "value": 1000000000 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 17, + "y": 2 + }, + "id": 8, + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "max by (pod) (cnpg_pg_database_xid_age{namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "bargauge" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + } + ] + }, + "unit": "dateTimeFromNow" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 20, + "y": 2 + }, + "id": 314, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": false, + "expr": "cnpg_pg_postmaster_start_time{namespace=~\"$namespace\",pod=~\"$instances\"}*1000", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "transformations": [], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + } + ] + }, + "unit": "string" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 22, + "y": 2 + }, + "id": 42, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": false, + "expr": "cnpg_collector_postgres_version{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "transformations": [], + "type": "stat" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 41, + "panels": [ + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 0, + "y": 6 + }, + "id": 187, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Instance", + "transparent": true, + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 3, + "y": 6 + }, + "id": 183, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Max Connections", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 6, + "y": 6 + }, + "id": 184, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Shared Buffers", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 9, + "y": 6 + }, + "id": 185, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Effective Cache Size", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 12, + "y": 6 + }, + "id": 186, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Work Mem", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 15, + "y": 6 + }, + "id": 188, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Maintenance Work Mem", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 18, + "y": 6 + }, + "id": 189, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Random Page Cost", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 3, + "x": 21, + "y": 6 + }, + "id": 190, + "options": { + "content": "", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Sequential Page Cost", + "type": "text" + }, + { + "datasource": "${DataSource}", + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 7 + }, + "id": 86, + "options": { + "content": "\n \n

$instances

\n
", + "mode": "html" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "kube_pod_container_status_ready{container=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "text" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 7 + }, + "id": 30, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"max_connections\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 7 + }, + "id": 24, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "max by (pod) (cnpg_pg_settings_setting{name=\"shared_buffers\",namespace=~\"$namespace\",pod=~\"$instances\"}) * max by (pod) (cnpg_pg_settings_setting{name=\"block_size\",namespace=~\"$namespace\",pod=~\"$instances\"})", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 7 + }, + "id": 57, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"effective_cache_size\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 7 + }, + "id": 26, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"} * 1024", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 7 + }, + "id": 47, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"maintenance_work_mem\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 7 + }, + "id": 48, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"random_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 7 + }, + "id": 56, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.2.1", + "repeat": "instances", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{name=\"seq_page_cost\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "type": "stat" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-purple", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 150, + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "parameter" + } + ] + }, + "pluginVersion": "8.2.1", + "repeatDirection": "v", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_settings_setting{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Configurations", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "__name__": true, + "container": true, + "endpoint": true, + "instance": true, + "job": true, + "name": false, + "namespace": true, + "pod": false + }, + "indexByName": { + "Time": 0, + "Value": 9, + "__name__": 1, + "container": 2, + "endpoint": 3, + "instance": 4, + "job": 5, + "name": 7, + "namespace": 8, + "pod": 6 + }, + "renameByName": { + "__name__": "", + "name": "parameter" + } + } + } + ], + "type": "table" + } + ], + "title": "Configuration", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 10, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DataSource}", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 7 + }, + "hiddenSeries": false, + "id": 273, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.2.1", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"}) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{`{{pod}}`}}", + "legendLink": null, + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{pod=~\"$instances\", namespace=~\"$namespace\"})", + "hide": false, + "interval": "", + "legendFormat": "total", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:189", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "$$hashKey": "object:190", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DataSource}", + "fill": 2, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 7 + }, + "hiddenSeries": false, + "id": 275, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.2.1", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "quota - requests", + "color": "#F2495C", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + }, + { + "alias": "quota - limits", + "color": "#FF9830", + "dashes": true, + "fill": 0, + "hiddenSeries": true, + "hideTooltip": true, + "legend": true, + "linewidth": 2, + "stack": false + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"}) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{`{{pod}}`}}", + "legendLink": null, + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$instances\", namespace=\"$namespace\", container!=\"\", image!=\"\"})", + "hide": false, + "interval": "", + "legendFormat": "total", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Usage (w/o cache)", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:246", + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": 0, + "show": true + }, + { + "$$hashKey": "object:247", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (pod)", + "hide": false, + "interval": "", + "legendFormat": "total ({{`{{pod}}`}})", + "refId": "B" + }, + { + "exemplar": true, + "expr": "sum(cnpg_backends_total{namespace=~\"$namespace\",pod=~\"$instances\"}) by (state, pod)", + "interval": "", + "legendFormat": "{{`{{state}}`}} ({{`{{pod}}`}})", + "refId": "A" + } + ], + "title": "Session States", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_xact_commit{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", + "interval": "", + "legendFormat": "committed ({{`{{pod}}`}})", + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(cnpg_pg_stat_database_xact_rollback{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])) by (pod)", + "hide": false, + "interval": "", + "legendFormat": "rolled back ({{`{{pod}}`}})", + "refId": "B" + } + ], + "title": "Transactions [5m]", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "max by (pod) (cnpg_backends_max_tx_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"})", + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Longest Transaction", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 55, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_deadlocks{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "count ({{`{{pod}}`}})", + "refId": "B" + } + ], + "title": "Deadlocks [5m]", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 54, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_backends_waiting_total{namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Blocked Queries", + "type": "timeseries" + } + ], + "title": "Operational Stats", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 35, + "panels": [ + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 44, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_tup_deleted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "interval": "", + "legendFormat": "deleted ({{`{{pod}}`}})", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_tup_inserted{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "inserted ({{`{{pod}}`}})", + "refId": "B" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_tup_fetched{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "fetched ({{`{{pod}}`}})", + "refId": "C" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_tup_returned{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "returned ({{`{{pod}}`}})", + "refId": "D" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_tup_updated{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "updated ({{`{{pod}}`}})", + "refId": "E" + } + ], + "title": "Tuple I/O [5m]", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 46, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_blks_hit{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "interval": "", + "legendFormat": "hit ({{`{{pod}}`}})", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_blks_read{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "read ({{`{{pod}}`}})", + "refId": "B" + } + ], + "title": "Block I/O [5m]", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 43 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_database_size_bytes{datname!~\"template.*\",datname!=\"postgres\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": " {{`{{pod}}`}}: {{`{{datname}}`}}", + "refId": "A" + } + ], + "title": "Database Size", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_database_temp_bytes{datname=\"\",namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "instant": false, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Temp Bytes [5m]", + "type": "timeseries" + } + ], + "title": "Storage & I/O", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 37, + "panels": [ + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 53 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_collector_pg_wal_archive_status{value=\"ready\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "ready ({{`{{pod}}`}})", + "refId": "A" + }, + { + "exemplar": true, + "expr": "cnpg_collector_pg_wal_archive_status{value=\"done\",namespace=~\"$namespace\",pod=~\"$instances\"}", + "hide": false, + "interval": "", + "legendFormat": "done ({{`{{pod}}`}})", + "refId": "B" + } + ], + "title": "WAL Segment Archive Status", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 53 + }, + "id": 52, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_archiver_archived_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "interval": "", + "legendFormat": "archived ({{`{{pod}}`}})", + "refId": "A" + }, + { + "exemplar": true, + "expr": "rate(cnpg_pg_stat_archiver_failed_count{namespace=~\"$namespace\",pod=~\"$instances\"}[5m])", + "hide": false, + "interval": "", + "legendFormat": "failed ({{`{{pod}}`}})", + "refId": "B" + } + ], + "title": "Archiver Status [5m]", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 53 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_archiver_seconds_since_last_archival{namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "age ({{`{{pod}}`}})", + "refId": "A" + } + ], + "title": "Last Archive Age", + "type": "timeseries" + } + ], + "title": "Write Ahead Log", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 18, + "panels": [ + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "line" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 600 + }, + { + "color": "dark-red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 6 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_replication_lag{namespace=~\"$namespace\",pod=~\"$instances\"}", + "instant": false, + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Replication Lag", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 6 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_replication_write_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-.*\"}", + "instant": false, + "interval": "", + "legendFormat": "{{`{{pod}}`}} -> {{`{{application_name}}`}}", + "refId": "A" + } + ], + "title": "Write Lag", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 6 + }, + "id": 59, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_replication_flush_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-.*\"}", + "instant": false, + "interval": "", + "legendFormat": "{{`{{pod}}`}} -> {{`{{application_name}}`}}", + "refId": "A" + } + ], + "title": "Flush Lag", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 6 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_replication_replay_lag_seconds{namespace=~\"$namespace\",pod=~\"$cluster-.*\"}", + "interval": "", + "legendFormat": "{{`{{pod}}`}} -> {{`{{application_name}}`}}", + "refId": "A" + } + ], + "title": "Replay Lag", + "type": "timeseries" + } + ], + "title": "Replication", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 16 + }, + "id": 231, + "panels": [ + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "#b4ff00", + "colorScale": "sqrt", + "colorScheme": "interpolateOranges", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": "${DataSource}", + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 63 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 233, + "legend": { + "show": false + }, + "reverseYBuckets": false, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_collector_collection_duration_seconds{namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Collection Duration", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "s", + "logBase": 1, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + }, + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 63 + }, + "id": 235, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_collector_last_collection_error{namespace=~\"$namespace\",pod=~\"$instances\"}", + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Errors", + "type": "timeseries" + } + ], + "title": "Collector Stats", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 239, + "panels": [ + { + "datasource": "${DataSource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "dateTimeAsIso" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 72 + }, + "id": 237, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "targets": [ + { + "exemplar": true, + "expr": "cnpg_collector_first_recoverability_point{namespace=~\"$namespace\",pod=~\"$instances\"}*1000 > 0", + "format": "time_series", + "interval": "", + "legendFormat": "{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "First Recoverability Point", + "type": "timeseries" + } + ], + "title": "Backups", + "type": "row" + }, + { + "collapsed": true, + "datasource": "${DataSource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 293, + "panels": [ + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": -1, + "drawStyle": "line", + "fillOpacity": 8, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 6, + "w": 5, + "x": 0, + "y": 79 + }, + "id": 295, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_bgwriter_checkpoints_req{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "req/{{`{{pod}}`}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "cnpg_pg_stat_bgwriter_checkpoints_timed{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "timed/{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Requested/Timed", + "type": "timeseries" + }, + { + "datasource": "${DataSource}", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": -1, + "drawStyle": "line", + "fillOpacity": 8, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 5, + "x": 5, + "y": 79 + }, + "id": 296, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "multi" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "exemplar": true, + "expr": "cnpg_pg_stat_bgwriter_checkpoint_write_time{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "write/{{`{{pod}}`}}", + "refId": "B" + }, + { + "exemplar": true, + "expr": "cnpg_pg_stat_bgwriter_checkpoint_sync_time{namespace=~\"$namespace\",pod=~\"$instances\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "sync/{{`{{pod}}`}}", + "refId": "A" + } + ], + "title": "Write/Sync time", + "type": "timeseries" + } + ], + "title": "Checkpoints", + "type": "row" + } + ], + "refresh": "30s", + "schemaVersion": 31, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Data Source", + "multi": false, + "name": "DataSource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "datasource": "${DataSource}", + "definition": "cnpg_collector_up", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "cnpg_collector_up", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/namespace=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "cnp-sandbox", + "value": "cnp-sandbox" + }, + "datasource": "${DataSource}", + "definition": "cnpg_collector_up{namespace=~\"$namespace\"}", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "query": "cnpg_collector_up{namespace=~\"$namespace\"}", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/cluster=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "allValue": null, + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": "${DataSource}", + "definition": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-.*\"}", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "instances", + "options": [], + "query": { + "query": "cnpg_collector_up{namespace=~\"$namespace\",pod=~\"$cluster-.*\"}", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/pod=\"(?[^\"]+)/g", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "nowDelay": "" + }, + "timezone": "", + "title": "CloudNativePG", + "uid": "z7FCA4Nnk", + "version": 2 + } +{{- end }} diff --git a/charts/sys/templates/dashboards/dotdc-grafana-dashboards-kubernetes.yaml b/charts/sys/templates/dashboards/dotdc-grafana-dashboards-kubernetes.yaml new file mode 100644 index 00000000..b06e20bf --- /dev/null +++ b/charts/sys/templates/dashboards/dotdc-grafana-dashboards-kubernetes.yaml @@ -0,0 +1,21313 @@ +apiVersion: v1 +data: + k8s-addons-prometheus.json: |- + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.5.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern 'Prometheus' 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 89, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Information", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "?", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "orange", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 78, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "name" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "prometheus_build_info{pod=~\"$pod\", cluster=~\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ version }}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Prometheus version", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 92, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "up{pod=~\"$pod\", cluster=~\"$cluster\"} < 1", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Instance Down", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 72, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(prometheus_tsdb_head_series{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "TSDB Head Series", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 94, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(prometheus_sd_discovered_targets{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Discovered Targets", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 64, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Prometheus", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 93, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "up{pod=~\"$pod\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Liveness by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 96, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(prometheus_config_last_reload_successful{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Config - Last Successful Reload by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 74, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_target_scrapes_exceeded_body_size_limit_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - Exceeded body size limit", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_target_scrapes_exceeded_sample_limit_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Exceeded sample limit", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_target_scrapes_sample_duplicate_timestamp_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Duplicate timestamp", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_target_scrapes_sample_out_of_bounds_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Sample out of bounds", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_target_scrapes_sample_out_of_order_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Sample out of order", + "range": true, + "refId": "E" + } + ], + "title": "Target Scrapes Errors by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 84, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(prometheus_sd_discovered_targets{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Number of Targets by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 75, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_target_sync_length_seconds_sum{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod, scrape_job) * 1000", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - {{`{{ scrape_job }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Target Sync by pod, scrape_job", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 85, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "round(sum(rate(prometheus_target_interval_length_seconds_sum{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval]) / rate(prometheus_target_interval_length_seconds_count{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod))", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Average Scrape Interval by pod", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 98, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Prometheus TSDB / Query Engine", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 59, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(prometheus_tsdb_head_series{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - Head Series", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(prometheus_tsdb_head_chunks{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Head Chunks", + "range": true, + "refId": "B" + } + ], + "title": "TSDB Head Series & Chunks by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 31 + }, + "id": 60, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_tsdb_head_samples_appended_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "TSDB Head samples appended - rate by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 101, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(prometheus_tsdb_blocks_loaded{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - Head Series", + "range": true, + "refId": "A" + } + ], + "title": "TSDB Blocks Loaded by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 102, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_tsdb_compactions_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - Total Compactions", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_tsdb_compactions_triggered_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Triggered Compactions", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_tsdb_compactions_skipped_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Skipped Compactions", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_tsdb_compactions_failed_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Failed Compactions", + "range": true, + "refId": "D" + } + ], + "title": "TSDB Rate of Compactions by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 90, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_tsdb_reloads_failures_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "TSDB Reload Failures by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 47 + }, + "id": 95, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_tsdb_head_series_created_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - Created series", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(prometheus_tsdb_head_series_removed_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "hide": false, + "legendFormat": "{{`{{ pod }}`}} - Deleted series", + "range": true, + "refId": "B" + } + ], + "title": "TSDB Created & Deleted series by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 55 + }, + "id": 73, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(prometheus_engine_query_duration_seconds_count{pod=~\"$pod\", slice=\"inner_eval\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Engine Query Count by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 55 + }, + "id": 86, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "max(prometheus_engine_query_duration_seconds{pod=~\"$pod\", cluster=~\"$cluster\"}) by (pod, slice) * 1000", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - {{`{{ slice }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Engine Query Duration by pod, slice", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 63 + }, + "id": 47, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Resources", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#F2495C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 64 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{pod=~\"$pod\", image!=\"\", container!=\"\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod, container)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - {{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Usage by pod, container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 64 + }, + "id": 51, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{pod=~\"$pod\", image!=\"\", container!=\"\", cluster=~\"$cluster\"}) by (pod, container)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}} - {{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory Usage by container", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 72 + }, + "id": 66, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Storage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "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": 62, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Persistent Volumes - Capacity and usage in %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 73 + }, + "id": 87, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}} - Used", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kubelet_volume_stats_capacity_bytes{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim)", + "hide": false, + "legendFormat": "{{`{{ persistentvolumeclaim }}`}} - Capacity", + "range": true, + "refId": "B" + } + ], + "title": "Persistent Volumes - Capacity and usage in bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "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": 68, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.4", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "1 - sum(kubelet_volume_stats_inodes_used{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_inodes{persistentvolumeclaim=~\".*prom.*\", cluster=~\"$cluster\"}) by (persistentvolumeclaim)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "range": true, + "refId": "A", + "step": 240 + } + ], + "title": "Persistent Volumes - Inodes", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 89 + }, + "id": 45, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 0, + "y": 90 + }, + "id": 31, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_network_receive_bytes_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_bytes_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Transmitted", + "range": true, + "refId": "B" + } + ], + "title": "Network - Bandwidth by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 34, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_network_receive_packets_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_packets_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Transmitted", + "range": true, + "refId": "B" + } + ], + "title": "Network - Packets rate by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_network_receive_packets_dropped_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_packets_dropped_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Transmitted", + "range": true, + "refId": "B" + } + ], + "title": "Network - Packets Dropped by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "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": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_network_receive_errors_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_errors_total{pod=~\"$pod\", cluster=~\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}} - Transmitted", + "range": true, + "refId": "B" + } + ], + "title": "Network - Errors by pod", + "type": "timeseries" + } + ], + "refresh": "30s", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(prometheus_build_info{cluster=\"$cluster\"}, pod)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "pod", + "options": [], + "query": { + "query": "label_values(prometheus_build_info{cluster=\"$cluster\"}, pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Prometheus", + "uid": "k8s_addons_prometheus", + "version": 3, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-addons-prometheus + namespace: prometheus +--- +#apiVersion: v1 +#data: +# k8s-addons-trivy-operator.json: | +# { +# "__inputs": [ +# { +# "name": "DS_PROMETHEUS", +# "label": "Prometheus", +# "description": "", +# "type": "datasource", +# "pluginId": "prometheus", +# "pluginName": "Prometheus" +# } +# ], +# "__elements": [], +# "__requires": [ +# { +# "type": "grafana", +# "id": "grafana", +# "name": "Grafana", +# "version": "8.5.0" +# }, +# { +# "type": "datasource", +# "id": "prometheus", +# "name": "Prometheus", +# "version": "5.0.0" +# }, +# { +# "type": "panel", +# "id": "timeseries", +# "name": "Time series", +# "version": "" +# }, +# { +# "type": "panel", +# "id": "stat", +# "name": "Stat", +# "version": "" +# }, +# { +# "type": "panel", +# "id": "table", +# "name": "Table", +# "version": "" +# } +# ], +# "annotations": { +# "list": [ +# { +# "builtIn": 1, +# "datasource": { +# "type": "datasource", +# "uid": "grafana" +# }, +# "enable": true, +# "hide": true, +# "iconColor": "rgba(0, 211, 255, 1)", +# "name": "Annotations & Alerts", +# "target": { +# "limit": 100, +# "matchAny": false, +# "tags": [], +# "type": "dashboard" +# }, +# "type": "dashboard" +# } +# ] +# }, +# "description": "This is a modern dashboard for the Trivy Operator from Aqua Security. Made to take advantage of the latest Grafana features. GitHub repository: https://github.com/dotdc/grafana-dashboards-kubernetes", +# "editable": true, +# "fiscalYearStartMonth": 0, +# "graphTooltip": 1, +# "links": [], +# "liveNow": false, +# "panels": [ +# { +# "collapsed": false, +# "datasource": { +# "type": "datasource", +# "uid": "grafana" +# }, +# "gridPos": { +# "h": 1, +# "w": 24, +# "x": 0, +# "y": 0 +# }, +# "id": 43, +# "panels": [], +# "title": "Vulnerabilities", +# "type": "row" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "red", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 0, +# "y": 1 +# }, +# "id": 51, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "CRITICAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "orange", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 4, +# "y": 1 +# }, +# "id": 50, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "HIGH", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "yellow", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 8, +# "y": 1 +# }, +# "id": 49, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "MEDIUM", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 12, +# "y": 1 +# }, +# "id": 60, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "LOW", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "purple", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 16, +# "y": 1 +# }, +# "id": 52, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "UNKNOWN", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "text", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 20, +# "y": 1 +# }, +# "id": 39, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "TOTAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 0, +# "y": 5 +# }, +# "id": 58, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "single", +# "sort": "none" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{cluster=~\"$cluster\"}) by (namespace)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "{{`{{namespace}}`}}", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total vulnerabilities by namespaces", +# "type": "timeseries" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [ +# { +# "matcher": { +# "id": "byName", +# "options": "Critical" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "red", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "High" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "orange", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Medium" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "yellow", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Low" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "blue", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Unknown" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "purple", +# "mode": "fixed" +# } +# } +# ] +# } +# ] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 12, +# "y": 5 +# }, +# "id": 61, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "multi", +# "sort": "desc" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{cluster=~\"$cluster\"}) by (severity)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total vulnerabilities by severity", +# "type": "timeseries" +# }, +# { +# "collapsed": false, +# "gridPos": { +# "h": 1, +# "w": 24, +# "x": 0, +# "y": 13 +# }, +# "id": 85, +# "panels": [], +# "title": "Vulnerability Details", +# "type": "row" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "description": "", +# "fieldConfig": { +# "defaults": { +# "custom": { +# "align": "auto", +# "displayMode": "auto", +# "filterable": true, +# "inspect": false +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "orange", +# "value": 80 +# } +# ] +# } +# }, +# "overrides": [ +# { +# "matcher": { +# "id": "byName", +# "options": "severity" +# }, +# "properties": [ +# { +# "id": "mappings", +# "value": [ +# { +# "options": { +# "Critical": { +# "color": "red", +# "index": 0 +# }, +# "High": { +# "color": "orange", +# "index": 1 +# }, +# "Low": { +# "color": "blue", +# "index": 3 +# }, +# "Medium": { +# "color": "yellow", +# "index": 2 +# }, +# "Unknown": { +# "color": "purple", +# "index": 4 +# } +# }, +# "type": "value" +# } +# ] +# }, +# { +# "id": "custom.displayMode", +# "value": "color-text" +# } +# ] +# } +# ] +# }, +# "gridPos": { +# "h": 12, +# "w": 24, +# "x": 0, +# "y": 14 +# }, +# "id": 83, +# "options": { +# "footer": { +# "enablePagination": true, +# "fields": [ +# "Value" +# ], +# "reducer": [ +# "sum" +# ], +# "show": false +# }, +# "showHeader": true, +# "sortBy": [] +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_vulnerabilities{namespace=~\"$namespace\", cluster=~\"$cluster\"}) by (namespace, image_registry, image_repository, image_tag, severity) > 0", +# "format": "table", +# "instant": false, +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Vulnerability count per image and severity in $namespace namespace(s)", +# "transformations": [ +# { +# "id": "organize", +# "options": { +# "excludeByName": { +# "Time": true, +# "Value": false +# }, +# "indexByName": { +# "Time": 0, +# "Value": 6, +# "image_registry": 2, +# "image_repository": 3, +# "image_tag": 4, +# "namespace": 1, +# "severity": 5 +# }, +# "renameByName": { +# "Value": "Nb of vulnerabilities", +# "image_registry": "Image Registry", +# "image_repository": "Image Repository", +# "image_tag": "Image Tag", +# "namespace": "Namespace", +# "severity": "Severity" +# } +# } +# }, +# { +# "id": "groupBy", +# "options": { +# "fields": { +# "All values": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Count": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Image Registry": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Image Repository": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Image Tag": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Namespace": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Nb of vulnerabilities": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Severity": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Value": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "image_registry": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "image_repository": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "image_tag": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "namespace": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "severity": { +# "aggregations": [], +# "operation": "groupby" +# } +# } +# } +# } +# ], +# "type": "table" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "description": "Require operator.metricsVulnIdEnabled: true", +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "custom": { +# "align": "auto", +# "displayMode": "auto", +# "filterable": true, +# "inspect": false +# }, +# "links": [], +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [ +# { +# "matcher": { +# "id": "byName", +# "options": "severity" +# }, +# "properties": [ +# { +# "id": "mappings", +# "value": [ +# { +# "options": { +# "Critical": { +# "color": "red", +# "index": 0 +# }, +# "High": { +# "color": "orange", +# "index": 1 +# }, +# "Low": { +# "color": "blue", +# "index": 3 +# }, +# "Medium": { +# "color": "yellow", +# "index": 2 +# }, +# "Unknown": { +# "color": "purple", +# "index": 4 +# } +# }, +# "type": "value" +# } +# ] +# }, +# { +# "id": "custom.displayMode", +# "value": "color-text" +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "vuln_id" +# }, +# "properties": [ +# { +# "id": "links", +# "value": [ +# { +# "targetBlank": true, +# "title": "https://nvd.nist.gov/vuln/detail/${__value.text}", +# "url": "https://nvd.nist.gov/vuln/detail/${__value.text}" +# } +# ] +# } +# ] +# } +# ] +# }, +# "gridPos": { +# "h": 12, +# "w": 24, +# "x": 0, +# "y": 26 +# }, +# "id": 78, +# "options": { +# "footer": { +# "enablePagination": true, +# "fields": "", +# "reducer": [ +# "sum" +# ], +# "show": false +# }, +# "showHeader": true, +# "sortBy": [] +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_vulnerability_id{vuln_id=~\"CVE.*\", namespace=~\"$namespace\", cluster=~\"$cluster\"}) by (namespace, image_registry, image_repository, image_tag, vuln_id, severity)", +# "format": "table", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Detaillled CVE vulnerabilities in $namespace namespace(s)", +# "transformations": [ +# { +# "id": "organize", +# "options": { +# "excludeByName": { +# "Time": true, +# "Value": true, +# "__name__": true, +# "container": true, +# "endpoint": true, +# "instance": true, +# "job": true, +# "namespace": false, +# "service": true +# }, +# "indexByName": { +# "Time": 0, +# "Value": 7, +# "image_registry": 2, +# "image_repository": 3, +# "image_tag": 4, +# "namespace": 1, +# "severity": 6, +# "vuln_id": 5 +# }, +# "renameByName": { +# "image_namespace": "namespace", +# "image_registry": "Image Registry", +# "image_repository": "Image Repository", +# "image_tag": "Image Tag", +# "namespace": "Namespace", +# "severity": "Severity", +# "vuln_id": "Vulnerability", +# "vulnerability_id": "" +# } +# } +# }, +# { +# "id": "groupBy", +# "options": { +# "fields": { +# "Image Registry": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Image Repository": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Image Tag": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Namespace": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Severity": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "Value": { +# "aggregations": [ +# "lastNotNull" +# ] +# }, +# "Vulnerability": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "image_namespace": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "namespace": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "severity": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "vuln_id": { +# "aggregations": [], +# "operation": "groupby" +# }, +# "vulnerability_id": { +# "aggregations": [], +# "operation": "groupby" +# } +# } +# } +# } +# ], +# "type": "table" +# }, +# { +# "collapsed": false, +# "datasource": { +# "type": "datasource", +# "uid": "grafana" +# }, +# "gridPos": { +# "h": 1, +# "w": 24, +# "x": 0, +# "y": 38 +# }, +# "id": 47, +# "panels": [], +# "title": "Config Audit Reports", +# "type": "row" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "red", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 0, +# "y": 39 +# }, +# "id": 56, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "CRITICAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "orange", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 4, +# "y": 39 +# }, +# "id": 55, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "HIGH", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "yellow", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 8, +# "y": 39 +# }, +# "id": 54, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "MEDIUM", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 12, +# "y": 39 +# }, +# "id": 53, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "LOW", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "text", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 16, +# "y": 39 +# }, +# "id": 65, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "TOTAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 0, +# "y": 43 +# }, +# "id": 62, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "single", +# "sort": "none" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{cluster=~\"$cluster\"}) by (namespace)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total config audit report by namespaces", +# "type": "timeseries" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [ +# { +# "matcher": { +# "id": "byName", +# "options": "Critical" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "red", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "High" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "orange", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Medium" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "yellow", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Low" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "blue", +# "mode": "fixed" +# } +# } +# ] +# } +# ] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 12, +# "y": 43 +# }, +# "id": 63, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "multi", +# "sort": "desc" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_resource_configaudits{cluster=~\"$cluster\"}) by (severity)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total config audit report by severity", +# "type": "timeseries" +# }, +# { +# "collapsed": false, +# "gridPos": { +# "h": 1, +# "w": 24, +# "x": 0, +# "y": 51 +# }, +# "id": 68, +# "panels": [], +# "title": "RBAC Assessments", +# "type": "row" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "red", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 0, +# "y": 52 +# }, +# "id": 72, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{severity=\"Critical\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "CRITICAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "orange", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 4, +# "y": 52 +# }, +# "id": 71, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{severity=\"High\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "HIGH", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "yellow", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 8, +# "y": 52 +# }, +# "id": 70, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{severity=\"Medium\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "MEDIUM", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 12, +# "y": 52 +# }, +# "id": 69, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{severity=\"Low\", namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "LOW", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "thresholds" +# }, +# "mappings": [], +# "thresholds": { +# "mode": "absolute", +# "steps": [ +# { +# "color": "green", +# "value": null +# }, +# { +# "color": "text", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 4, +# "w": 4, +# "x": 16, +# "y": 52 +# }, +# "id": 73, +# "options": { +# "colorMode": "value", +# "graphMode": "area", +# "justifyMode": "auto", +# "orientation": "auto", +# "reduceOptions": { +# "calcs": [ +# "last" +# ], +# "fields": "", +# "values": false +# }, +# "textMode": "auto" +# }, +# "pluginVersion": "9.3.8", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{namespace=~\"$namespace\", cluster=~\"$cluster\"})", +# "instant": true, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "refId": "A" +# } +# ], +# "title": "TOTAL", +# "type": "stat" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 0, +# "y": 56 +# }, +# "id": 74, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "single", +# "sort": "none" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{cluster=~\"$cluster\"}) by (namespace)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total RBAC Assessments by namespaces", +# "type": "timeseries" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [ +# { +# "matcher": { +# "id": "byName", +# "options": "Critical" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "red", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "High" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "orange", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Medium" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "yellow", +# "mode": "fixed" +# } +# } +# ] +# }, +# { +# "matcher": { +# "id": "byName", +# "options": "Low" +# }, +# "properties": [ +# { +# "id": "color", +# "value": { +# "fixedColor": "blue", +# "mode": "fixed" +# } +# } +# ] +# } +# ] +# }, +# "gridPos": { +# "h": 8, +# "w": 12, +# "x": 12, +# "y": 56 +# }, +# "id": 75, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "multi", +# "sort": "desc" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_role_rbacassessments{cluster=~\"$cluster\"}) by (severity)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total RBAC Assessments by severity", +# "type": "timeseries" +# }, +# { +# "collapsed": false, +# "gridPos": { +# "h": 1, +# "w": 24, +# "x": 0, +# "y": 64 +# }, +# "id": 81, +# "panels": [], +# "title": "Exposed Secrets", +# "type": "row" +# }, +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "fieldConfig": { +# "defaults": { +# "color": { +# "mode": "palette-classic" +# }, +# "custom": { +# "axisCenteredZero": false, +# "axisColorMode": "text", +# "axisLabel": "", +# "axisPlacement": "auto", +# "barAlignment": 0, +# "drawStyle": "line", +# "fillOpacity": 15, +# "gradientMode": "opacity", +# "hideFrom": { +# "legend": false, +# "tooltip": false, +# "viz": false +# }, +# "lineInterpolation": "linear", +# "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": "blue", +# "value": 1 +# } +# ] +# }, +# "unit": "none" +# }, +# "overrides": [] +# }, +# "gridPos": { +# "h": 8, +# "w": 24, +# "x": 0, +# "y": 65 +# }, +# "id": 76, +# "options": { +# "legend": { +# "calcs": [], +# "displayMode": "table", +# "placement": "right", +# "showLegend": true +# }, +# "tooltip": { +# "mode": "single", +# "sort": "none" +# } +# }, +# "pluginVersion": "8.5.0", +# "targets": [ +# { +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "editorMode": "code", +# "exemplar": false, +# "expr": "sum(trivy_image_exposedsecrets{cluster=~\"$cluster\"}) by (namespace)", +# "instant": false, +# "interval": "$resolution", +# "legendFormat": "__auto", +# "range": true, +# "refId": "A" +# } +# ], +# "title": "Total Exposed Secrets by namespaces", +# "type": "timeseries" +# } +# ], +# "refresh": "30s", +# "schemaVersion": 37, +# "style": "dark", +# "tags": [ +# "Prometheus", +# "Addons", +# "Trivy", +# "Trivy-operator" +# ], +# "templating": { +# "list": [ +# { +# "current": { +# "selected": false, +# "text": "Prometheus", +# "value": "Prometheus" +# }, +# "hide": 0, +# "includeAll": false, +# "multi": false, +# "name": "datasource", +# "options": [], +# "query": "prometheus", +# "queryValue": "", +# "refresh": 1, +# "regex": "", +# "skipUrlSync": false, +# "type": "datasource" +# }, +# { +# "current": { +# "isNone": true, +# "selected": false, +# "text": "None", +# "value": "" +# }, +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "definition": "label_values(kube_node_info,cluster)", +# "hide": 0, +# "includeAll": false, +# "multi": false, +# "name": "cluster", +# "options": [], +# "query": { +# "qryType": 1, +# "query": "label_values(kube_node_info,cluster)", +# "refId": "PrometheusVariableQueryEditor-VariableQuery" +# }, +# "refresh": 1, +# "regex": "", +# "skipUrlSync": false, +# "sort": 1, +# "type": "query" +# }, +# { +# "current": { +# "selected": true, +# "text": [ +# "All" +# ], +# "value": [ +# "$__all" +# ] +# }, +# "datasource": { +# "type": "prometheus", +# "uid": "${datasource}" +# }, +# "definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +# "hide": 0, +# "includeAll": true, +# "multi": true, +# "name": "namespace", +# "options": [], +# "query": { +# "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", +# "refId": "StandardVariableQuery" +# }, +# "refresh": 1, +# "regex": "", +# "skipUrlSync": false, +# "sort": 1, +# "type": "query" +# }, +# { +# "current": { +# "selected": true, +# "text": "30s", +# "value": "30s" +# }, +# "hide": 0, +# "includeAll": false, +# "multi": false, +# "name": "resolution", +# "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" +# } +# ], +# "query": "1s, 15s, 30s, 1m, 3m, 5m", +# "queryValue": "", +# "skipUrlSync": false, +# "type": "custom" +# } +# ] +# }, +# "time": { +# "from": "now-1h", +# "to": "now" +# }, +# "timepicker": {}, +# "timezone": "", +# "title": "Trivy Operator - Vulnerabilities", +# "uid": "security_trivy_operator", +# "version": 12, +# "weekStart": "" +# } +#kind: ConfigMap +#metadata: +# annotations: +# grafana_folder: Kubernetes +# labels: +# grafana_dashboard: "1" +# name: dashboards-k8s-addons-trivy-operator +# namespace: prometheus +--- +apiVersion: v1 +data: + k8s-system-api-server.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.4.4" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern API Server 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 42, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value_and_name" + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "up{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - Health Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.width", + "value": 188 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 60, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "removed_release" + } + ] + }, + "pluginVersion": "10.0.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "apiserver_requested_deprecated_apis{cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Deprecated Kubernetes Resources", + "transformations": [ + { + "id": "labelsToFields", + "options": { + "keepLabels": [ + "group", + "job", + "removed_release", + "resource", + "version", + "name" + ], + "mode": "columns" + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "job": true + }, + "indexByName": { + "Time": 6, + "Value": 7, + "group": 1, + "job": 5, + "namespace": 0, + "removed_release": 4, + "resource": 3, + "version": 2 + }, + "renameByName": {} + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "group": { + "aggregations": [ + "lastNotNull" + ], + "operation": "groupby" + }, + "job": { + "aggregations": [], + "operation": "groupby" + }, + "namespace": { + "aggregations": [ + "lastNotNull" + ], + "operation": "groupby" + }, + "removed_release": { + "aggregations": [], + "operation": "groupby" + }, + "resource": { + "aggregations": [ + "lastNotNull" + ], + "operation": "groupby" + }, + "version": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 8 + }, + "id": 38, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum by (code) (rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "{{`{{ code }}`}}", + "refId": "A" + } + ], + "title": "API Server - HTTP Requests by code", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 8 + }, + "id": 39, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum by (verb) (rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "{{`{{ verb}}`}}", + "refId": "A" + } + ], + "title": "API Server - HTTP Requests by verb", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(apiserver_request_duration_seconds_sum{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])) by (instance)\n/\nsum(rate(apiserver_request_duration_seconds_count{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - HTTP Requests Latency by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 54, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(apiserver_request_duration_seconds_sum{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])) by (verb)\n/\nsum(rate(apiserver_request_duration_seconds_count{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])) by (verb)", + "interval": "$resolution", + "legendFormat": "{{`{{ verb }}`}}", + "refId": "A" + } + ], + "title": "API Server - HTTP Requests Latency by verb", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 24 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum by(instance) (rate(apiserver_request_total{code=~\"5..\", job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval]))\n / sum by(instance) (rate(apiserver_request_total{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - Errors by Instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 24 + }, + "id": 51, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum by(verb) (rate(apiserver_request_total{code=~\"5..\",job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval]))\n / sum by(verb) (rate(apiserver_request_total{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "{{`{{ verb }}`}}", + "refId": "A" + } + ], + "title": "API Server - Errors by verb", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 0, + "y": 32 + }, + "id": 40, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(apiserver_request_total{cluster=~\"$cluster\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - Stacked HTTP Requests by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 32 + }, + "id": 56, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(workqueue_depth{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - Work Queue by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 40 + }, + "id": 47, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "rate(process_cpu_seconds_total{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}[$__rate_interval])", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - CPU Usage by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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": 40 + }, + "id": 48, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "process_resident_memory_bytes{job=~\"kubernetes-apiservers|apiserver\", cluster=~\"$cluster\"}", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "API Server - Memory Usage by instance", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 38, + "style": "dark", + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / System / API Server", + "uid": "k8s_system_apisrv", + "version": 17, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-system-api-server + namespace: prometheus +--- +apiVersion: v1 +data: + k8s-system-coredns.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.4.4" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern CoreDNS 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 25, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "vertical", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "value_and_name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "up{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - Health Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 3 + }, + "id": 19, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "rate(process_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - CPU Usage by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 3 + }, + "id": 21, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "process_resident_memory_bytes{job=~\"$job\", instance=~\"$instance\", cluster=~\"$cluster\"}", + "interval": "", + "legendFormat": "{{`{{ instance }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - Memory Usage by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 11 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "total $protocol requests", + "refId": "A" + } + ], + "title": "CoreDNS - Total DNS Requests ($protocol)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 11 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_dns_request_size_bytes_sum{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval])) by (proto) / sum(rate(coredns_dns_request_size_bytes_count{instance=~\"$instance\",proto=\"$protocol\", cluster=~\"$cluster\"}[$__rate_interval])) by (proto)", + "interval": "$resolution", + "legendFormat": "average $protocol packet size", + "refId": "A" + } + ], + "title": "CoreDNS - Average Packet Size ($protocol)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 19 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_dns_requests_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", + "interval": "$resolution", + "legendFormat": "{{`{{ type }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - Requests by type", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 19 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_dns_responses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)", + "interval": "$resolution", + "legendFormat": "{{`{{ rcode }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - Requests by return code", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 27 + }, + "id": 23, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_forward_requests_total{cluster=~\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "total forward requests", + "refId": "A" + } + ], + "title": "CoreDNS - Total Forward Requests", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 27 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_forward_responses_total{rcode=~\"SERVFAIL|REFUSED\", cluster=~\"$cluster\"}[$__rate_interval])) by (rcode)", + "interval": "$resolution", + "legendFormat": "{{`{{ rcode }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - DNS Errors", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 35 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_cache_hits_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", + "interval": "$resolution", + "legendFormat": "{{`{{ type }}`}}", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(coredns_cache_misses_total{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (type)", + "interval": "$resolution", + "legendFormat": "misses", + "refId": "B" + } + ], + "title": "CoreDNS - Cache Hits / Misses", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 35 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(coredns_cache_entries{cluster=~\"$cluster\"}) by (type)", + "interval": "", + "legendFormat": "{{`{{ type }}`}}", + "refId": "A" + } + ], + "title": "CoreDNS - Cache Size", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 43 + }, + "id": 27, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdYlBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(coredns_dns_request_duration_seconds_bucket{instance=~\"$instance\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{`{{le}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CoreDNS - DNS request duration", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 43 + }, + "id": 28, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdYlBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "decbytes" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(coredns_dns_request_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{`{{le}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CoreDNS - DNS request size", + "type": "heatmap" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 53 + }, + "id": 29, + "options": { + "calculate": false, + "cellGap": 1, + "color": { + "exponent": 0.5, + "fill": "dark-orange", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "RdYlBu", + "steps": 64 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "reverse": false, + "unit": "decbytes" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(increase(coredns_dns_response_size_bytes_bucket{instance=~\"$instance\", le!=\"0\", cluster=~\"$cluster\"}[$__rate_interval])) by (le)", + "format": "heatmap", + "legendFormat": "{{`{{le}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CoreDNS - DNS response size", + "type": "heatmap" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", + "hide": 0, + "includeAll": true, + "label": "", + "multi": false, + "name": "instance", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(up{job=\"$job\", cluster=\"$cluster\"},instance)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": "udp,tcp", + "current": { + "selected": false, + "text": "udp", + "value": "udp" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "protocol", + "options": [], + "query": { + "query": "label_values(coredns_dns_requests_total{cluster=\"$cluster\"}, proto)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": true, + "text": [ + "coredns" + ], + "value": [ + "coredns" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(coredns_build_info{cluster=\"$cluster\"},job)", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(coredns_build_info{cluster=\"$cluster\"},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / System / CoreDNS", + "uid": "k8s_system_coredns", + "version": 18, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-system-coredns + namespace: prometheus +--- +apiVersion: v1 +data: + k8s-views-global.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "bargauge", + "name": "Bar gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.3.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern 'Global 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 67, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 77, + "options": { + "displayMode": "lcd", + "maxVizHeight": 300, + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])))", + "interval": "", + "legendFormat": "Real Linux", + "range": true, + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (core) (rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval])))", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", cluster=\"$cluster\"}) / sum(machine_cpu_cores{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "Requests" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", cluster=\"$cluster\"}) / sum(machine_cpu_cores{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "Limits" + } + ], + "title": "Global CPU Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "indexByName": { + "Limits": 5, + "Real": 1, + "Real Linux": 2, + "Real Windows": 3, + "Requests": 4, + "Time": 0 + }, + "renameByName": {} + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 78, + "options": { + "displayMode": "lcd", + "maxVizHeight": 300, + "minVizHeight": 10, + "minVizWidth": 0, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "text": {}, + "valueMode": "color" + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"})", + "hide": false, + "interval": "", + "legendFormat": "Real Linux", + "range": true, + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_memory_available_bytes{cluster=\"$cluster\"} + windows_memory_cache_bytes{cluster=\"$cluster\"}) / sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{resource=\"memory\", cluster=\"$cluster\"}) / sum(machine_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "Requests" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{resource=\"memory\", cluster=\"$cluster\"}) / sum(machine_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "Limits" + } + ], + "title": "Global RAM Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "includeByName": {}, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0 + }, + "renameByName": {} + } + } + ], + "type": "bargauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 12, + "y": 1 + }, + "id": 63, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "count(count by (node) (kube_node_info{cluster=\"$cluster\"}))", + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Nodes", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 12, + "w": 10, + "x": 14, + "y": 1 + }, + "id": 52, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kube_namespace_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Namespaces", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_container_status_running{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Running Containers", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_status_phase{phase=\"Running\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Running Pods", + "refId": "O" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_service_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Services", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_endpoint_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Endpoints", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_ingress_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Ingresses", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_deployment_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Deployments", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_statefulset_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Statefulsets", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_daemonset_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Daemonsets", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_persistentvolumeclaim_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Persistent Volume Claims", + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_hpa_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Horizontal Pod Autoscalers", + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_configmap_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Configmaps", + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_secret_info{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Secrets", + "refId": "L" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_networkpolicy_labels{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Network Policies", + "refId": "M" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "count(count by (node) (kube_node_info{cluster=\"$cluster\"}))", + "hide": false, + "interval": "", + "legendFormat": "Nodes", + "refId": "N" + } + ], + "title": "Kubernetes Resource Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 12, + "y": 5 + }, + "id": 59, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "count(kube_namespace_created{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Namespaces", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "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": 9 + }, + "id": 37, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Real Linux", + "range": true, + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{resource=\"cpu\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "Requests" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{resource=\"cpu\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "Limits" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(machine_cpu_cores{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Total", + "range": true, + "refId": "Total" + } + ], + "title": "CPU Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true, + "Total Linux": true, + "Total Windows": true + }, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0, + "Total": 8, + "Total Linux": 6, + "Total Windows": 7 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "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": 9 + }, + "id": 39, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"})", + "interval": "", + "legendFormat": "Real Linux", + "range": true, + "refId": "Real Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"} - windows_memory_cache_bytes{cluster=\"$cluster\"})", + "hide": false, + "interval": "", + "legendFormat": "Real Windows", + "range": true, + "refId": "Real Windows" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{resource=\"memory\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "Requests" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{resource=\"memory\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "Limits" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(machine_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Total", + "range": true, + "refId": "Total" + } + ], + "title": "RAM Usage", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Real", + "mode": "reduceRow", + "reduce": { + "include": [ + "Real Linux", + "Real Windows" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Real Linux": true, + "Real Windows": true, + "Time": true + }, + "includeByName": {}, + "indexByName": { + "Limits": 5, + "Real": 3, + "Real Linux": 1, + "Real Windows": 2, + "Requests": 4, + "Time": 0, + "Total": 6 + }, + "renameByName": {} + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 2, + "x": 12, + "y": 9 + }, + "id": 62, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_status_phase{phase=\"Running\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Running Pods", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 13 + }, + "id": 71, + "panels": [], + "title": "Resources", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd", + "seriesBy": "last" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU %", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "scheme", + "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": "yellow", + "value": 0.5 + }, + { + "color": "red", + "value": 0.7 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 72, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])))", + "interval": "$resolution", + "legendFormat": "Linux", + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "1 - avg(rate(windows_cpu_time_total{cluster=\"$cluster\",mode=\"idle\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows", + "range": true, + "refId": "Windows" + } + ], + "title": "Cluster CPU Utilization", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "CPU usage in %", + "mode": "reduceRow", + "reduce": { + "reducer": "mean" + }, + "replaceFields": true + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "MEMORY", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "scheme", + "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": "#EAB839", + "value": 0.5 + }, + { + "color": "red", + "value": 0.7 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 55, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "hidden", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"})", + "interval": "$resolution", + "legendFormat": "Linux", + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"}) / sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows", + "range": true, + "refId": "Windows" + } + ], + "title": "Cluster Memory Utilization", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Memory usage in %", + "mode": "reduceRow", + "reduce": { + "reducer": "mean" + }, + "replaceFields": true + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU CORES", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 46, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "10.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_cpu_usage_seconds_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", + "format": "time_series", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ namespace }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Utilization by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 22 + }, + "id": 50, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{image!=\"\", cluster=\"$cluster\"}) by (namespace)\n+ on (namespace)\n(sum(windows_container_memory_usage_commit_bytes{container_id!=\"\", cluster=\"$cluster\"} * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", + "interval": "$resolution", + "legendFormat": "{{`{{ namespace }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory Utilization by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU %", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 30 + }, + "id": 54, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))) by (instance)", + "interval": "$resolution", + "legendFormat": "{{`{{ node }}`}}", + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "avg(sum by (instance,core) (rate(windows_cpu_time_total{mode!=\"idle\", cluster=\"$cluster\"}[$__rate_interval]))) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ node }}`}}", + "range": true, + "refId": "Windows" + } + ], + "title": "CPU Utilization by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "MEMORY", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 30 + }, + "id": 73, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "range": true, + "refId": "Linux" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(windows_os_visible_memory_bytes{cluster=\"$cluster\"} - windows_memory_available_bytes{cluster=\"$cluster\"}) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "range": true, + "refId": "Windows" + } + ], + "title": "Memory Utilization by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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": "SECONDS", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 38 + }, + "id": 82, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace) > 0", + "interval": "$resolution", + "legendFormat": "{{`{{ namespace }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Throttled seconds by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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": "NB", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 38 + }, + "id": 83, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_cpu_core_throttles_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "{{`{{ instance }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Core Throttled by instance", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 86, + "panels": [], + "title": "Kubernetes", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 47 + }, + "id": 84, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kube_pod_status_qos_class{cluster=\"$cluster\"}) by (qos_class)", + "interval": "", + "legendFormat": "{{`{{ qos_class }}`}} pods", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_info{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Total pods", + "range": true, + "refId": "B" + } + ], + "title": "Kubernetes Pods QoS classes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 47 + }, + "id": 85, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kube_pod_status_reason{cluster=\"$cluster\"}) by (reason)", + "interval": "", + "legendFormat": "{{`{{ reason }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Kubernetes Pods Status Reason", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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, + "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": 56 + }, + "id": 87, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(container_oom_events_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace) > 0", + "interval": "", + "legendFormat": "{{`{{ namespace }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "OOM Events by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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, + "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": 56 + }, + "id": 88, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(kube_pod_container_status_restarts_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace) > 0", + "interval": "", + "legendFormat": "{{`{{ namespace }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Container Restarts by namespace", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 69, + "panels": [], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Dropped noisy virtual devices for readability.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 0, + "y": 66 + }, + "id": 44, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (device)", + "interval": "$resolution", + "legendFormat": "Received : {{`{{ device }}`}}", + "range": true, + "refId": "Linux Received" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (device)", + "interval": "$resolution", + "legendFormat": "Transmitted : {{`{{ device }}`}}", + "range": true, + "refId": "Linux Transmitted" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{cluster=\"$cluster\"}[$__rate_interval])) by (nic)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received : {{`{{ nic }}`}}", + "range": true, + "refId": "Windows Received" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_bytes_sent_total{cluster=\"$cluster\"}[$__rate_interval])) by (nic)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted : {{`{{ device }}`}}", + "range": true, + "refId": "Windows Transmitted" + } + ], + "title": "Global Network Utilization by device", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "DROPPED PACKETS", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 12, + "y": 66 + }, + "id": 53, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_drop_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Linux Packets dropped (receive)", + "range": true, + "refId": "Linux Packets dropped (receive)" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_drop_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Linux Packets dropped (transmit)", + "range": true, + "refId": "Linux Packets dropped (transmit)" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_packets_received_discarded_total{cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows Packets dropped (receive)", + "range": true, + "refId": "Windows Packets dropped (receive)" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_packets_outbound_discarded_total{cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Windows Packets dropped (transmit)", + "range": true, + "refId": "Windows Packets dropped (transmit)" + } + ], + "title": "Network Saturation - Packets dropped", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Packets dropped (receive)", + "mode": "reduceRow", + "reduce": { + "include": [ + "Linux Packets dropped (receive)", + "Windows Packets dropped (receive)" + ], + "reducer": "mean" + } + } + }, + { + "id": "calculateField", + "options": { + "alias": "Packets dropped (transmit)", + "mode": "reduceRow", + "reduce": { + "include": [ + "Linux Packets dropped (transmit)", + "Windows Packets dropped (transmit)" + ], + "reducer": "mean" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Linux Packets dropped (receive)": true, + "Linux Packets dropped (transmit)": true, + "Time": false, + "Windows Packets dropped (receive)": true, + "Windows Packets dropped (transmit)": true + }, + "includeByName": {}, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 0, + "y": 74 + }, + "id": 79, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_network_receive_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_network_receive_bytes_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace))", + "interval": "$resolution", + "legendFormat": "Received : {{`{{ namespace }}`}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- (sum(rate(container_network_transmit_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (namespace)\n+ on (namespace)\n(sum(rate(windows_container_network_transmit_bytes_total{container_id!=\"\", cluster=\"$cluster\"}[$__rate_interval]) * on (container_id) group_left (container, pod, namespace) max by ( container, container_id, pod, namespace) (kube_pod_container_info{container_id!=\"\", cluster=\"$cluster\"}) OR kube_namespace_created{cluster=\"$cluster\"} * 0) by (namespace)))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted : {{`{{ namespace }}`}}", + "range": true, + "refId": "B" + } + ], + "title": "Network Received by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 74 + }, + "id": 80, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_bytes_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "Received bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "Linux Received bytes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- sum(rate(node_network_transmit_bytes_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "Linux Transmitted bytes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "Windows Received bytes" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- sum(rate(windows_net_bytes_sent_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "Windows Transmitted bytes" + } + ], + "title": "Total Network Received (with all virtual devices) by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Dropped noisy virtual devices for readability.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 0, + "y": 82 + }, + "id": 56, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "Received bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(windows_net_bytes_received_total{nic!~\".*Virtual.*\",cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Received bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(windows_net_bytes_sent_total{nic!~\".*Virtual.*\",cluster=\"$cluster\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "D" + } + ], + "title": "Network Received (without loopback) by instance", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Dropped noisy virtual devices for readability.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 82 + }, + "id": 81, + "options": { + "legend": { + "calcs": [], + "displayMode": "hidden", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_bytes_total{device=\"lo\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "interval": "$resolution", + "legendFormat": "Received bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "- sum(rate(node_network_transmit_bytes_total{device=\"lo\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)", + "hide": false, + "interval": "$resolution", + "legendFormat": "Transmitted bytes in {{`{{ instance }}`}}", + "range": true, + "refId": "B" + } + ], + "title": "Network Received (loopback only) by instance", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(node_cpu_seconds_total{cluster=\"$cluster\"},job)", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(node_cpu_seconds_total{cluster=\"$cluster\"},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / Views / Global", + "uid": "k8s_views_global", + "version": 39, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-views-global + namespace: prometheus +--- +apiVersion: v1 +data: + k8s-views-namespaces.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.3.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 38, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "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", + "unitScale": true + }, + "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": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) / sum(machine_cpu_cores{cluster=\"$cluster\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "range": false, + "refId": "A" + } + ], + "title": "Namespace(s) usage on total cluster CPU in %", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "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", + "unitScale": true + }, + "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": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\", cluster=\"$cluster\"}) / sum(machine_memory_bytes{cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Namespace(s) usage on total cluster RAM in %", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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", + "unitScale": true + }, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Running Pods", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_service_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Services", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_ingress_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Ingresses", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_deployment_labels{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Deployments", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_statefulset_labels{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Statefulsets", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_daemonset_labels{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Daemonsets", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_persistentvolumeclaim_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Persistent Volume Claims", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_hpa_labels{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Horizontal Pod Autoscalers", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_configmap_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Configmaps", + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_secret_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Secrets", + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_networkpolicy_labels{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Network Policies", + "refId": "K" + } + ], + "title": "Kubernetes Resource Count", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 8 + }, + "id": 62, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "", + "legendFormat": "Real", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\", resource=\"cpu\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\", resource=\"cpu\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(machine_cpu_cores{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Cluster Total", + "range": true, + "refId": "D" + } + ], + "title": "Namespace(s) CPU Usage in cores", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 8 + }, + "id": 64, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Real", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_requests{namespace=~\"$namespace\", resource=\"memory\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Requests", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_resource_limits{namespace=~\"$namespace\", resource=\"memory\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Limits", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(machine_memory_bytes{cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Cluster Total", + "range": true, + "refId": "D" + } + ], + "title": "Namespace(s) RAM Usage in bytes", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 40, + "panels": [], + "title": "Resources", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU CORES", + "axisPlacement": "auto", + "barAlignment": 0, + "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", + "unitScale": true + }, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\", cluster=\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU usage by Pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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", + "unitScale": true + }, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\", cluster=\"$cluster\"}) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory usage by Pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "SECONDS", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", image!=\"\", pod=~\"${created_by}.*\", cluster=\"$cluster\"}[$__rate_interval])) by (pod) > 0", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Throttled seconds by pod", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 73, + "panels": [], + "title": "Kubernetes", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kube_pod_status_qos_class{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (qos_class)", + "interval": "", + "legendFormat": "{{`{{ qos_class }}`}} pods", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_info{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "hide": false, + "legendFormat": "Total pods", + "range": true, + "refId": "B" + } + ], + "title": "Kubernetes Pods QoS classes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kube_pod_status_reason{cluster=\"$cluster\"}) by (reason)", + "interval": "", + "legendFormat": "{{`{{ reason }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Kubernetes Pods Status Reason", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(container_oom_events_total{namespace=~\"${namespace}\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace, pod) > 0", + "interval": "", + "legendFormat": "namespace: {{`{{ namespace }}`}} - pod: {{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "OOM Events by namespace, pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "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, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", cluster=\"$cluster\"}[$__rate_interval])) by (namespace, pod) > 0", + "interval": "", + "legendFormat": "namespace: {{`{{ namespace }}`}} - pod: {{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Container Restarts by namespace, pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_status_ready{namespace=~\"$namespace\", pod=~\"${created_by}.*\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Ready", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_status_running{namespace=~\"$namespace\", pod=~\"${created_by}.*\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Running", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_container_status_waiting{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Waiting", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_container_status_restarts_total{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Restarts Total", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "expr": "sum(kube_pod_container_status_terminated{namespace=~\"$namespace\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "Terminated", + "refId": "E" + } + ], + "title": "Nb of pods by state", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_pod_container_info{namespace=~\"$namespace\", pod=~\"${created_by}.*\", cluster=\"$cluster\"}) by (pod)", + "interval": "", + "legendFormat": "{{`{{ pod }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Nb of containers by pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kube_deployment_status_replicas_available{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (deployment)", + "interval": "", + "legendFormat": "{{`{{ deployment }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas available by deployment", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(kube_deployment_status_replicas_unavailable{namespace=~\"$namespace\", pod=~\"${created_by}.*\", cluster=\"$cluster\"}) by (deployment)", + "interval": "", + "legendFormat": "{{`{{ deployment }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Replicas unavailable by deployment", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 42, + "panels": [], + "title": "Kubernetes Storage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 65 + }, + "id": 65, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "refId": "A" + } + ], + "title": "Persistent Volumes - Capacity and usage in %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 65 + }, + "id": 66, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}} - Used", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kubelet_volume_stats_capacity_bytes{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "hide": false, + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}} - Capacity", + "refId": "B" + } + ], + "title": "Persistent Volumes - Capacity and usage in bytes", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 73 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "1 - sum(kubelet_volume_stats_inodes_used{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_inodes{namespace=~\"$namespace\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "refId": "A" + } + ], + "title": "Persistent Volumes - Inodes", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info{namespace=~\"$namespace\", container!=\"\", cluster=\"$cluster\"},created_by_name)", + "description": "Can be used to filter on a specific deployment, statefulset or deamonset (only relevant panels).", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "created_by", + "options": [], + "query": { + "query": "label_values(kube_pod_info{namespace=~\"$namespace\", container!=\"\", cluster=\"$cluster\"},created_by_name)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / Views / Namespaces", + "uid": "k8s_views_ns", + "version": 34, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-views-namespaces + namespace: prometheus +--- +apiVersion: v1 +data: + k8s-views-nodes.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.3.1" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern 'Nodes 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 40, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "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", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 7, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto", + "text": {} + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": false, + "expr": "avg(sum by (cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])))", + "instant": true, + "interval": "$resolution", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "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", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 13, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto", + "text": {} + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": false, + "expr": "sum(node_memory_MemTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{instance=\"$instance\", cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"})", + "instant": true, + "interval": "$resolution", + "legendFormat": "", + "refId": "A" + } + ], + "title": "RAM Usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 24, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kube_pod_info{node=\"$node\", cluster=\"$cluster\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Pods on node", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "links": [ + { + "targetBlank": true, + "title": "Pod details", + "url": "/d/k8s_views_pods/kubernetes-views-pods?${datasource:queryparam}&var-namespace=${__data.fields.namespace}&var-pod=${__data.fields.pod}&${resolution:queryparam}&${__url_time_range}" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unitScale": true + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "pod" + }, + "properties": [ + { + "id": "custom.width", + "value": 416 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "priority_class" + }, + "properties": [ + { + "id": "custom.width", + "value": 176 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pod_ip" + }, + "properties": [ + { + "id": "custom.width", + "value": 157 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "created_by_kind" + }, + "properties": [ + { + "id": "custom.width", + "value": 205 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 263 + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 5, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "kube_pod_info{node=\"$node\", cluster=\"$cluster\"}", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "List of pods on node ($node)", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "container": true, + "created_by_kind": false, + "created_by_name": true, + "endpoint": true, + "env": true, + "host_ip": true, + "host_network": true, + "instance": true, + "job": true, + "node": true, + "project": true, + "prometheus_replica": true, + "service": true, + "uid": true + }, + "indexByName": { + "Time": 6, + "Value": 20, + "__name__": 7, + "container": 8, + "created_by_kind": 2, + "created_by_name": 9, + "endpoint": 10, + "env": 11, + "host_ip": 5, + "host_network": 12, + "instance": 13, + "job": 14, + "namespace": 1, + "node": 15, + "pod": 0, + "pod_ip": 3, + "priority_class": 4, + "project": 16, + "prometheus_replica": 17, + "service": 18, + "uid": 19 + }, + "renameByName": {} + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "created_by_kind": { + "aggregations": [], + "operation": "groupby" + }, + "host_ip": { + "aggregations": [], + "operation": "groupby" + }, + "namespace": { + "aggregations": [ + "last" + ], + "operation": "groupby" + }, + "pod": { + "aggregations": [], + "operation": "groupby" + }, + "pod_ip": { + "aggregations": [], + "operation": "groupby" + }, + "priority_class": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "decimals": 3, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 0, + "y": 9 + }, + "id": 9, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": false, + "expr": "sum(rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "instant": true, + "interval": "$resolution", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Used", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 2, + "y": 9 + }, + "id": 11, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(machine_cpu_cores{node=\"$node\", cluster=\"$cluster\"})", + "interval": "$resolution", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 4, + "y": 9 + }, + "id": 15, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": false, + "expr": "sum(node_memory_MemTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{instance=\"$instance\", cluster=\"$cluster\"})", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "RAM Used", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 6, + "y": 9 + }, + "id": 17, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "machine_memory_bytes{node=\"$node\", cluster=\"$cluster\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "RAM Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 25228800 + }, + { + "color": "red", + "value": 31536000 + } + ] + }, + "unit": "s", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 9 + }, + "id": 18, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_time_seconds{instance=\"$instance\", cluster=\"$cluster\"} - node_boot_time_seconds{instance=\"$instance\", cluster=\"$cluster\"}", + "instant": false, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "uptime", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 38, + "panels": [], + "title": "Resources", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + } + }, + "mappings": [], + "max": 100, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "avg(rate(node_cpu_seconds_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]) * 100) by (mode)", + "hide": false, + "instant": false, + "interval": "$resolution", + "legendFormat": "{{`{{ mode }}`}}", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_MemTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"} - node_memory_MemFree_bytes{instance=\"$instance\", cluster=\"$cluster\"} - (node_memory_Cached_bytes{instance=\"$instance\", cluster=\"$cluster\"} + node_memory_Buffers_bytes{instance=\"$instance\", cluster=\"$cluster\"})", + "instant": false, + "interval": "$resolution", + "legendFormat": "RAM Used", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_MemTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "RAM Total", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_Cached_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "RAM Cache", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_Buffers_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "RAM Buffer", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_MemFree_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "RAM Free", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_SwapTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"} - node_memory_SwapFree_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "SWAP Used", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "node_memory_SwapTotal_bytes{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "SWAP Total", + "refId": "G" + } + ], + "title": "Memory Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{node=\"$node\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}}", + "refId": "A" + } + ], + "title": "CPU usage by Pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 28, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{node=\"$node\", image!=\"\", cluster=\"$cluster\"}) by (pod)", + "interval": "$resolution", + "legendFormat": "{{`{{ pod }}`}}", + "refId": "A" + } + ], + "title": "Memory usage by Pod", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Number of times a CPU core has been throttled on an instance.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU CORES", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 66, + "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", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_cpu_core_throttles_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Nb of cpu core throttles", + "range": true, + "refId": "A" + } + ], + "title": "Number of CPU Core Throttled", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 44, + "panels": [], + "title": "System", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 48, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_load1{instance=\"$instance\", cluster=\"$cluster\"}", + "interval": "$resolution", + "legendFormat": "1m", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_load5{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "5m", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_load15{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "15m", + "range": true, + "refId": "C" + } + ], + "title": "System Load", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 46, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_context_switches_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "interval": "$resolution", + "intervalFactor": 1, + "legendFormat": "Context switches", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_intr_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "hide": false, + "interval": "$resolution", + "legendFormat": "Interrupts", + "range": true, + "refId": "B" + } + ], + "title": "Context Switches & Interrupts", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "id": 49, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_filefd_maximum{instance=\"$instance\", cluster=\"$cluster\"}", + "instant": false, + "interval": "$resolution", + "legendFormat": "Maximum file descriptors", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_filefd_allocated{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "instant": false, + "interval": "$resolution", + "legendFormat": "Allocated file descriptors", + "refId": "B" + } + ], + "title": "File Descriptors", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 47 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_timex_estimated_error_seconds{instance=\"$instance\", cluster=\"$cluster\"}", + "instant": false, + "interval": "$resolution", + "intervalFactor": 1, + "legendFormat": "Estimated error in seconds", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_timex_maxerror_seconds{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "intervalFactor": 1, + "legendFormat": "Maximum error in seconds", + "range": true, + "refId": "B" + } + ], + "title": "Time Sync", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 55 + }, + "id": 36, + "panels": [], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "BANDWIDTH", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 25, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 56 + }, + "id": 20, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_bytes_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "In", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_bytes_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Out", + "range": true, + "refId": "B" + } + ], + "title": "Network usage (bytes)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 56 + }, + "id": 61, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(node_network_receive_errs_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "In", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_errs_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Out", + "range": true, + "refId": "B" + } + ], + "title": "Network errors", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "pps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 64 + }, + "id": 62, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(node_network_receive_packets_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "In", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_packets_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Out", + "range": true, + "refId": "B" + } + ], + "title": "Network usage (packet/s)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 64 + }, + "id": 64, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(node_network_receive_drop_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "In", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "- sum(rate(node_network_transmit_drop_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]))", + "hide": false, + "interval": "$resolution", + "legendFormat": "Out", + "refId": "B" + } + ], + "title": "Network total drops", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 72 + }, + "id": 60, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_netstat_Tcp_CurrEstab{instance=\"$instance\", cluster=\"$cluster\"}", + "instant": false, + "interval": "$resolution", + "legendFormat": "TCP Currently Established", + "refId": "A" + } + ], + "title": "TCP Currently Established", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "NF Conntrack limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 72 + }, + "id": 63, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_nf_conntrack_entries{instance=\"$instance\", cluster=\"$cluster\"}", + "instant": false, + "interval": "$resolution", + "legendFormat": "NF Conntrack entries", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "node_nf_conntrack_entries_limit{instance=\"$instance\", cluster=\"$cluster\"}", + "hide": false, + "interval": "$resolution", + "legendFormat": "NF Conntrack limit", + "range": true, + "refId": "B" + } + ], + "title": "NF Conntrack", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 80 + }, + "id": 54, + "panels": [], + "title": "Kubernetes Storage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 81 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_capacity_bytes{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "interval": "$resolution", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Persistent Volumes - Usage in %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "custom.width", + "value": 146 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total" + }, + "properties": [ + { + "id": "custom.width", + "value": 167 + } + ] + } + ] + }, + "gridPos": { + "h": 16, + "w": 12, + "x": 12, + "y": 81 + }, + "id": 34, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.2.2", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kubelet_volume_stats_used_bytes{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "format": "table", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(kubelet_volume_stats_capacity_bytes{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim)", + "format": "table", + "hide": false, + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Persistent Volumes - Usage in GB", + "transformations": [ + { + "id": "groupBy", + "options": { + "fields": { + "Value": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "Value #A": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "Value #B": { + "aggregations": [ + "lastNotNull" + ], + "operation": "aggregate" + }, + "persistentvolumeclaim": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "seriesToColumns", + "options": { + "byField": "persistentvolumeclaim" + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #A (lastNotNull)": "Used", + "Value #B (lastNotNull)": "Total", + "persistentvolumeclaim": "Persistent Volume Claim" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 89 + }, + "id": 32, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(kubelet_volume_stats_inodes_used{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim) / sum(kubelet_volume_stats_inodes{node=\"$node\", cluster=\"$cluster\"}) by (persistentvolumeclaim) * 100", + "interval": "$resolution", + "legendFormat": "{{`{{ persistentvolumeclaim }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Persistent Volumes - Inodes", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 97 + }, + "id": 42, + "panels": [], + "title": "Node Storage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 98 + }, + "id": 33, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "100 - ((node_filesystem_avail_bytes{instance=\"$instance\", cluster=\"$cluster\"} * 100) / node_filesystem_size_bytes{instance=\"$instance\", cluster=\"$cluster\"})", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ mountpoint }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "FS usage in %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 98 + }, + "id": 59, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "100 - (node_filesystem_files_free{instance=\"$instance\", cluster=\"$cluster\"} / node_filesystem_files{instance=\"$instance\", cluster=\"$cluster\"} * 100)", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{ mountpoint }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "FS inode usage in %", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 106 + }, + "id": 52, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_disk_read_bytes_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "interval": "$resolution", + "legendFormat": "{{`{{device}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Reads by disk (bytes)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 106 + }, + "id": 57, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_disk_written_bytes_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{device}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Writes by disk (bytes)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "read/s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 114 + }, + "id": 51, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_disk_reads_completed_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "interval": "$resolution", + "legendFormat": "{{`{{device}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Completed reads by disk", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "write/s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 114 + }, + "id": 56, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_disk_writes_completed_total{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval])", + "hide": false, + "interval": "$resolution", + "legendFormat": "{{`{{device}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Completed writes by disk", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "io/s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 122 + }, + "id": 58, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "rate(node_disk_io_now{instance=\"$instance\", cluster=\"$cluster\"}[$__rate_interval]) ", + "interval": "$resolution", + "legendFormat": "{{`{{device}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Disk(s) io/s", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 122 + }, + "id": 55, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(node_filesystem_device_error{instance=\"$instance\", cluster=\"$cluster\"}) by (mountpoint)", + "interval": "$resolution", + "legendFormat": "{{`{{ mountpoint }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "FS - Device Errors", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": {}, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info{cluster=\"$cluster\"}, node)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "node", + "options": [], + "query": { + "query": "label_values(kube_node_info{cluster=\"$cluster\"}, node)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(node_uname_info{nodename=~\"(?i:($node))\"}, instance)", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(node_uname_info{nodename=~\"(?i:($node))\"}, instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / Views / Nodes", + "uid": "k8s_views_nodes", + "version": 29, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-views-nodes + namespace: prometheus +--- +apiVersion: v1 +data: + k8s-views-pods.json: | + { + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.3.4" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "gauge", + "name": "Gauge", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "This is a modern 'Pods 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", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 43, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Information", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ created_by_kind }}`}}: {{`{{ created_by_name }}`}}", + "refId": "A" + } + ], + "title": "Created by", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "links": [ + { + "title": "", + "url": "/d/k8s_views_nodes/kubernetes-views-nodes?var-datasource=${datasource}&var-node=${__data.fields.node}" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 33, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ node }}`}}", + "refId": "A" + } + ], + "title": "Running on", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 41, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ pod_ip }}`}}", + "refId": "A" + } + ], + "title": "Pod IP", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 5, + "x": 0, + "y": 3 + }, + "id": 52, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_info{namespace=\"$namespace\", pod=\"$pod\", priority_class!=\"\", cluster=\"$cluster\"}", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ priority_class }}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Priority Class", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Burstable" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "BestEffort" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 2, + "w": 7, + "x": 5, + "y": 3 + }, + "id": 53, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_status_qos_class{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"} > 0", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ qos_class }}`}}", + "refId": "A" + } + ], + "title": "QOS Class", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 12, + "y": 3 + }, + "id": 56, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "name", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_container_status_last_terminated_reason{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "{{`{{ reason }}`}}", + "refId": "A" + } + ], + "title": "Last Terminated Reason", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "Panel only works when a single pod is selected.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + }, + { + "color": "red", + "value": 1 + }, + { + "color": "#EAB839", + "value": 2 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 2, + "w": 6, + "x": 18, + "y": 3 + }, + "id": 57, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showPercentChange": false, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "kube_pod_container_status_last_terminated_exitcode{namespace=\"$namespace\", pod=\"$pod\", cluster=\"$cluster\"}", + "instant": true, + "interval": "", + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Last Terminated Exit Code", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 47, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Resources", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 75 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 0, + "y": 6 + }, + "id": 39, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"})", + "instant": true, + "interval": "$resolution", + "legendFormat": "Requests", + "refId": "A" + } + ], + "title": "Total pod CPU Requests usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 75 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 3, + "y": 6 + }, + "id": 48, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"})", + "instant": true, + "interval": "$resolution", + "legendFormat": "Limits", + "refId": "A" + } + ], + "title": "Total pod CPU Limits usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "blue", + "value": null + }, + { + "color": "#EAB839", + "value": 80 + }, + { + "color": "red", + "value": 99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 6, + "y": 6 + }, + "id": 40, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"})", + "instant": true, + "interval": "$resolution", + "legendFormat": "Requests", + "refId": "A" + } + ], + "title": "Total pod RAM Requests usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 75 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3, + "x": 9, + "y": 6 + }, + "id": 49, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "sizing": "auto" + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) ", + "instant": true, + "interval": "$resolution", + "legendFormat": "Limits", + "refId": "B" + } + ], + "title": "Total pod RAM Limits usage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false, + "minWidth": 100 + }, + "decimals": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Memory Requests" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory Limits" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory Used" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 38, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "F" + } + ], + "title": "Resources by container", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "container" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 4": true, + "__name__": true, + "__name__ 1": true, + "__name__ 2": true, + "__name__ 3": true, + "__name__ 4": true, + "container": false, + "endpoint": true, + "endpoint 2": true, + "endpoint 3": true, + "endpoint 4": true, + "instance": true, + "instance 2": true, + "instance 3": true, + "instance 4": true, + "job": true, + "job 2": true, + "job 3": true, + "job 4": true, + "namespace": true, + "namespace 2": true, + "namespace 3": true, + "namespace 4": true, + "node": true, + "node 2": true, + "node 3": true, + "node 4": true, + "pod": true, + "pod 2": true, + "pod 3": true, + "pod 4": true, + "resource 1": true, + "resource 2": true, + "resource 3": true, + "resource 4": true, + "service": true, + "service 2": true, + "service 3": true, + "service 4": true, + "uid 1": true, + "uid 2": true, + "uid 3": true, + "uid 4": true, + "unit 1": true, + "unit 2": true, + "unit 3": true, + "unit 4": true + }, + "indexByName": { + "Time 1": 7, + "Time 2": 8, + "Time 3": 9, + "Time 4": 10, + "Time 5": 11, + "Time 6": 12, + "Value #A": 2, + "Value #B": 3, + "Value #C": 5, + "Value #D": 6, + "Value #E": 1, + "Value #F": 4, + "container": 0 + }, + "renameByName": { + "Value #A": "CPU Requests", + "Value #B": "CPU Limits", + "Value #C": "Memory Requests", + "Value #D": "Memory Limits", + "Value #E": "CPU Used", + "Value #F": "Memory Used", + "container": "Container" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "area" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 20 + }, + { + "color": "green", + "value": 30 + }, + { + "color": "yellow", + "value": 70 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 50, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "interval": "$resolution", + "legendFormat": "{{`{{ container }}`}} REQUESTS", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"cpu\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "hide": false, + "legendFormat": "{{`{{ container }}`}} LIMITS", + "range": true, + "refId": "B" + } + ], + "title": "CPU Usage / Requests & Limits by container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "area" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 20 + }, + { + "color": "green", + "value": 30 + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 30, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) by (container) / sum(kube_pod_container_resource_requests{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "interval": "", + "legendFormat": "{{`{{ container }}`}} REQUESTS", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", cluster=\"$cluster\"}) by (container) / sum(kube_pod_container_resource_limits{namespace=\"$namespace\", pod=~\"$pod\", resource=\"memory\", job=~\"$job\", cluster=\"$cluster\"}) by (container)", + "hide": false, + "legendFormat": "{{`{{ container }}`}} LIMITS", + "range": true, + "refId": "B" + } + ], + "title": "Memory Usage / Requests & Limits by container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "CPU Cores", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 4, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#F2495C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "interval": "$resolution", + "legendFormat": "{{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Usage by container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Bytes", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 51, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}) by (container)", + "interval": "", + "legendFormat": "{{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory Usage by container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "SECONDS", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 30 + }, + "id": 59, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\", pod=~\"$pod\", image!=\"\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "interval": "$resolution", + "legendFormat": "{{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Throttled seconds by container", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 62, + "panels": [], + "title": "Kubernetes", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "area" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 20 + }, + { + "color": "green", + "value": 30 + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 60, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(container_oom_events_total{namespace=\"${namespace}\", pod=\"${pod}\", container!=\"\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "{{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "OOM Events by container", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "thresholds" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "area" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 20 + }, + { + "color": "green", + "value": 30 + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 61, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(increase(kube_pod_container_status_restarts_total{namespace=~\"${namespace}\", pod=\"${pod}\", container!=\"\", job=~\"$job\", cluster=\"$cluster\"}[$__rate_interval])) by (container)", + "interval": "", + "legendFormat": "{{`{{ container }}`}}", + "range": true, + "refId": "A" + } + ], + "title": "Container Restarts by container", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 47 + }, + "id": 45, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 0, + "y": 48 + }, + "id": 31, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Received", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Transmitted", + "refId": "B" + } + ], + "title": "Network - Bandwidth", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 48 + }, + "id": 34, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Received", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Transmitted", + "refId": "B" + } + ], + "title": "Network - Packets Rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 56 + }, + "id": 36, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Received", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Transmitted", + "refId": "B" + } + ], + "title": "Network - Packets Dropped", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 56 + }, + "id": 37, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "8.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Received", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "exemplar": true, + "expr": "- sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=~\"$pod\", cluster=\"$cluster\"}[$__rate_interval]))", + "interval": "$resolution", + "legendFormat": "Transmitted", + "refId": "B" + } + ], + "title": "Network - Errors", + "type": "timeseries" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "Kubernetes", + "Prometheus" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_node_info,cluster)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "cluster", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_node_info,cluster)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "monitoring", + "value": "monitoring" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(kube_pod_info{cluster=\"$cluster\"}, namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"}, pod)", + "refId": "Prometheus-pod-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "30s", + "value": "30s" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "resolution", + "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" + } + ], + "query": "1s, 15s, 30s, 1m, 3m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": false, + "text": "kube-state-metrics", + "value": "kube-state-metrics" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"},job)", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "job", + "options": [], + "query": { + "qryType": 1, + "query": "label_values(kube_pod_info{namespace=\"$namespace\", cluster=\"$cluster\"},job)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / Views / Pods", + "uid": "k8s_views_pods", + "version": 28, + "weekStart": "" + } +kind: ConfigMap +metadata: + annotations: + grafana_folder: Kubernetes + labels: + grafana_dashboard: "1" + name: dashboards-k8s-views-pods + namespace: prometheus diff --git a/charts/sys/templates/dashboards/gitlab-runner.yaml b/charts/sys/templates/dashboards/gitlab-runner.yaml new file mode 100644 index 00000000..dc298651 --- /dev/null +++ b/charts/sys/templates/dashboards/gitlab-runner.yaml @@ -0,0 +1,1822 @@ +{{ if .Values.gitlab_runner.enabled }} +apiVersion: v1 +kind: ConfigMap +data: + gitlab-runner.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Metrics from gitlab runners", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 14016, + "graphTooltip": 1, + "id": 31, + "iteration": 1697700881148, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 43, + "panels": [], + "repeat": "app", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "refId": "A" + } + ], + "title": "About $app", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 5, + "w": 2, + "x": 0, + "y": 1 + }, + "id": 40, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
\n \n
", + "mode": "html" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "transparent": true, + "type": "text" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 2, + "y": 1 + }, + "id": 12, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^version$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "gitlab_runner_version_info{app=~\"^$app$\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "current version", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 4, + "x": 7, + "y": 1 + }, + "id": 41, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^Value$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gitlab_runner_concurrent{app=~\"^$app$\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Concurrent job", + "range": false, + "refId": "A" + } + ], + "title": "Global concurrent jobs", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "kubernetes_pod_name", + "Value" + ] + } + } + } + ], + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 11, + "y": 1 + }, + "id": 44, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^Value$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gitlab_runner_limit{app=~\"^$app$\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{runner}}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Runner limits by token", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "-1": { + "text": "no limit" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 14, + "y": 1 + }, + "id": 49, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^Value$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "gitlab_runner_jobs_total{app=~\"^$app$\"}", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{runner}}`}}", + "range": false, + "refId": "A" + } + ], + "title": "Total jobs executed", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "-1": { + "text": "no limit" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 5, + "x": 19, + "y": 1 + }, + "id": 54, + "interval": "30s", + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "/^Value$/", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(gitlab_runner_failed_jobs_total{app=~\"^$app$\"}) by (runner)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Total failed jobs", + "transparent": true, + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 32, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "refId": "A" + } + ], + "title": "General", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 64, + "interval": "30s", + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "sum", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "delta(gitlab_runner_jobs_total{app=~\"^$app$\"} [1m]) ", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "30s", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{runner}}`}} ", + "refId": "B" + } + ], + "title": "Executed jobs", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 7 + }, + "id": 53, + "interval": "30s", + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "sum", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(gitlab_runner_jobs{state=\"running\",app=~\"^$app$\"}) by (app,job,executor_stage,stage)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{job}}`}} : {{`{{executor_stage}}`}} : {{`{{stage}}`}} ", + "refId": "B" + } + ], + "title": "Runnig jobs phase", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "duration", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 63, + "interval": "30s", + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "sum", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum (rate(gitlab_runner_job_duration_seconds_sum [1m]) / rate(gitlab_runner_job_duration_seconds_count [1m])) by (app,runner,job,)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "30s", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{runner}}`}} : {{`{{job}}`}}", + "refId": "A" + } + ], + "title": "Average duration of jobs", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 36, + "interval": "30s", + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "sum", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Total", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "sum(delta(gitlab_runner_errors_total{app=~\"^$app$\"} [1m])) by (app,level)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{level}}`}}", + "range": true, + "refId": "A" + } + ], + "title": "The number of caught errors", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 5, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 25 + }, + "id": 34, + "interval": "30s", + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "sum", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "delta(gitlab_runner_api_request_statuses_total{app=~\"^$app$\"} [1m])", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : api {{`{{endpoint}}`}} : status {{`{{status}}`}}", + "refId": "A" + } + ], + "title": "Total number of api requests", + "transparent": true, + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 28, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "refId": "A" + } + ], + "title": "Concurrency", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 35 + }, + "id": 24, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "gitlab_runner_request_concurrency{app=~\"^$app$\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{runner}}`}}", + "refId": "A" + } + ], + "title": "The current number of concurrent requests for a new job", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 1, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 35 + }, + "id": 22, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "delta(gitlab_runner_request_concurrency_exceeded_total{app=~\"^$app$\"} [2m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} : {{`{{ runner}}`}} ", + "refId": "A" + } + ], + "title": "Counter tracking exceeding of request concurrency", + "transparent": true, + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 44 + }, + "id": 52, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "6DmHLoFMz" + }, + "refId": "A" + } + ], + "title": "Process", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "description": "(user and system)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "rate", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 3, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 45 + }, + "id": 47, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "editorMode": "code", + "expr": "rate(process_cpu_seconds_total{app=~\"^$app$\"} [1m]) * 100", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} ", + "range": true, + "refId": "A" + } + ], + "title": " CPU time spent ", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "count", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 45 + }, + "id": 48, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "process_open_fds{app=~\"^$app$\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} ", + "refId": "A" + } + ], + "title": "Number of open file descriptors", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "usage", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 54 + }, + "id": 45, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "process_virtual_memory_bytes{app=~\"^$app$\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} ", + "refId": "A" + } + ], + "title": "Virtual memory size in bytes", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "usage", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 5, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "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" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 54 + }, + "id": 46, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "last" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.5.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "process_resident_memory_bytes{app=~\"^$app$\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{app}}`}} ", + "refId": "A" + } + ], + "title": "Resident memory size in bytes", + "transparent": true, + "type": "timeseries" + } + ], + "refresh": "1m", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(gitlab_runner_api_request_statuses_total, app)", + "hide": 0, + "includeAll": false, + "multi": true, + "name": "app", + "options": [], + "query": { + "query": "label_values(gitlab_runner_api_request_statuses_total, app)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Gitlab Runner Metrics", + "uid": "jTW2jWQmz", + "version": 1, + "weekStart": "" + } +metadata: + name: prom-gitlab-runner-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +{{- end }} diff --git a/charts/sys/templates/dashboards/ingress-nginx.yaml b/charts/sys/templates/dashboards/ingress-nginx.yaml new file mode 100644 index 00000000..726d5c29 --- /dev/null +++ b/charts/sys/templates/dashboards/ingress-nginx.yaml @@ -0,0 +1,2309 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + creationTimestamp: null + name: prom-ingress-nginx-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" + annotations: + grafana_folder: Kubernetes +data: + ingress-nginx.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "enable": true, + "expr": "sum(changes(nginx_ingress_controller_config_last_reload_successful_timestamp_seconds{instance!=\"unknown\",controller_class=~\"$controller_class\",namespace=~\"$namespace\"}[30s])) by (controller_class)", + "hide": false, + "iconColor": "rgba(255, 96, 96, 1)", + "limit": 100, + "name": "Config Reloads", + "showIn": 0, + "step": "30s", + "tagKeys": "controller_class", + "tags": [], + "titleFormat": "Config Reloaded", + "type": "tags" + } + ] + }, + "description": "Nginx Ingress Controller via Prometheus Metrics Dashboard created for https://github.com/DevOps-Nirvana", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 31, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the total number of requests made in this period (top-right period selected)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 1 + }, + "id": 8, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Requests (period)", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the percentage of successful requests over the entire period in the top-right hand corner.\n\nNOTE: Ignoring 404s in this metric, since a 404 is a normal response for errant/invalid request. This helps prevent this percentage from being affected by typical web scanners and security probes.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 3, + "y": 1 + }, + "id": 14, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(\n rate(\n nginx_ingress_controller_requests{status!~\"[4-5].*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) \n/ \n(\n sum(\n rate(\n nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) - \n (\n sum(\n rate(\n nginx_ingress_controller_requests{status=~\"404|499\", controller_class=~\"$controller_class\", ingress=~\"$ingress\",namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) \n or vector(0)\n )\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "% Success (period)", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the number of new connections made to the controller in the last minute. NOTE: This metric does not support the Ingress, Namespace variables, as this is at a lower-level than the actual application. It does support the others though (Env, Controller Class, Pod)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 5, + "y": 1 + }, + "id": 6, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(avg_over_time(nginx_ingress_controller_nginx_process_connections{state=~\"active\", state=~\"active\", controller_class=~\"$controller_class\", controller_pod=~\"$pod\"}[$__interval]))", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "{{`{{ingress}}`}}", + "refId": "A" + } + ], + "title": "Conns (2m)", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "The number of HTTP requests made in the last 1 minute window", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 2, + "x": 7, + "y": 1 + }, + "id": 7, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval]))", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Reqs (2m)", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the percentage of successful requests over the last minute.\n\nNOTE: Ignoring 404s in this metric, since a 404 is a normal response for errant requests", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.8 + }, + { + "color": "#299c46", + "value": 0.9 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 1 + }, + "id": 13, + "maxDataPoints": 100, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(rate(nginx_ingress_controller_requests{status!~\"[4-5].*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) / \n(sum(rate(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) - \n(sum(rate(nginx_ingress_controller_requests{status=~\"404|499\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) or vector(0)))", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "% Success (2m)", + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the number of successful requests in the last minute. Successful being 1xx or 2xx by the standard HTTP definition.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 12, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{status=~\"(1|2).*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) or vector(0)", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "HTTP 1/2xx (2m)", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the number of 3xx requests in the last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 10, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{status=~\"3.*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[2m])) or vector(0)", + "format": "time_series", + "interval": "$__interval", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "HTTP 3xx (2m)", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the number of 4xx requests in the last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 1 + }, + "id": 18, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{status=~\"4.*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) or vector(0)", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "HTTP 4xx (2m)", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is the number of 5xx requests in the last minute.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 11, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{status=~\"5.*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) or vector(0)", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "HTTP 5xx (2m)", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This is a total number of requests broken down by the ingress. This can help get a sense of scale in relation to each other.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 4 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) by (ingress)", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "{{`{{ingress}}`}}", + "refId": "A" + } + ], + "title": "HTTP Requests / Ingress", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "The breakdown of the various HTTP status codes of the requests handled within' this period that matches the variables chosen above.\n\nThis chart helps notice and dive into which service is having failures and of what kind.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "HTTP 101" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "/HTTP [1-2].*/i" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#37872D", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "/HTTP 4.*/i" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "HTTP 404" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#FF9830", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "HTTP 499" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#FA6400", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "/HTTP 5.*/i" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#C4162A", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 4 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval])) by (status)", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "HTTP {{`{{status}}`}}", + "refId": "A" + } + ], + "title": "HTTP Status Codes", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "The total number of HTTP requests made within' each period", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 4 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[$__interval]))", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "{{`{{ingress}}`}}", + "refId": "A" + } + ], + "title": "Total HTTP Requests", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 33, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Latency", + "type": "row" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "This graph can help assess and help us meet SLA requirements as far as the responsive time of our services.\n\nFor a more detailed latency graph broken out by ingress please open the closed tab at the bottom because it is very CPU intensive.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Average" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#F2495C", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.showPoints", + "value": "always" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.95" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "rgb(44, 0, 182)", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.9" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#1F60C4", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.75" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#8AB8FF", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 10 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.5" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "rgb(255, 255, 255)", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "0.99" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#8F3BB8", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 29, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(\n 0.99,\n sum by (le)(\n rate(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304|499\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\"\n }[$__interval]\n )\n )\n)", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "0.99", + "refId": "A" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(\n 0.95,\n sum by (le)(\n rate(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304|499\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\"\n }[$__interval]\n )\n )\n)", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "0.95", + "refId": "B" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(\n 0.9,\n sum by (le)(\n rate(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304|499\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\"\n }[$__interval]\n )\n )\n)", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "0.9", + "refId": "C" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(\n 0.5,\n sum by (le)(\n rate(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304|499\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\"\n }[$__interval]\n )\n )\n)", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "0.5", + "refId": "D" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(\n 0.75,\n sum by (le)(\n rate(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304|499\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\"\n }[$__interval]\n )\n )\n)", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "0.75", + "refId": "E" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "(\n\n(sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"0.01\"\n}[$__interval]))\n* 0.01)\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"0.1\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"0.01\"\n}[$__interval])))\n* 0.1)\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"1\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"0.1\"\n}[$__interval])))\n* 1)\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"10\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"1\"\n}[$__interval])))\n* 10 )\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"30\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"10\"\n}[$__interval])))\n* 30 )\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"60\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"30\"\n}[$__interval])))\n* 60 )\n\n+\n\n((sum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"+Inf\"\n}[$__interval]))\n-\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"60\"\n}[$__interval])))\n* 120 )\n\n) / \n\nsum(increase(nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404|500|304\",\n controller_class=~\"$controller_class\",\n ingress=~\"$ingress\",\n namespace=~\"$namespace\",\n controller_pod=~\"$pod\",\n le=\"+Inf\"\n}[$__interval]))\n", + "format": "time_series", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "Average", + "refId": "F" + } + ], + "title": "Latency (Average Percentiles)", + "type": "timeseries" + }, + { + "cards": {}, + "color": { + "cardColor": "#C4162A", + "colorScale": "linear", + "colorScheme": "interpolateTurbo", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": { + "uid": "${datasource}" + }, + "description": "This graph can help assess and help us meet SLA requirements as far as the responsive time of our services.\n\nFor a more detailed latency graph broken out by ingress please open the closed tab at the bottom because it is very CPU intensive.", + "fieldConfig": { + "defaults": { + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "scaleDistribution": { + "type": "linear" + } + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 13 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 27, + "legend": { + "show": true + }, + "options": { + "calculate": false, + "calculation": {}, + "cellGap": 2, + "cellValues": {}, + "color": { + "exponent": 0.5, + "fill": "#C4162A", + "mode": "scheme", + "reverse": false, + "scale": "exponential", + "scheme": "Turbo", + "steps": 128 + }, + "exemplars": { + "color": "rgba(255,0,255,0.7)" + }, + "filterValues": { + "le": 1e-9 + }, + "legend": { + "show": true + }, + "rowsFrame": { + "layout": "auto" + }, + "showValue": "never", + "tooltip": { + "mode": "single", + "showColorScale": false, + "yHistogram": false + }, + "yAxis": { + "axisPlacement": "left", + "decimals": 0, + "reverse": false, + "unit": "s" + } + }, + "pluginVersion": "11.2.0", + "reverseYBuckets": false, + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum by (le)(\n increase(\n nginx_ingress_controller_request_duration_seconds_bucket{\n status!=\"404\",status!=\"500\",\n controller_class =~ \"$controller_class\",\n namespace =~ \"$namespace\",\n ingress =~ \"$ingress\"\n }[$__interval]\n )\n)", + "format": "heatmap", + "hide": false, + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "{{`{{le}}`}}", + "refId": "D" + } + ], + "title": "Latency Heatmap", + "tooltip": { + "show": true, + "showHistogram": false + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "decimals": 0, + "format": "s", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" + }, + { + "collapsed": false, + "datasource": { + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 35, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "Connections", + "type": "row" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "NOTE: This does not work per ingress/namespace\n\nThis is the number of new connections opened by the controller", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "New Connections" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(increase(nginx_ingress_controller_nginx_process_connections{state=~\"active\", controller_class=~\"$controller_class\", controller_pod=~\"$pod\"}[$__interval]))", + "format": "time_series", + "interval": "2m", + "intervalFactor": 1, + "legendFormat": "New Connections", + "refId": "A" + } + ], + "title": "New Connections Opened (Controller / Ingress Pod)", + "type": "timeseries" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "NOTE: This does not work per ingress/namespace\n\nThe total number of connections opened to our ingresses. If you have a CDN in front of our services, it is not unusual for this to be very low. If/when we use something like websockets with a persistent connection this can/will be very high.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Connections" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "rgb(255, 200, 4)", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 22, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(avg_over_time(nginx_ingress_controller_nginx_process_connections{state=~\"active\", state=~\"active\", controller_class=~\"$controller_class\", controller_pod=~\"$pod\"}[$__range]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "Connections", + "refId": "A" + } + ], + "title": "Total Connections Open (Controller / Ingress Pod)", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "uid": "${datasource}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 24, + "panels": [], + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "refId": "A" + } + ], + "title": "CPU Intensive / Optional Graphs", + "type": "row" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 25, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "sum(\n rate(\n nginx_ingress_controller_requests{status!~\"[4-5].*\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) by (ingress)\n/ \n(\n sum(\n rate(\n nginx_ingress_controller_requests{ controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) by (ingress)\n - \n (\n sum(\n rate(\n nginx_ingress_controller_requests{status=~\"404|499\", controller_class=~\"$controller_class\", ingress=~\"$ingress\",namespace=~\"$namespace\", controller_pod=~\"$pod\"}[${__range_s}s]\n )\n ) by (ingress)\n or vector(0)\n )\n)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{`{{ingress}}`}}", + "refId": "A" + } + ], + "title": "Percentage of Success (non-2xx) - By Ingress", + "type": "timeseries" + }, + { + "datasource": { + "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": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 13, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 16, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.2.1", + "targets": [ + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(0.99, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{status!=\"404\",status!=\"500\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[5m])) by (le, ingress))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "p99 {{`{{ ingress }}`}}", + "refId": "A" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(0.95, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{status!=\"404\",status!=\"500\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[5m])) by (le, ingress))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "p95 {{`{{ ingress }}`}}", + "refId": "B" + }, + { + "datasource": { + "uid": "${datasource}" + }, + "expr": "histogram_quantile(0.90, sum(rate(nginx_ingress_controller_request_duration_seconds_bucket{status!=\"404\",status!=\"500\", controller_class=~\"$controller_class\", ingress=~\"$ingress\", namespace=~\"$namespace\", controller_pod=~\"$pod\"}[5m])) by (le, ingress))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "p90 {{`{{ ingress }}`}}", + "refId": "C" + } + ], + "title": "Latency (per ingress)", + "type": "timeseries" + } + ], + "refresh": "1m", + "schemaVersion": 39, + "tags": [ + "ingress", + "nginx", + "networking", + "services", + "k8s" + ], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_ingress_controller_config_hash, controller_class) ", + "hide": 0, + "includeAll": true, + "label": "Controller Class", + "multi": true, + "name": "controller_class", + "options": [], + "query": { + "query": "label_values(nginx_ingress_controller_config_hash, controller_class) ", + "refId": "prometheus-controller_class-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\"},namespace)", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(nginx_ingress_controller_requests{ controller_class=~\"$controller_class\"},namespace)", + "refId": "prometheus-namespace-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_ingress_controller_requests{namespace=~\"$namespace\",controller_class=~\"$controller_class\"}, ingress) ", + "hide": 0, + "includeAll": true, + "label": "Ingress", + "multi": true, + "name": "ingress", + "options": [], + "query": { + "query": "label_values(nginx_ingress_controller_requests{namespace=~\"$namespace\",controller_class=~\"$controller_class\"}, ingress) ", + "refId": "prometheus-ingress-Variable-Query" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(nginx_ingress_controller_config_hash{controller_class=~\"$controller_class\"}, controller_pod) ", + "hide": 0, + "includeAll": true, + "label": "Ingress Pod", + "multi": true, + "name": "pod", + "options": [], + "query": { + "query": "label_values(nginx_ingress_controller_config_hash{controller_class=~\"$controller_class\"}, controller_pod) ", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "default", + "value": "default" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Kubernetes Nginx Ingress Controller NextGen - DevOps Nirvana", + "uid": "k8s-nginx-ingress-prometheus-ng", + "version": 1, + "weekStart": "" + } diff --git a/charts/sys/templates/dashboards/persistent-volume-usage.yaml b/charts/sys/templates/dashboards/persistent-volume-usage.yaml new file mode 100644 index 00000000..40e123ef --- /dev/null +++ b/charts/sys/templates/dashboards/persistent-volume-usage.yaml @@ -0,0 +1,1592 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: persistent-volumes + namespace: prometheus + labels: + grafana_dashboard: "1" + annotations: + grafana_folder: Kubernetes +data: + persistent-volumes.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "limit": 100, + "name": "Annotations & Alerts", + "showIn": 0, + "type": "dashboard" + } + ] + }, + "description": "Monitors all persistent volumes that exists within a Kubernetes cluster. Prometheus is used as datasource. ", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 13646, + "graphTooltip": 0, + "id": 48, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 26, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Alerts", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 22, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 2 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 2 days - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 1 + }, + "id": 28, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 5 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 5 days - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-orange", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 27, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "(\n count (\n (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"})\n and\n (predict_linear(kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}[1d], 7 * 24 * 60 * 60) < 0)\n )\n)\nor\nvector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Full in 1 Week - Based on Daily Usage", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 5 + }, + "id": 21, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "count (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"} ) and (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"} )) / (max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"} )) >= (${warning_threshold} / 100)) or vector (0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs Above Warning Threshold", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 5 + }, + "id": 24, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "count((kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=\"Pending\"}==1)) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs in Pending State", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 0, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "semi-dark-red", + "value": null + }, + { + "color": "light-green", + "value": -0.0001 + }, + { + "color": "semi-dark-red", + "value": 0.0001 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 23, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "count((kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=\"Lost\"}==1)) or vector(0)", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "PVCs in Lost State", + "transformations": [ + { + "id": "organize", + "options": {} + } + ], + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 17, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Usage statistics", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "noValue": "--", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Used (%)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "semi-dark-yellow", + "value": 70 + }, + { + "color": "dark-red", + "value": 80 + } + ] + } + }, + { + "id": "decimals", + "value": 1 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "text": "Bound" + }, + "1": { + "text": "Pending" + }, + "2": { + "text": "Lost" + } + }, + "type": "value" + } + ] + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "light-green", + "value": null + }, + { + "color": "light-green", + "value": 0 + }, + { + "color": "semi-dark-orange", + "value": 1 + }, + { + "color": "semi-dark-red", + "value": 2 + } + ] + } + }, + { + "id": "noValue", + "value": "--" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "custom.width", + "value": 80 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Capacity (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Available (GiB)" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "StorageClass" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "PersistentVolumeClaim" + }, + "properties": [ + { + "id": "custom.width", + "value": 370 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 29, + "interval": "", + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 2, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Used (%)" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": " sum by (persistentvolumeclaim,namespace,storageclass,volumename) (kube_persistentvolumeclaim_info{namespace=~\"${k8s_namespace}\"})", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_available_bytes{namespace=~\"${k8s_namespace}\"}/1024/1024/1024)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=~\"(Pending|Lost)\"}) by (persistentvolumeclaim) + sum(kube_persistentvolumeclaim_status_phase{namespace=~\"${k8s_namespace}\",phase=~\"(Lost)\"}) by (persistentvolumeclaim)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (persistentvolumeclaim) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}/kubelet_volume_stats_capacity_bytes{namespace=~\"${k8s_namespace}\"} * 100)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "F" + } + ], + "title": "Persistent Volume Claim", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "persistentvolumeclaim" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Time 1": true, + "Time 2": true, + "Time 3": true, + "Time 4": true, + "Time 5": true, + "Time 6": true, + "Value #A": true + }, + "indexByName": {}, + "renameByName": { + "Time 1": "", + "Time 2": "", + "Time 3": "", + "Time 4": "", + "Time 5": "", + "Time 6": "", + "Value #A": "", + "Value #B": "Capacity (GiB)", + "Value #C": "Used (GiB)", + "Value #D": "Available (GiB)", + "Value #E": "Status", + "Value #F": "Used (%)", + "namespace": "Namespace", + "persistentvolumeclaim": "PersistentVolumeClaim", + "storageclass": "StorageClass", + "volumename": "PhysicalVolume" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 7, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Status" + } + ] + }, + "pluginVersion": "11.2.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "kube_storageclass_info", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Storage Class", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "__name__": true, + "app_kubernetes_io_instance": true, + "app_kubernetes_io_name": true, + "instance": true, + "job": true, + "kubernetes_namespace": true, + "kubernetes_pod_name": true, + "pod_template_hash": true + }, + "indexByName": { + "Time": 1, + "Value": 13, + "__name__": 2, + "app_kubernetes_io_instance": 3, + "app_kubernetes_io_name": 4, + "instance": 5, + "job": 6, + "kubernetes_namespace": 7, + "kubernetes_pod_name": 8, + "pod_template_hash": 9, + "provisioner": 10, + "reclaimPolicy": 11, + "storageclass": 0, + "volumeBindingMode": 12 + }, + "renameByName": { + "provisioner": "Provisioner", + "reclaimPolicy": "ReclaimPolicy", + "storageclass": "StorageClass", + "volumeBindingMode": "VolumeBindingMode" + } + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Provisioner": { + "aggregations": [], + "operation": "groupby" + }, + "ReclaimPolicy": { + "aggregations": [], + "operation": "groupby" + }, + "StorageClass": { + "aggregations": [], + "operation": "groupby" + }, + "VolumeBindingMode": { + "aggregations": [], + "operation": "groupby" + } + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 15, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Graphical usage data ", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "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": 12, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 9, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "7.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "(max by (persistentvolumeclaim,namespace) (kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}))", + "interval": "", + "legendFormat": "{{`{{namespace}}`}} ({{`{{persistentvolumeclaim}}`}})", + "refId": "A" + } + ], + "title": "All Running PVCs Used Bytes", + "type": "timeseries" + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 19, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 41 + }, + "hiddenSeries": false, + "id": 11, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1h])", + "instant": false, + "interval": "", + "legendFormat": "{{`{{namespace}}`}} ({{`{{persistentvolumeclaim}}`}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Hourly Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 48 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1d])", + "interval": "", + "legendFormat": "{{`{{namespace}}`}} ({{`{{persistentvolumeclaim}}`}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Daily Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 55 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.2.1", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "rate(kubelet_volume_stats_used_bytes{namespace=~\"${k8s_namespace}\"}[1w])", + "instant": false, + "interval": "", + "legendFormat": "{{`{{namespace}}`}} ({{`{{persistentvolumeclaim}}`}})", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Weekly Volume Usage Rate", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "binBps", + "logBase": 1, + "show": true + }, + { + "format": "Date & time", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Usage Rate", + "type": "row" + } + ], + "refresh": "1m", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(namespace)", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "k8s_namespace", + "options": [], + "query": "label_values(namespace)", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "80", + "value": "80" + }, + "hide": 2, + "label": "PVC % Used Warning Threshold", + "name": "warning_threshold", + "options": [ + { + "selected": true, + "text": "80", + "value": "80" + } + ], + "query": "80", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-24h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "kubernetes-persistent-volumes", + "uid": "peR80gTGk", + "version": 1, + "weekStart": "" + } diff --git a/charts/sys/templates/dashboards/rabbitmq.yaml b/charts/sys/templates/dashboards/rabbitmq.yaml new file mode 100644 index 00000000..2eea718c --- /dev/null +++ b/charts/sys/templates/dashboards/rabbitmq.yaml @@ -0,0 +1,372 @@ +{{- if .Values.rabbitmq_operator.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: rabbitmq-overview-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +data: + # https://grafana.com/grafana/dashboards/10991 + rabbitmq-overview-dashboard.json.url: "https://github.com/rabbitmq/rabbitmq-server/raw/e57c579d1a71b283469defdd0d6d45313e6d6daf/deps/rabbitmq_prometheus/docker/grafana/dashboards/RabbitMQ-Overview.json" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: rabbitmq-queue-grafana-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +data: + rabbitmq-queue-grafana-dashboard.json: |- + { + "__inputs":[ + { + "name":"DS_PROMETHEUS", + "label":"prometheus", + "description":"", + "type":"datasource", + "pluginId":"prometheus", + "pluginName":"Prometheus" + } + ], + "__elements":{ + + }, + "__requires":[ + { + "type":"grafana", + "id":"grafana", + "name":"Grafana", + "version":"8.3.4" + }, + { + "type":"datasource", + "id":"prometheus", + "name":"Prometheus", + "version":"1.0.0" + }, + { + "type":"panel", + "id":"timeseries", + "name":"Time series", + "version":"" + } + ], + "annotations":{ + "list":[ + { + "builtIn":1, + "datasource":{ + "type":"datasource", + "uid":"grafana" + }, + "enable":true, + "hide":true, + "iconColor":"rgba(0, 211, 255, 1)", + "name":"Annotations & Alerts", + "target":{ + "limit":100, + "matchAny":false, + "tags":[ + + ], + "type":"dashboard" + }, + "type":"dashboard" + } + ] + }, + "editable":true, + "fiscalYearStartMonth":0, + "graphTooltip":0, + "id":null, + "links":[ + + ], + "liveNow":false, + "panels":[ + { + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "fieldConfig":{ + "defaults":{ + "color":{ + "mode":"palette-classic" + }, + "custom":{ + "axisCenteredZero":false, + "axisColorMode":"text", + "axisLabel":"Messages", + "axisPlacement":"left", + "axisSoftMin":0, + "barAlignment":0, + "drawStyle":"line", + "fillOpacity":0, + "gradientMode":"none", + "hideFrom":{ + "graph":false, + "legend":false, + "tooltip":false, + "viz":false + }, + "lineInterpolation":"linear", + "lineWidth":1, + "pointSize":5, + "scaleDistribution":{ + "type":"linear" + }, + "showPoints":"auto", + "spanNulls":false, + "stacking":{ + "group":"A", + "mode":"none" + }, + "thresholdsStyle":{ + "mode":"off" + } + }, + "mappings":[ + + ], + "thresholds":{ + "mode":"absolute", + "steps":[ + { + "color":"green", + "value":null + }, + { + "color":"red", + "value":80 + } + ] + } + }, + "overrides":[ + { + "matcher":{ + "id":"byName", + "options":"Consumers" + }, + "properties":[ + { + "id":"custom.axisPlacement", + "value":"right" + }, + { + "id":"unit", + "value":"prefix:" + }, + { + "id":"custom.axisLabel", + "value":"Consumers" + } + ] + }, + { + "matcher":{ + "id":"byName", + "options":"Messages" + }, + "properties":[ + { + "id":"custom.drawStyle", + "value":"line" + }, + { + "id":"custom.fillOpacity", + "value":0 + } + ] + } + ] + }, + "gridPos":{ + "h":20, + "w":24, + "x":0, + "y":0 + }, + "id":2, + "options":{ + "legend":{ + "calcs":[ + + ], + "displayMode":"list", + "placement":"bottom", + "showLegend":true + }, + "tooltip":{ + "mode":"single", + "sort":"none" + } + }, + "targets":[ + { + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "editorMode":"code", + "expr":"(rabbitmq_detailed_queue_messages{namespace=\"$namespace\", queue=\"$queue\"} * on (instance, job) rabbitmq_identity_info{namespace=\"$namespace\",rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "legendFormat":"Messages ({{`{{job}}`}} | {{`{{instance}}`}})", + "range":true, + "refId":"A" + }, + { + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "editorMode":"code", + "expr":"rabbitmq_detailed_queue_consumers{namespace=\"$namespace\", queue=\"$queue\"} * on (instance, job) rabbitmq_identity_info{namespace=\"$namespace\",rabbitmq_cluster=\"$rabbitmq_cluster\"}", + "legendFormat":"Consumers ({{`{{job}}`}} | {{`{{instance}}`}})", + "range":true, + "refId":"B" + } + ], + "title":"Queue messages and consumers", + "type":"timeseries" + } + ], + "refresh":"10s", + "revision":1, + "schemaVersion":38, + "style":"dark", + "tags":[ + "rabbitmq-prometheus" + ], + "templating":{ + "list":[ + { + "current":{ + "selected":false, + "text":"default", + "value":"default" + }, + "hide":2, + "includeAll":false, + "label":"datasource", + "multi":false, + "name":"DS_PROMETHEUS", + "options":[ + + ], + "query":"prometheus", + "refresh":1, + "regex":"", + "skipUrlSync":false, + "type":"datasource", + "datasource":"${DS_PROMETHEUS}" + }, + { + "current":{ + + }, + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "definition":"label_values(rabbitmq_identity_info, namespace)", + "hide":0, + "includeAll":false, + "label":"Namespace", + "multi":false, + "name":"namespace", + "options":[ + + ], + "query":{ + "query":"label_values(rabbitmq_identity_info, namespace)", + "refId":"StandardVariableQuery" + }, + "refresh":2, + "regex":"", + "skipUrlSync":false, + "sort":1, + "tagValuesQuery":"", + "tagsQuery":"", + "type":"query", + "useTags":false + }, + { + "current":{ + + }, + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "definition":"label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)", + "hide":0, + "includeAll":false, + "label":"RabbitMQ Cluster", + "multi":false, + "name":"rabbitmq_cluster", + "options":[ + + ], + "query":{ + "query":"label_values(rabbitmq_identity_info{namespace=\"$namespace\"}, rabbitmq_cluster)", + "refId":"StandardVariableQuery" + }, + "refresh":2, + "regex":"", + "skipUrlSync":false, + "sort":1, + "tagValuesQuery":"", + "tagsQuery":"", + "type":"query", + "useTags":false + }, + { + "current":{ + + }, + "datasource":{ + "type":"prometheus", + "uid":"${DS_PROMETHEUS}" + }, + "definition":"query_result(rabbitmq_detailed_queue_messages{namespace=\"$namespace\"} * on (instance, job) group_left(rabbitmq_cluster) rabbitmq_identity_info{namespace=\"$namespace\"})", + "hide":0, + "includeAll":false, + "label":"Queue", + "multi":false, + "name":"queue", + "options":[ + + ], + "query":{ + "query":"query_result(rabbitmq_detailed_queue_messages{namespace=\"$namespace\"} * on (instance, job) group_left(rabbitmq_cluster) rabbitmq_identity_info{namespace=\"$namespace\", rabbitmq_cluster=\"$rabbitmq_cluster\"})", + "refId":"StandardVariableQuery" + }, + "refresh":2, + "regex":"/.*queue=\"([^\"]+)\".*/", + "skipUrlSync":false, + "sort":0, + "tagValuesQuery":"", + "tagsQuery":"", + "type":"query", + "useTags":false + } + ] + }, + "time":{ + "from":"now-15m", + "to":"now" + }, + "timepicker":{ + + }, + "timezone":"", + "title":"RabbitMQ-Queue", + "uid":"j9t8vwH7k", + "version":3, + "weekStart":"" + } +{{- end }} diff --git a/charts/sys/templates/dashboards/velero.yaml b/charts/sys/templates/dashboards/velero.yaml new file mode 100644 index 00000000..6874bdec --- /dev/null +++ b/charts/sys/templates/dashboards/velero.yaml @@ -0,0 +1,2214 @@ +{{- if .Values.velero.enabled }} +apiVersion: v1 +data: + velero.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Velero Stats maintained by Velero team", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 16829, + "graphTooltip": 1, + "id": 34, + "iteration": 1678979743251, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 15, + "panels": [], + "title": "Backup", + "type": "row" + }, + { + "datasource": "prometheus", + "description": "The sum of one-off backup and schedule backup success total ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 23, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "velero_backup_total", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Backup Success Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 22, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(velero_backup_success_total{schedule=~\"$schedule\"}) / sum(velero_backup_attempt_total{schedule=~\"$schedule\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Backup Success Rate", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 26, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(velero_backup_deletion_success_total{schedule=~\"$schedule\"}) / sum(velero_backup_deletion_attempt_total{schedule=~\"$schedule\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Backup Deletion Success Rate", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 12, + "y": 1 + }, + "id": 25, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(velero_volume_snapshot_success_total{schedule=~\"$schedule\"}) / sum(velero_volume_snapshot_attempt_total{schedule=~\"$schedule\"})\n", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Volume snapshot Success Rate", + "type": "gauge" + }, + { + "columns": [ + { + "$$hashKey": "object:462", + "text": "Current", + "value": "current" + } + ], + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "description": "for schedule backup use only", + "fontSize": "100%", + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 1 + }, + "id": 13, + "scroll": true, + "showHeader": true, + "sort": { + "col": 0, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "Hours since last backup", + "align": "auto", + "colorMode": "row", + "colors": [ + "rgba(50, 172, 45, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "decimals": 2, + "pattern": "Current", + "thresholds": [ + "24", + "48" + ], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "(time() - velero_backup_last_successful_timestamp{schedule!=\"\"}) / 60 / 60", + "instant": true, + "interval": "", + "legendFormat": "{{`{{schedule}}`}}", + "refId": "A" + } + ], + "title": "Hours since last Backup", + "transform": "timeseries_aggregations", + "type": "table-old" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_success_total{schedule=~\"$schedule\"}[1h])))", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "Backup success", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_failure_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup failure", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_partial_failure_total{schedule=~\"$schedule\"}[1h])))", + "instant": false, + "interval": "", + "legendFormat": "Backup partial failure", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_deletion_success_total{schedule=~\"$schedule\"}[1h])))", + "instant": false, + "interval": "", + "legendFormat": "Backup deletion success", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_deletion_failure_total{schedule=~\"$schedule\"}[1h])))", + "instant": false, + "interval": "", + "legendFormat": "Backup deletion failure", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "sum(avg_over_time(velero_backup_items_total{schedule=~\"$schedule\"}[1h]))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup items total", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "sum(avg_over_time(velero_backup_items_errors{schedule=~\"$schedule\"}[1h]))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup items errors_total", + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_backup_validation_failure_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup validation failure", + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_volume_snapshot_success_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup volume snapshot success", + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_volume_snapshot_failure_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Backup volume snapshot failure", + "refId": "J" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Backup per hour", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:124", + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:125", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "cards": {}, + "color": { + "cardColor": "#1F60C4", + "colorScale": "linear", + "colorScheme": "interpolateSpectral", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "tsbuckets", + "datasource": "prometheus", + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 19 + }, + "heatmap": {}, + "hideZeroBuckets": false, + "highlightCards": true, + "id": 34, + "legend": { + "show": true + }, + "reverseYBuckets": false, + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(increase(velero_backup_duration_seconds_bucket{schedule=~\"$schedule\",le!=\"+Inf\"}[1h])) by (le)", + "format": "heatmap", + "hide": false, + "interval": "", + "legendFormat": "{{`{{le}}`}}", + "refId": "B" + } + ], + "title": "Backup time heatmap", + "tooltip": { + "show": true, + "showHistogram": true + }, + "type": "heatmap", + "xAxis": { + "show": true + }, + "yAxis": { + "format": "s", + "logBase": 1, + "show": true + }, + "yBucketBound": "auto" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 18, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(avg_over_time(velero_backup_tarball_size_bytes{schedule=~\"$schedule\"}[15m]))", + "interval": "", + "legendFormat": "{{`{{schedule}}`}}", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Backup Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:561", + "decimals": 0, + "format": "decbytes", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:562", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 17, + "panels": [], + "title": "Restore", + "type": "row" + }, + { + "datasource": "prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 34 + }, + "id": 27, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "velero_restore_total", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Restore Success Total", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 4, + "y": 34 + }, + "id": 24, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(velero_restore_success_total{schedule=~\"$schedule\"}) / sum(velero_restore_attempt_total{schedule=~\"$schedule\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Restore Success Rate", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 16, + "x": 8, + "y": 34 + }, + "hiddenSeries": false, + "id": 28, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_restore_success_total{schedule=~\"$schedule\"}[1h])))", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "Restore success", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_restore_failed_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "interval": "", + "legendFormat": "Restore failure", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_restore_validation_failed_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "interval": "", + "legendFormat": "Restore validation failure", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_restore_partial_failure_total{schedule=~\"$schedule\"}[1h])))", + "hide": false, + "interval": "", + "legendFormat": "Restore partial failure", + "refId": "D" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Restore per hour", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:124", + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:125", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 30, + "panels": [], + "title": "CSI", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 44 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_csi_snapshot_attempt_total{schedule=~\"$schedule\", backupName=~\"$csi_backup_name\"}[1h])))", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "CSI Snapshot attempt", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_csi_snapshot_success_total{schedule=~\"$schedule\", backupName=~\"$csi_backup_name\"}[1h])))", + "hide": false, + "interval": "", + "legendFormat": "CSI Snapshot success", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(velero_csi_snapshot_failure_total{schedule=~\"$schedule\", backupName=~\"$csi_backup_name\"}[1h])))", + "hide": false, + "interval": "", + "legendFormat": "CSI Snapshot failure", + "refId": "C" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "CSI per hour", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:124", + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:125", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 36, + "panels": [], + "title": "Restic", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 54 + }, + "id": 37, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(restic_pod_volume_backup_dequeue_count{node=~\"$restic_node\"}) / sum(restic_pod_volume_backup_enqueue_count{node=~\"$restic_node\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Restic Success Rate", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 20, + "x": 4, + "y": 54 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(restic_pod_volume_backup_enqueue_count{node=~\"$restic_node\"}[1h])))", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "Restic enqueue", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "round(sum(increase(restic_pod_volume_backup_dequeue_count{node=~\"$restic_node\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Restic dequeue", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Restic per hour", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:124", + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:125", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 63 + }, + "hiddenSeries": false, + "id": 39, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(avg_over_time(restic_restic_operation_latency_seconds_gauge{backupName=~\"$restic_backup_name\", node=~\"$restic_node\", operation=~\"$restic_operation\", pod_volume_backup=~\"$restic_pvb_name\"}[15m]))", + "interval": "", + "legendFormat": "Avg over time", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Restic time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:561", + "decimals": 0, + "format": "s", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:562", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 69 + }, + "id": 43, + "panels": [], + "title": "File System Backup(for v1.10 and later)", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a" + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0.95 + }, + { + "color": "#299c46", + "value": 0.99 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 4, + "x": 0, + "y": 70 + }, + "id": 41, + "links": [], + "maxDataPoints": 100, + "options": { + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(pod_volume_backup_dequeue_count{node=~\"$fsb_node\"}) / sum(pod_volume_backup_enqueue_count{node=~\"$fsb_node\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "FSB Success Rate", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 20, + "x": 4, + "y": 70 + }, + "hiddenSeries": false, + "id": 45, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": true, + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "round(sum(increase(pod_volume_backup_enqueue_count{node=~\"$fsb_node\"}[1h])))", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "FSB enqueue", + "refId": "A" + }, + { + "datasource": "prometheus", + "exemplar": false, + "expr": "round(sum(increase(pod_volume_backup_dequeue_count{node=~\"$fsb_node\"}[1h])))", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "FSB dequeue", + "refId": "B" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "FSB per hour", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:124", + "decimals": 0, + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:125", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 79 + }, + "hiddenSeries": false, + "id": 47, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": "prometheus", + "exemplar": false, + "expr": "sum(avg_over_time(pod_volume_operation_latency_seconds_gauge{backupName=~\"$fsb_backup_name\", node=~\"$fsb_node\", operation=~\"$fsb_operation\", pod_volume_backup=~\"$fsb_pvb_name\"}[15m]))", + "interval": "", + "legendFormat": "Avg over time", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "FSB time", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:561", + "decimals": 0, + "format": "s", + "label": "", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:562", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": false, + "schemaVersion": 36, + "style": "dark", + "tags": [ + "velero" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "k0", + "value": "k0" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "$datasource" + }, + "definition": "label_values(velero_backup_attempt_total, schedule)", + "hide": 0, + "includeAll": true, + "multi": true, + "name": "schedule", + "options": [], + "query": { + "query": "label_values(velero_backup_attempt_total, schedule)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(velero_csi_snapshot_attempt_total, backupName)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "csi_backup_name", + "options": [], + "query": { + "query": "label_values(velero_csi_snapshot_attempt_total, backupName)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(restic_pod_volume_backup_enqueue_count, node)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "restic_node", + "options": [], + "query": { + "query": "label_values(restic_pod_volume_backup_enqueue_count, node)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(restic_restic_operation_latency_seconds_gauge, backupName)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "restic_backup_name", + "options": [], + "query": { + "query": "label_values(restic_restic_operation_latency_seconds_gauge, backupName)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(restic_restic_operation_latency_seconds_gauge, operation)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "restic_operation", + "options": [], + "query": { + "query": "label_values(restic_restic_operation_latency_seconds_gauge, operation)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(restic_restic_operation_latency_seconds_gauge, pod_volume_backup)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "restic_pvb_name", + "options": [], + "query": { + "query": "label_values(restic_restic_operation_latency_seconds_gauge, pod_volume_backup)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pod_volume_backup_enqueue_count, node)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "fsb_node", + "options": [], + "query": { + "query": "label_values(pod_volume_backup_enqueue_count, node)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pod_volume_operation_latency_seconds_gauge, backupName)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "fsb_backup_name", + "options": [], + "query": { + "query": "label_values(pod_volume_operation_latency_seconds_gauge, backupName)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pod_volume_operation_latency_seconds_gauge, operation)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "fsb_operation", + "options": [], + "query": { + "query": "label_values(pod_volume_operation_latency_seconds_gauge, operation)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "definition": "label_values(pod_volume_operation_latency_seconds_gauge, pod_volume_backup)", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "fsb_pvb_name", + "options": [], + "query": { + "query": "label_values(pod_volume_operation_latency_seconds_gauge, pod_volume_backup)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": { + "hidden": false, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "Kubernetes/Tanzu/Velero", + "uid": "EbXSjT24k", + "version": 2, + "weekStart": "" + } +kind: ConfigMap +metadata: + name: velero-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +{{- end }} diff --git a/charts/sys/templates/dashboards/x509-exporter-dashbaoard.yaml b/charts/sys/templates/dashboards/x509-exporter-dashbaoard.yaml new file mode 100644 index 00000000..01a9bc0a --- /dev/null +++ b/charts/sys/templates/dashboards/x509-exporter-dashbaoard.yaml @@ -0,0 +1,2011 @@ +{{- if .Values.x509_exporter.enabled }} +apiVersion: v1 +data: + x509-dash.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "Unified dashboard for checking certificates expiration: Kubernetes Secrets, certificate files on nodes, or on any server.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 13922, + "graphTooltip": 0, + "iteration": 1678705600458, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 24, + "panels": [], + "title": "Overview", + "type": "row" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "super-light-blue" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 5, + "x": 0, + "y": 1 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "count(x509_cert_not_after)", + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Total Certificates", + "type": "stat" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "dark-red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 5, + "y": 1 + }, + "id": 18, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "sum(((x509_cert_not_after - time()) / 86400) < bool 0)", + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Expired", + "type": "stat" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 8, + "y": 1 + }, + "id": 19, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "sum(0 < ((x509_cert_not_after - time()) / 86400) < bool $critical_threshold)", + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Expiring within $critical_threshold days", + "type": "stat" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "yellow", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 3, + "x": 11, + "y": 1 + }, + "id": 20, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "sum(0 < ((x509_cert_not_after - time()) / 86400) < bool $warning_threshold)", + "instant": false, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Expiring within $warning_threshold days", + "type": "stat" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "super-light-blue" + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 14, + "y": 1 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "count(x509_read_errors)", + "instant": false, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Exporters", + "type": "stat" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 14, + "y": 4 + }, + "id": 36, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "sum(x509_read_errors)", + "instant": false, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Exporter Errors", + "type": "stat" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 26, + "panels": [], + "title": "Expiration", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Because of a missing feature in Grafana, critical and warning thresholds from dashboard variables will not affect coloration of the Time Left column in this table.\n\nThresholds are to be set manually in the Overrides settings for this widget.\n\nPlease vote or contribute to issue : https://github.com/grafana/grafana/issues/922", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red" + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time Left" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 200 + }, + { + "id": "custom.filterable", + "value": false + }, + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red" + }, + { + "color": "red", + "value": 0 + }, + { + "color": "yellow", + "value": 7 + }, + { + "color": "green", + "value": 28 + } + ] + } + }, + { + "id": "unit", + "value": "d" + } + ] + } + ] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 46, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "sort(((x509_cert_not_after{secret_name!=\"linkerd-identity-issuer\", issuer_O=\"\", issuer_CN!=\"webhook.linkerd.cluster.local\"} - time()) / 86400) < $list_threshold)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Kubernetes Secrets (no issuer) (time left < $list_threshold days)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value": 3, + "secret_name": 2, + "secret_namespace": 1, + "subject_CN": 0 + }, + "renameByName": { + "Value": "Time Left", + "secret_name": "Secret Name", + "secret_namespace": "Secret Namespace", + "subject_CN": "Subject CN" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Because of a missing feature in Grafana, critical and warning thresholds from dashboard variables will not affect coloration of the Time Left column in this table.\n\nThresholds are to be set manually in the Overrides settings for this widget.\n\nPlease vote or contribute to issue : https://github.com/grafana/grafana/issues/922", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "displayMode": "auto", + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time Left" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 200 + }, + { + "id": "custom.filterable", + "value": false + }, + { + "id": "custom.displayMode", + "value": "color-background" + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "#EAB839", + "value": 7 + }, + { + "color": "green", + "value": 28 + } + ] + } + }, + { + "id": "unit", + "value": "d" + } + ] + } + ] + }, + "gridPos": { + "h": 13, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 47, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": false, + "expr": "sort(((x509_cert_not_after{issuer_O!=\"\"} - time()) / 86400) < $list_threshold)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Kubernetes Secrets (with issuer) (time left < $list_threshold days)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value": 3, + "secret_name": 2, + "secret_namespace": 1, + "subject_CN": 0 + }, + "renameByName": { + "Value": "Time Left", + "filepath": "File Path", + "instance": "Instance", + "subject_CN": "Subject CN" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 12, + "panels": [], + "title": "Charts", + "type": "row" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Certificate Count" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 150 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 8, + "x": 0, + "y": 22 + }, + "id": 14, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "topk(10, sort_desc(count by (issuer_CN) (x509_cert_not_after)))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Top Issuers", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "issuer_CN", + "Value" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value": "Certificate Count", + "issuer_CN": "Issuer CN" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Certificate Count" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 150 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 8, + "x": 8, + "y": 22 + }, + "id": 15, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "topk(10, sort_desc(count by (secret_namespace) (x509_cert_not_after{secret_namespace!=\"\"})))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Top Namespaces (Kubernetes Secrets)", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "Value", + "secret_namespace" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value": "Certificate Count", + "secret_namespace": "Namespace" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Days" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 100 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Secret Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 258 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 31, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "bottomk(10, (x509_cert_not_after{secret_name!=\"\"} - x509_cert_not_before) / 86400)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Kubernetes Secrets : Shortest Validity Period", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value": 3, + "secret_name": 2, + "secret_namespace": 1, + "subject_CN": 0 + }, + "renameByName": { + "Value": "Days", + "secret_name": "Secret Name", + "secret_namespace": "Secret Namespace", + "subject_CN": "Subject CN" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Days" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.width", + "value": 100 + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 34 + }, + "id": 28, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "topk(10, (x509_cert_not_after{secret_name!=\"\"} - x509_cert_not_before) / 86400)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Kubernetes Secrets : Longest Validity Period", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(subject_CN|secret_namespace|secret_name|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value": 3, + "secret_name": 2, + "secret_namespace": 1, + "subject_CN": 0 + }, + "renameByName": { + "Value": "Days", + "secret_name": "Secret Name", + "secret_namespace": "Secret Namespace", + "subject_CN": "Subject CN" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 46 + }, + "id": 35, + "panels": [], + "title": "Exporters", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 47 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "count(x509_read_errors)", + "interval": "", + "legendFormat": "exporters", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Reporting Exporters", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:237", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:238", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "exporters with errors": "red" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 47 + }, + "hiddenSeries": false, + "id": 39, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum (x509_read_errors > bool 0)", + "interval": "", + "legendFormat": "exporters with errors", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Exporters with Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:237", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:238", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "error rate": "red", + "errors": "red" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 55 + }, + "hiddenSeries": false, + "id": 41, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(x509_read_errors[15m]))", + "interval": "", + "legendFormat": "error rate", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Error Rate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:237", + "format": "cps", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:238", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "errors": "red" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 55 + }, + "hiddenSeries": false, + "id": 40, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.5.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(x509_read_errors)", + "interval": "", + "legendFormat": "errors", + "queryType": "randomWalk", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Cumulative Errors", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:237", + "format": "short", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:238", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Rate" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + }, + { + "id": "custom.align", + "value": "center" + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 0, + "y": 63 + }, + "id": 43, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "topk(10, rate(x509_read_errors[6h]))", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Top Exporters by Error Rate", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(instance|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value": "Rate", + "instance": "Instance" + } + } + } + ], + "type": "table" + }, + { + "datasource": { + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "displayMode": "auto", + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Errors" + }, + "properties": [ + { + "id": "custom.width", + "value": 150 + }, + { + "id": "custom.align", + "value": "center" + } + ] + } + ] + }, + "gridPos": { + "h": 12, + "w": 12, + "x": 12, + "y": 63 + }, + "id": 44, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.5.3", + "targets": [ + { + "expr": "topk(10, x509_read_errors)", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "queryType": "randomWalk", + "refId": "A" + } + ], + "title": "Top Exporters by Cumulative Errors", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "pattern": "^(instance|Value)$" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value": "Errors", + "instance": "Instance" + } + } + } + ], + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "DS_PROMETHEUS", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "7", + "value": "7" + }, + "hide": 0, + "includeAll": false, + "label": "Critical Threshold (days)", + "multi": false, + "name": "critical_threshold", + "options": [ + { + "selected": false, + "text": "1", + "value": "1" + }, + { + "selected": true, + "text": "7", + "value": "7" + }, + { + "selected": false, + "text": "14", + "value": "14" + }, + { + "selected": false, + "text": "15", + "value": "15" + }, + { + "selected": false, + "text": "28", + "value": "28" + }, + { + "selected": false, + "text": "30", + "value": "30" + }, + { + "selected": false, + "text": "60", + "value": "60" + }, + { + "selected": false, + "text": "90", + "value": "90" + }, + { + "selected": false, + "text": "180", + "value": "180" + }, + { + "selected": false, + "text": "365", + "value": "365" + } + ], + "query": "1,7,14,15,28,30,60,90,180,365", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": false, + "text": "28", + "value": "28" + }, + "hide": 0, + "includeAll": false, + "label": "Warning Threshold (days)", + "multi": false, + "name": "warning_threshold", + "options": [ + { + "selected": false, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "7", + "value": "7" + }, + { + "selected": false, + "text": "14", + "value": "14" + }, + { + "selected": false, + "text": "15", + "value": "15" + }, + { + "selected": true, + "text": "28", + "value": "28" + }, + { + "selected": false, + "text": "30", + "value": "30" + }, + { + "selected": false, + "text": "60", + "value": "60" + }, + { + "selected": false, + "text": "90", + "value": "90" + }, + { + "selected": false, + "text": "180", + "value": "180" + }, + { + "selected": false, + "text": "365", + "value": "365" + } + ], + "query": "1,7,14,15,28,30,60,90,180,365", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": true, + "text": "7300", + "value": "7300" + }, + "hide": 0, + "includeAll": false, + "label": "List expiring in less than (days)", + "multi": false, + "name": "list_threshold", + "options": [ + { + "selected": false, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "7", + "value": "7" + }, + { + "selected": false, + "text": "15", + "value": "15" + }, + { + "selected": false, + "text": "30", + "value": "30" + }, + { + "selected": false, + "text": "60", + "value": "60" + }, + { + "selected": false, + "text": "90", + "value": "90" + }, + { + "selected": false, + "text": "180", + "value": "180" + }, + { + "selected": false, + "text": "365", + "value": "365" + }, + { + "selected": false, + "text": "730", + "value": "730" + }, + { + "selected": false, + "text": "1095", + "value": "1095" + }, + { + "selected": false, + "text": "1460", + "value": "1460" + }, + { + "selected": false, + "text": "1825", + "value": "1825" + }, + { + "selected": false, + "text": "3650", + "value": "3650" + }, + { + "selected": true, + "text": "7300", + "value": "7300" + } + ], + "query": "1,7,15,30,60,90,180,365,730,1095,1460,1825,3650,7300", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Certificates Expiration (X509 Certificate Exporter)", + "uid": "lHnsYlPGk", + "version": 2, + "weekStart": "" + } +kind: ConfigMap +metadata: + creationTimestamp: null + name: x509-exporter-dashboard + namespace: prometheus + labels: + grafana_dashboard: "1" +{{- end }} diff --git a/charts/sys/templates/kyverno-policies/cnpg-add-backup-section.yaml b/charts/sys/templates/kyverno-policies/cnpg-add-backup-section.yaml new file mode 100644 index 00000000..4942800a --- /dev/null +++ b/charts/sys/templates/kyverno-policies/cnpg-add-backup-section.yaml @@ -0,0 +1,52 @@ +{{- if and (.Values.kyverno.enabled) (.Values.postgres_operator.enabled) (.Values.velero.enabled) }} +apiVersion : kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: cnpg-add-backup-section + annotations: + policies.kyverno.io/title: add backup section to cnpg cluster spec + policies.kyverno.io/category: Other + policies.kyverno.io/severity: medium + kyverno.io/kyverno-version: 1.6.0 + policies.kyverno.io/minversion: 1.6.0 + kyverno.io/kubernetes-version: "1.23" + policies.kyverno.io/subject: Cluster + policies.kyverno.io/description: >- + When a CNPG cluster is created, a backup section should be added. + The user can then create their own backup or backup schedule. +spec: + background: false + rules: + - name: cnpg-add-backup-section + match: + any: + - resources: + kinds: + - Cluster + exclude: + any: + - resources: + kinds: + - Cluster + names: + - "review-*" + mutate: + patchStrategicMerge: + spec: + backup: + barmanObjectStore: + destinationPath: s3://{{ .Values.velero.bucket }}/{{ .Values.cluster_config.cluster }}/cnpg-backup + serverName: {{` "{{ request.object.metadata.name }}"`}} + endpointURL: https://s3.production.itpartner.no + s3Credentials: + accessKeyId: + key: access_key + name: nutanix-s3 + inheritFromIAMRole: false + secretAccessKey: + key: access_secret + name: nutanix-s3 + wal: + compression: snappy +{{- end }} + diff --git a/charts/sys/templates/kyverno-policies/cnpg-clone-secrets.yaml b/charts/sys/templates/kyverno-policies/cnpg-clone-secrets.yaml new file mode 100644 index 00000000..b8ae81b2 --- /dev/null +++ b/charts/sys/templates/kyverno-policies/cnpg-clone-secrets.yaml @@ -0,0 +1,36 @@ +{{- if and (.Values.kyverno.enabled) (.Values.postgres_operator.enabled) (.Values.velero.enabled) }} +apiVersion : kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: cnpg-clone-s3-credentials + annotations: + policies.kyverno.io/title: add backup section to cnpg cluster spec + policies.kyverno.io/category: Other + policies.kyverno.io/severity: medium + kyverno.io/kyverno-version: 1.6.0 + policies.kyverno.io/minversion: 1.6.0 + kyverno.io/kubernetes-version: "1.23" + policies.kyverno.io/subject: Cluster + policies.kyverno.io/description: >- + When a CNPG cluster is created, s3 credentials and CA secrets + should be synced from the velero namespace +spec: + background: false + rules: + - name: clone-s3-credentials + match: + any: + - resources: + kinds: + - Cluster + generate: + apiVersion: v1 + kind: Secret + name: nutanix-s3 + namespace: {{` "{{request.object.metadata.namespace}}" `}} + synchronize: true + clone: + namespace: velero + name: nutanix-s3 +{{- end }} + diff --git a/charts/sys/templates/kyverno-policies/generate-external-admin-rolebinding.yaml b/charts/sys/templates/kyverno-policies/generate-external-admin-rolebinding.yaml new file mode 100644 index 00000000..ba446a44 --- /dev/null +++ b/charts/sys/templates/kyverno-policies/generate-external-admin-rolebinding.yaml @@ -0,0 +1,55 @@ +{{- if and (.Values.cluster_config.external_kubectl_access.enabled) (.Values.kyverno.enabled) }} +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: generate-external-admin-rolebinding + annotations: + policies.kyverno.io/title: Generate cluster-Admin rolebinding customer namespaces + policies.kyverno.io/category: other + policies.kyverno.io/severity: medium + policies.kyverno.io/subject: Namespace, RoleBinding + kyverno.io/kyverno-version: 1.7.0 + policies.kyverno.io/minversion: 1.7.0 + kyverno.io/kubernetes-version: "1.23" + policies.kyverno.io/description: >- + Customers should not have full admin permissions on their own namespaces. + This policy will generate a RoleBinding, binding their group_id to + the Cluster-Admin clusterrole. This will still only apply to the namespace as + the resource is a rolebinding, not clusterrolebinding. + This policy should not trigger on any namespaces with label component=sys +spec: + generateExistingOnPolicyUpdate: true + rules: + - name: generate-rolebinding + match: + any: + - resources: + kinds: + - Namespace + exclude: + any: + - resources: + kinds: + - Namespace + selector: + matchLabels: + component: sys + generate: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + name: external-ns-admin + namespace: {{` "{{request.object.metadata.name}}" `}} + synchronize: true + data: + metadata: + labels: + created-by: kyverno + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin + subjects: + - apiGroup: rbac.authorization.k8s.io + kind: Group + name: {{ .Values.cluster_config.external_kubectl_access.admin_group }} +{{- end }} diff --git a/charts/sys/templates/kyverno-policies/prometheus-add-folder-to-default-dashboards.yaml b/charts/sys/templates/kyverno-policies/prometheus-add-folder-to-default-dashboards.yaml new file mode 100644 index 00000000..0bb56a35 --- /dev/null +++ b/charts/sys/templates/kyverno-policies/prometheus-add-folder-to-default-dashboards.yaml @@ -0,0 +1,32 @@ +{{- if and (.Values.kyverno.enabled) (.Values.prometheus.enabled) }} +apiVersion: kyverno.io/v1 +kind: Policy +metadata: + name: prometheus-stack-default-dashboard-folder + namespace: prometheus +spec: + admission: true + background: true + mutateExistingOnPolicyUpdate: true + rules: + - match: + any: + - resources: + kinds: + - ConfigMap + selector: + matchLabels: + app.kubernetes.io/part-of: kube-prometheus-stack + mutate: + patchStrategicMerge: + metadata: + annotations: + grafana_folder: Prometheus-stack + targets: + - apiVersion: v1 + kind: ConfigMap + name: "{{`{{ request.object.metadata.name }}`}}" + name: generate-dashboard-folder-annotation + skipBackgroundRequests: true + validationFailureAction: Audit +{{- end }} diff --git a/charts/sys/templates/kyverno-policies/sync-gitlab.yaml b/charts/sys/templates/kyverno-policies/sync-gitlab.yaml new file mode 100644 index 00000000..35f7304f --- /dev/null +++ b/charts/sys/templates/kyverno-policies/sync-gitlab.yaml @@ -0,0 +1,31 @@ +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: sync-gitlab-secret + annotations: + policies.kyverno.io/title: Sync Secrets + policies.kyverno.io/category: Sample + policies.kyverno.io/subject: Secret + policies.kyverno.io/description: >- + Secrets like registry credentials often need to exist in multiple + Namespaces so Pods there have access. Manually duplicating those Secrets + is time consuming and error prone. This policy will copy a + Secret called `regcred` which exists in the `default` Namespace to + new Namespaces when they are created. It will also push updates to + the copied Secrets should the source Secret be changed. +spec: + rules: + - name: sync-image-pull-secret + match: + resources: + kinds: + - Namespace + generate: + apiVersion: v1 + kind: Secret + name: regcred + namespace: "{{`{{request.object.metadata.name}}`}}" + synchronize: true + clone: + namespace: default + name: gitlab-pull-secret diff --git a/charts/sys/templates/kyverno-policies/sync-regcred.yaml b/charts/sys/templates/kyverno-policies/sync-regcred.yaml new file mode 100644 index 00000000..2ee8df33 --- /dev/null +++ b/charts/sys/templates/kyverno-policies/sync-regcred.yaml @@ -0,0 +1,33 @@ +{{- if .Values.kyverno.enabled }} +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: sync-regcred-secret + annotations: + policies.kyverno.io/title: Sync Secrets + policies.kyverno.io/category: Sample + policies.kyverno.io/subject: Secret + policies.kyverno.io/description: >- + Secrets like registry credentials often need to exist in multiple + Namespaces so Pods there have access. Manually duplicating those Secrets + is time consuming and error prone. This policy will copy a + Secret called `regcred` which exists in the `default` Namespace to + new Namespaces when they are created. It will also push updates to + the copied Secrets should the source Secret be changed. +spec: + rules: + - name: sync-image-pull-secret + match: + resources: + kinds: + - Namespace + generate: + apiVersion: v1 + kind: Secret + name: regcred + namespace: "{{`{{request.object.metadata.name}}`}}" + synchronize: true + clone: + namespace: default + name: regcred +{{- end }} diff --git a/charts/sys/templates/kyverno-policies/sync-s3-secret.yaml b/charts/sys/templates/kyverno-policies/sync-s3-secret.yaml new file mode 100644 index 00000000..5e400f30 --- /dev/null +++ b/charts/sys/templates/kyverno-policies/sync-s3-secret.yaml @@ -0,0 +1,33 @@ +{{- if .Values.kyverno.enabled }} +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + annotations: + policies.kyverno.io/description: 'This policy will sync the nutanix-s3 secret in kube-system namespace across namespaces' + policies.kyverno.io/subject: Secret + policies.kyverno.io/title: Sync s3 Secrets + name: sync-nutanix-s3-credentials +spec: + generateExistingOnPolicyUpdate: true + background: true + rules: + - generate: + apiVersion: v1 + clone: + name: nutanix-s3 + namespace: kube-system + kind: Secret + name: nutanix-s3 + namespace: '{{`{{request.object.metadata.name}}`}}' + synchronize: true + match: + resources: + kinds: + - Namespace + names: + - "velero" + - "loki" + - "tempo" + name: sync-s3-secret + validationFailureAction: audit +{{- end }} diff --git a/charts/sys/templates/kyverno-policies/whitelist-internal-ingresses.yaml b/charts/sys/templates/kyverno-policies/whitelist-internal-ingresses.yaml new file mode 100644 index 00000000..289f30de --- /dev/null +++ b/charts/sys/templates/kyverno-policies/whitelist-internal-ingresses.yaml @@ -0,0 +1,73 @@ +{{- if .Values.kyverno.enabled }} +apiVersion: kyverno.io/v1 +kind: ClusterPolicy +metadata: + name: whitelist-internal-ingresses + annotations: + policies.kyverno.io/title: Concatenate Ingresss + policies.kyverno.io/category: Other + policies.kyverno.io/severity: medium + policies.kyverno.io/subject: Ingress + policies.kyverno.io/description: >- + Ingresses with the label "internal=true" should be whitelisted. + If no whitelist exists, add the default values, otherwise append + whitelist to the already existing ones +spec: + mutateExistingOnPolicyUpdate: false + #precondition: has whitelist annotation or + rules: + - name: ensure-nginx-whitelist-exists + match: + resources: + kinds: + - Ingress + selector: + matchLabels: + internal: "true" + mutate: + patchStrategicMerge: + metadata: + annotations: + +(nginx.ingress.kubernetes.io/whitelist-source-range): "" + - name: append-existing-whitelist + match: + resources: + kinds: + - Ingress + selector: + matchLabels: + internal: "true" + preconditions: + any: + - key: "{{`{{request.object.metadata.annotations.\"nginx.ingress.kubernetes.io/whitelist-source-range\"}}`}}" + operator: NotEquals + value: "" + mutate: + patchStrategicMerge: + metadata: + annotations: + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: "{{`{{ @ }}`}},{{ join "," . }}" + {{- end }} + - name: add-nginx-whitelist + match: + resources: + kinds: + - Ingress + selector: + matchLabels: + internal: "true" + preconditions: + any: + - key: "{{`{{request.object.metadata.annotations.\"nginx.ingress.kubernetes.io/whitelist-source-range\"}}`}}" + operator: Equals + value: "" + mutate: + patchStrategicMerge: + metadata: + annotations: + {{- with .Values.cluster_config.ingress_whitelist_ips }} + nginx.ingress.kubernetes.io/whitelist-source-range: "{{ join "," . }}" + {{- end }} +{{- end }} + diff --git a/charts/sys/templates/pre-cert-manager.yaml b/charts/sys/templates/pre-cert-manager.yaml new file mode 100644 index 00000000..8d6a498a --- /dev/null +++ b/charts/sys/templates/pre-cert-manager.yaml @@ -0,0 +1,225 @@ +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + name: letsencrypt-production +spec: + acme: + # The ACME server URL + server: https://acme-v02.api.letsencrypt.org/directory + # Email address used for ACME registration + email: {{ .Values.cluster_config.acme_email }} + # Name of a secret used to store the ACME account private key + privateKeySecretRef: + name: letsencrypt-production + solvers: + - http01: + ingress: + class: nginx +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + name: letsencrypt-staging +spec: + acme: + # The ACME server URL + server: https://acme-staging-v02.api.letsencrypt.org/directory + # Email address used for ACME registration + email: {{ .Values.cluster_config.acme_email }} + # Name of a secret used to store the ACME account private key + privateKeySecretRef: + name: letsencrypt-staging + solvers: + - http01: + ingress: + class: nginx +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + name: ca-issuer +spec: + ca: + secretName: cluster-ca +--- +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + annotations: + argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true + name: selfsigning-issuer +spec: + selfSigned: {} +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: front-proxy-client +subjects: + - kind: User + name: front-proxy-client + apiGroup: rbac.authorization.k8s.io +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: front-proxy-client +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: front-proxy-client +rules: +- apiGroups: + - "webhook.cert-manager.io" + resources: + - mutations + - validations + verbs: [ "*" ] +- apiGroups: + - metrics.k8s.io + resources: + - pods + - nodes + verbs: + - get + - list + - watch +--- + +{{ if .Values.cluster_config.initca }} + +# Pod to update certificates from master nodes +# only runs on control plane nodes (etcd) +# Mounts cert files rotatet by nixos service.mgr and uses it to update cert-manager secret +# Always create certs on initial creation, +# Otherwise, cert creation would not happen until cronJob runs +apiVersion: batch/v1 +kind: Job +metadata: + name: cert-create + namespace: cert-manager +spec: + backoffLimit: 1 + template: + metadata: + labels: + block-egress: "true" + annotations: + linkerd.io/inject: disabled + spec: + restartPolicy: Never + serviceAccountName: cert-secret-updater + securityContext: + runAsUser: 12000 + runAsGroup: 13000 + fsGroup: 10000 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io + operator: In + values: + - control-plane + tolerations: + - key: unschedulable + value: "true" + effect: NoSchedule + containers: + - image: bitnami/kubectl:1.24 + name: kubectl + resources: {} + securityContext: + allowPrivilegeEscalation: false + command: + - "/bin/sh" + - -c + - /tmp/renew-certs/renew-certs.sh + volumeMounts: + - name: ca-pem + mountPath: /tmp/ca.pem + - name: ca-key-pem + mountPath: /tmp/ca-key.pem + - name: certs-script + mountPath: /tmp/renew-certs + volumes: + - name: ca-pem + hostPath: + path: {{.Values.cluster_config.initca}}/ca.pem + type: File + - name: ca-key-pem + hostPath: + path: {{.Values.cluster_config.initca}}/ca-key.pem + type: File + - name: certs-script + configMap: + name: renew-certs-script + defaultMode: 0755 +--- +apiVersion: v1 +data: + renew-certs.sh: | + #! /bin/bash + kubectl create secret tls -n cert-manager cluster-ca --cert=/tmp/ca.pem --key=/tmp/ca-key.pem --dry-run=client -o yaml > /tmp/new-secret.yaml + kubectl apply -f /tmp/new-secret.yaml +kind: ConfigMap +metadata: + name: renew-certs-script + namespace: cert-manager +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cert-secret-updater + namespace: cert-manager +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: cert-secret-updater-role + namespace: cert-manager +rules: +- apiGroups: + - "" + resourceNames: + - cluster-ca + resources: + - secrets + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: cert-secret-updater-rbinding + namespace: cert-manager +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: cert-secret-updater-role +subjects: +- kind: ServiceAccount + name: cert-secret-updater + namespace: cert-manager +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: default-deny-egress + namespace: cert-manager +spec: + podSelector: + matchLabels: + block-egress: "true" + policyTypes: + - Egress +--- +{{ end }} diff --git a/charts/sys/templates/pre-cilium.yaml b/charts/sys/templates/pre-cilium.yaml new file mode 100644 index 00000000..f04d9fd7 --- /dev/null +++ b/charts/sys/templates/pre-cilium.yaml @@ -0,0 +1,23 @@ +{{if and (.Values.cilium.enabled) (.Values.cilium.loadbalancerPool.enabled )}} +apiVersion: "cilium.io/v2alpha1" +kind: CiliumLoadBalancerIPPool +metadata: + name: "loadbalancer" +spec: + blocks: + {{- range .Values.cilium.loadbalancerPool.cidr}} + - cidr: {{ . }} + {{- end }} +--- +apiVersion: "cilium.io/v2alpha1" +kind: CiliumL2AnnouncementPolicy +metadata: + name: policy +spec: + nodeSelector: + matchExpressions: + - key: node-role.kubernetes.io/control-plane + operator: DoesNotExist + externalIPs: true + loadBalancerIPs: true +{{- end}} diff --git a/charts/sys/templates/pre-cluster/cluster-auth-rbac.yaml b/charts/sys/templates/pre-cluster/cluster-auth-rbac.yaml new file mode 100644 index 00000000..ee655308 --- /dev/null +++ b/charts/sys/templates/pre-cluster/cluster-auth-rbac.yaml @@ -0,0 +1,47 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cluster-admin + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cluster-admin +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io +subjects: +- kind: ServiceAccount + namespace: kube-system + name: cluster-admin +- apiGroup: rbac.authorization.k8s.io + kind: Group + name: 'system:masters' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: system-default +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io +subjects: +- kind: ServiceAccount + namespace: kube-system + name: default +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kubernetes +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: User + name: kubernetes diff --git a/charts/sys/templates/pre-cluster/kube-flannel-rbac.yaml b/charts/sys/templates/pre-cluster/kube-flannel-rbac.yaml new file mode 100644 index 00000000..b14b53a8 --- /dev/null +++ b/charts/sys/templates/pre-cluster/kube-flannel-rbac.yaml @@ -0,0 +1,42 @@ +# Create the clusterrole and clusterrolebinding: +# $ kubectl create -f kube-flannel-rbac.yml +# Create the pod using the same namespace used by the flannel serviceaccount: +# $ kubectl create --namespace kube-system -f kube-flannel-legacy.yml +--- +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: flannel-client +rules: + - apiGroups: + - "" + resources: + - pods + verbs: + - get + - apiGroups: + - "" + resources: + - nodes + verbs: + - list + - watch + - apiGroups: + - "" + resources: + - nodes/status + verbs: + - patch +--- +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: flannel-client +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: flannel-client +subjects: + - kind: User + name: flannel-client + apiGroup: rbac.authorization.k8s.io diff --git a/charts/sys/templates/pre-cluster/kube-proxy-rbac.yaml b/charts/sys/templates/pre-cluster/kube-proxy-rbac.yaml new file mode 100644 index 00000000..0b53b301 --- /dev/null +++ b/charts/sys/templates/pre-cluster/kube-proxy-rbac.yaml @@ -0,0 +1,51 @@ +# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace. +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: kube-proxy +subjects: + - kind: User + name: kube-proxy + apiGroup: rbac.authorization.k8s.io + - kind: ServiceAccount + name: kube-proxy + namespace: kube-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kube-proxy +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kube-proxy +rules: + - apiGroups: + - "" + resources: + - endpoints + - events + - services + - nodes + verbs: ["get", "watch", "list"] + - nonResourceURLs: ["*"] + verbs: ["get", "watch", "list"] + + - apiGroups: + - "" + - "events.k8s.io" + resources: + - events + verbs: ["*"] + + - nonResourceURLs: ["*"] + verbs: ["*"] + - apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - list + - watch + + diff --git a/charts/sys/templates/pre-cluster/label-and-taint-nodes.yaml b/charts/sys/templates/pre-cluster/label-and-taint-nodes.yaml new file mode 100644 index 00000000..fb707755 --- /dev/null +++ b/charts/sys/templates/pre-cluster/label-and-taint-nodes.yaml @@ -0,0 +1,96 @@ +{{ if .Values.cluster_config.nodes }} + +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: label-and-taint-nodes + namespace: kube-system +spec: + backoffLimit: 1 + template: + metadata: + annotations: + linkerd.io/inject: disable + spec: + restartPolicy: Never + serviceAccountName: label-and-taint-nodes + securityContext: + runAsUser: 12000 + runAsGroup: 13000 + fsGroup: 10000 + affinity: + tolerations: + - key: unschedulable + value: "true" + effect: NoSchedule + containers: + - image: bitnami/kubectl:1.24 + name: kubectl + resources: {} + securityContext: + allowPrivilegeEscalation: false + command: + - "/bin/sh" + - -c + - /tmp/scripts/script.sh + volumeMounts: + - name: scripts + mountPath: /tmp/scripts + volumes: + - name: scripts + configMap: + name: label-and-taint-scripts + defaultMode: 0755 +--- +apiVersion: v1 +data: + script.sh: | + #! /bin/bash +{{- range $node := .Values.cluster_config.nodes }} + {{- range .labels }} + kubectl label nodes --overwrite=true {{ $node.name }} {{ . | quote }} + {{- end }} + {{- range .taints }} + kubectl taint nodes --overwrite=true {{ $node.name }} {{ . | quote }} + {{- end }} +{{- end }} +kind: ConfigMap +metadata: + name: label-and-taint-scripts + namespace: kube-system +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: label-and-taint-nodes + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: label-and-taint-nodes +rules: +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - update + - patch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: label-and-taint-nodes +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: label-and-taint-nodes +subjects: +- kind: ServiceAccount + name: label-and-taint-nodes + namespace: kube-system +{{ end }} diff --git a/charts/sys/templates/pre-gitlab-runner.yaml b/charts/sys/templates/pre-gitlab-runner.yaml new file mode 100644 index 00000000..0a1b22f6 --- /dev/null +++ b/charts/sys/templates/pre-gitlab-runner.yaml @@ -0,0 +1,128 @@ +{{- if and (.Values.gitlab_runner.enabled) (.Values.gitlab_runner.createCertSecret) }} +# Pod to update certificates from master nodes +# only runs on control plane nodes (etcd) +# Mounts cert files rotatet by nixos service.mgr and uses it to update gitlab secret +# Always create certs on initial creation, +# Otherwise, cert creation would not happen until cronJob runs +apiVersion: batch/v1 +kind: Job +metadata: + name: cert-create + namespace: gitlab +spec: + template: + metadata: + labels: + block-egress: "true" + annotations: + linkerd.io/inject: disabled + spec: + restartPolicy: Never + serviceAccountName: cert-secret-updater + securityContext: + runAsUser: 12000 + runAsGroup: 13000 + fsGroup: 10000 + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: node-role.kubernetes.io + operator: In + values: + - control-plane + tolerations: + - key: unschedulable + value: "true" + effect: NoSchedule + containers: + - image: bitnami/kubectl:1.24 + name: kubectl + resources: {} + securityContext: + allowPrivilegeEscalation: false + command: + - "/bin/sh" + - -c + - /tmp/renew-certs/renew-certs.sh + volumeMounts: + - name: ca-pem + mountPath: /tmp/ca.pem + - name: ca-key-pem + mountPath: /tmp/ca-key.pem + - name: certs-script + mountPath: /tmp/renew-certs + volumes: + - name: ca-pem + hostPath: + path: {{.Values.cluster_config.initca}}/ca.pem + type: File + - name: ca-key-pem + hostPath: + path: {{.Values.cluster_config.initca}}/ca-key.pem + type: File + - name: certs-script + configMap: + name: renew-certs-script + defaultMode: 0755 +--- +apiVersion: v1 +data: + renew-certs.sh: | + #! /bin/bash + kubectl create secret tls -n gitlab itp-cluster-ca --cert=/tmp/ca.pem --key=/tmp/ca-key.pem --dry-run=client -o yaml > /tmp/new-secret.yaml + kubectl apply -f /tmp/new-secret.yaml +kind: ConfigMap +metadata: + name: renew-certs-script + namespace: gitlab +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cert-secret-updater + namespace: gitlab +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: cert-secret-updater-role + namespace: gitlab +rules: +- apiGroups: + - "" + resourceNames: + - itp-cluster-ca + resources: + - secrets + verbs: + - '*' +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: cert-secret-updater-rbinding + namespace: gitlab +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: cert-secret-updater-role +subjects: +- kind: ServiceAccount + name: cert-secret-updater + namespace: gitlab +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: default-deny-egress + namespace: gitlab +spec: + podSelector: + matchLabels: + block-egress: "true" + policyTypes: + - Egress +--- +{{- end }} diff --git a/charts/sys/templates/pre-linkerd.yaml b/charts/sys/templates/pre-linkerd.yaml new file mode 100644 index 00000000..d59ad3da --- /dev/null +++ b/charts/sys/templates/pre-linkerd.yaml @@ -0,0 +1,206 @@ +{{ if .Values.linkerd.enabled }} +--- +apiVersion: v1 +kind: Namespace +metadata: + labels: + linkerd.io/control-plane-ns: linkerd + linkerd.io/is-control-plane: 'true' + config.linkerd.io/admission-webhooks: disabled + annotations: + linkerd.io/inject: disabled + argocd.argoproj.io/sync-wave: "-1" + name: linkerd +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: linkerd-trust-anchor + namespace: linkerd +spec: + ca: + secretName: linkerd-trust-anchor +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: linkerd-identity-issuer + namespace: linkerd +spec: + revisionHistoryLimit: 5 + secretName: linkerd-identity-issuer + duration: 48h0m0s + renewBefore: 25h0m0s + issuerRef: + name: linkerd-trust-anchor + kind: Issuer + dnsNames: + - identity.linkerd.cluster.local + isCA: true + privateKey: + algorithm: ECDSA + usages: + - cert sign + - crl sign + - server auth + - client auth +--- +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: webhook-issuer + namespace: linkerd +spec: + ca: + secretName: webhook-issuer-tls +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: linkerd-policy-validator + namespace: linkerd +spec: + revisionHistoryLimit: 5 + secretName: linkerd-policy-validator-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: linkerd-policy-validator.linkerd.svc + dnsNames: + - linkerd-policy-validator.linkerd.svc + privateKey: + algorithm: ECDSA + encoding: PKCS8 + usages: + - server auth +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: linkerd-proxy-injector + namespace: linkerd +spec: + revisionHistoryLimit: 5 + secretName: linkerd-proxy-injector-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: linkerd-proxy-injector.linkerd.svc + dnsNames: + - linkerd-proxy-injector.linkerd.svc + privateKey: + algorithm: ECDSA + usages: + - server auth +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: linkerd-sp-validator + namespace: linkerd +spec: + revisionHistoryLimit: 5 + secretName: linkerd-sp-validator-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: linkerd-sp-validator.linkerd.svc + dnsNames: + - linkerd-sp-validator.linkerd.svc + privateKey: + algorithm: ECDSA + usages: + - server auth +--- +{{ if .Values.linkerd.viz.enabled }} +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: webhook-issuer + namespace: linkerd-viz +spec: + ca: + secretName: webhook-issuer-tls +# ignore if not using the viz extension +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: tap + namespace: linkerd-viz +spec: + revisionHistoryLimit: 5 + secretName: tap-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: tap.linkerd-viz.svc + dnsNames: + - tap.linkerd-viz.svc + isCA: false + privateKey: + algorithm: ECDSA + usages: + - server auth +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: linkerd-tap-injector + namespace: linkerd-viz +spec: + revisionHistoryLimit: 5 + secretName: tap-injector-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: tap-injector.linkerd-viz.svc + dnsNames: + - tap-injector.linkerd-viz.svc + privateKey: + algorithm: ECDSA + usages: + - server auth +--- +{{ end }} +{{ if .Values.linkerd.jaeger.enabled }} +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: webhook-issuer + namespace: linkerd-jaeger +spec: + ca: + secretName: webhook-issuer-tls +--- +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: jaeger-injector + namespace: linkerd-jaeger +spec: + revisionHistoryLimit: 5 + secretName: jaeger-injector-k8s-tls + duration: 24h0m0s + renewBefore: 1h0m0s + issuerRef: + name: webhook-issuer + kind: Issuer + commonName: jaeger-injector.linkerd-jaeger.svc + dnsNames: + - jaeger-injector.linkerd-jaeger.svc + privateKey: + algorithm: ECDSA + usages: + - server auth +{{ end }} +{{ end }} diff --git a/charts/sys/templates/rbac/external-clusterrole.yaml b/charts/sys/templates/rbac/external-clusterrole.yaml new file mode 100644 index 00000000..25ec7c68 --- /dev/null +++ b/charts/sys/templates/rbac/external-clusterrole.yaml @@ -0,0 +1,209 @@ +{{- if .Values.cluster_config.external_kubectl_access.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: external-access +rules: +- apiGroups: + - "" + resources: + - pods + - serviceaccounts + - namespaces + - events + - persistentvolumeclaims + - persistentvolumes + - bindings + - componentstatuses + - podtemplates + - replicationcontrollers + - resourcequotas + - services + - nodes + - limitranges + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + verbs: + - create + - delete +- apiGroups: + - apiregistration.k8s.io + resources: + - apiservices + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - controllerrevisions + - statefulsets + - replicasets + - daemonsets + - deployments + verbs: + - get + - list + - watch +- apiGroups: + - events.k8s.io + resources: + - events + verbs: + - get + - list + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch +- apiGroups: + - batch + resources: + - jobs + - cronjobs + verbs: + - get + - list + - watch +- apiGroups: + - certificates.k8s.io + resources: + - certificatesigningrequests + verbs: + - get + - list + - watch +- apiGroups: + - networking.k8s.io + resources: + - ingressclasses + - networkpolicies + - ingresses + verbs: + - get + - list + - watch +- apiGroups: + - policy + resources: + - poddisruptionbudgets + verbs: + - get + - list + - watch +- apiGroups: + - rbac.authorization.k8s.io + resources: + - roles + - clusterroles + - clusterrolebindings + - rolebindings + verbs: + - get + - list + - watch +- apiGroups: + - storage.k8s.io + resources: + - csinodes + - storageclasses + - csistoragecapacities + - volumeattachments + - csidrivers + verbs: + - get + - list + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - watch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch +- apiGroups: + - scheduling.k8s.io + resources: + - priorityclasses + verbs: + - get + - list + - watch +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch +- apiGroups: + - node.k8s.io + resources: + - runtimeclasses + verbs: + - get + - list + - watch +- apiGroups: + - flowcontrol.apiserver.k8s.io + resources: + - flowschemas + - prioritylevelconfigurations + verbs: + - get + - list + - watch +- apiGroups: + - talos.dev + resources: + - serviceaccounts + verbs: + - get + - list + - watch +- apiGroups: + - cilium.io + resources: + - ciliumexternalworkloads + - ciliumnetworkpolicies + - ciliumidentities + - ciliumnodes + - ciliumendpoints + - ciliumclusterwidenetworkpolicies + verbs: + - get + - list + - watch +- apiGroups: + - metrics.k8s.io + resources: + - pods + - nodes + verbs: + - get + - list + - watch +{{- end }} diff --git a/charts/sys/templates/rbac/external-clusterrolebinding.yaml b/charts/sys/templates/rbac/external-clusterrolebinding.yaml new file mode 100644 index 00000000..4965792b --- /dev/null +++ b/charts/sys/templates/rbac/external-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.cluster_config.external_kubectl_access.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: external-access +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: external-access +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: Group + name: {{ .Values.cluster_config.external_kubectl_access.admin_group }} +{{- end }} diff --git a/charts/sys/templates/rbac/kyverno-cluster-admin.yaml b/charts/sys/templates/rbac/kyverno-cluster-admin.yaml new file mode 100644 index 00000000..5154ee58 --- /dev/null +++ b/charts/sys/templates/rbac/kyverno-cluster-admin.yaml @@ -0,0 +1,17 @@ +{{- if .Values.kyverno.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kyverno:generate-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: kyverno + namespace: kyverno +- kind: ServiceAccount + name: kyverno-background-controller + namespace: kyverno +{{- end }} diff --git a/charts/sys/templates/rbac/kyverno-generate-cilium-network-policies.yaml b/charts/sys/templates/rbac/kyverno-generate-cilium-network-policies.yaml new file mode 100644 index 00000000..dc956ce9 --- /dev/null +++ b/charts/sys/templates/rbac/kyverno-generate-cilium-network-policies.yaml @@ -0,0 +1,29 @@ +{{- if and (.Values.kyverno.enabled) (.Values.cilium.enabled) }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kyverno:generate-cilium-networkpolicies +rules: +- apiGroups: + - cilium.io + resources: + - ciliumnetworkpolicies + verbs: + - "*" +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: kyverno:generate-cilium-network-policies +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: kyverno:generate-cilium-networkpolicies +subjects: +- kind: ServiceAccount + name: kyverno + namespace: kyverno +- kind: ServiceAccount + name: kyverno-background-controller + namespace: kyverno +{{- end }} diff --git a/charts/sys/templates/rbac/operator-role.yaml b/charts/sys/templates/rbac/operator-role.yaml new file mode 100644 index 00000000..2e630e77 --- /dev/null +++ b/charts/sys/templates/rbac/operator-role.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: az-kubernetes-operators-cluster-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: Group + name: dd2aa2d6-269d-48fe-90cc-04fd5c08bd29 diff --git a/charts/sys/values.yaml b/charts/sys/values.yaml new file mode 100644 index 00000000..b0b682d1 --- /dev/null +++ b/charts/sys/values.yaml @@ -0,0 +1,356 @@ +cluster_config: + manifests: https://gitlab.com/oceanbox/manifests.git + policies: policies/sys + resources: resources/sys + distro: "" #[nixos, talos] + env: "" #[dev, test, staging, prod] + initca: "" + domain: "itpartner.no" + apiserver: "" + apiserverip: "" + etcd_nodes: [] + k8s_nodes: [] + cluster: "" + ingress_nodes: [] + ingress_replica_count: 3 + fileserver: "" + acme_email: "" + nodenames: [] + nodes: [] + ingress_clusterissuer: "letsencrypt-production" + ingress_whitelist_ips: + - 10.0.0.0/8 + - 172.16.0.0/12 + - 192.168.0.0/16 + - 172.19.255.0/24 + external_kubectl_access: + enabled: false + admin_group: "" + external_access: + enabled: false + admin_group: "" + groups: [] + #- group_id: + # - "" + # name: + # namespaces: + # - + oidc: [] + #- name: azure-oidc + # provider: azuread + # tenant: "https://login.microsoftonline.com//oauth2/v2.0" + # secret_ref: + # name: azure-oidc + # group_id: "" + #- name: github-oidc + # provider: github + # secret_ref: + # name: github-oidc + # allowed_organizations: + # allowed_teams: +argocd: + autosync: true + version: 7.5.2 + ingress: + enabled: true + adminLogin: false + anyNamespaces: + enabled: false + kustomizeHelmSupport: false + applicationset_webhook: + enabled: false + additional_rbac_settings: [] + resources: + controller: + memory: "" + repoServer: + cmp: + enabled: false + name: "" + image: "" + imagePullSecret: [] + helmTokenSecret: "" +argocd_apps: + autosync: true + version: 0.0.1 +argo_workflows: + enabled: false + autosync: true + version: 0.45.0 + metrics: + enabled: false + allowed_namespaces: [] +argo_rollouts: + enabled: false + autosync: true + version: 2.35.2 + metrics: + enabled: false + dashboard_enabled: false +actions_runner_controller: + enabled: false + autosync: true + version: 0.23.7 +cilium: + enabled: false + autosync: true + version: 1.16.2 + spire: + enabled: false + policyAuditMode: false + encryption: + enabled: true + type: ipsec + endpointStatus: + enabled: true + kubeProxyReplacement: false + k8sServiceHost: localhost + k8sServicePort: 7445 + nodePort: + enabled: false + # NOTE: requires that ingressconroller is also enabled (bug) + gatewayAPI: + enabled: false + ingressController: + enabled: false + defaultClass: false + loadbalancerMode: shared + l2announcement: + enabled: false + k8sClientRateLimit: + qps: 10 + burst: 3 + loadbalancerPool: + enabled: false + cidr: [] + envoy: + enabled: false + hubble: + ui: true + upgradeCompatability: "" +linkerd: + enabled: true + autosync: true + version: 1.9.3 + trustAnchorPEM: | + -----BEGIN CERTIFICATE----- + -----END CERTIFICATE----- + webhookPEM: | + -----BEGIN CERTIFICATE----- + -----END CERTIFICATE----- + identyIssuerPEM: "" + secretScheme: kubernetes.io/tls + crds: + version: 1.4.0 + multicluster: + version: 30.2.0 + enabled: false + viz: + enabled: false + jaeger: + enabled: false +thanos: + enabled: false + autosync: true + version: 8.3.0 + pagerdutyRoutingKey: "" +prometheus: + enabled: true + autosync: true + version: 62.7.0 + # Helm chart version, and app version is different. CRD version MUST be equals to chart's APP version + crd_version: 14.0.0 + certRenewCronEnabled: true + snitchUrl: "" + oncallUrl: "" + pagerdutyRoutingKey: "" + fullname: "" + # https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L47 + defaultRules: {} + additionalScrapeConfigs: [] + additionalDataSources: [] + enableFeatures: [] + storage: + size: 50Gi + grafana: + defaultDashboardsEnabled: true + persistence: false + disable_login_form: true + plugins: [] + coredns: + targetPort: "" + etcd: + targetPort: "" + scheduler: + targetPort: "" + kubelet: + enabled: false + https: false + thanos: + enabled: false + datasource: + enabled: false +nfs_provisioner: + enabled: true + autosync: true + version: 4.0.13 + archiveOnDelete: true + defaultClass: true + extraMountOpts: [] +cert_manager: + autosync: true + version: 1.12.13 +kubernetes_dashboard: + enabled: false + autosync: true + version: v2.3.1 +gitlab_runner: + enabled: true + autosync: true + version: 0.39.0 + createCertSecret: true + tag: "obx" + s3: + server: "" + access_key: "" + secret_key: "" +postgres_operator: + enabled: true + autosync: true + version: 0.18.2 +rabbitmq_operator: + enabled: false + autosync: true + version: 4.3.27 +metrics_server: + autosync: true + version: 3.8.2 + ignoreTLS: false +nginx: + enabled: true + autosync: true + version: 4.8.3 + pdb: + minAvailable: 1 + resources: + controller: + cpu: "100m" + memory: "100Mi" +jaeger_operator: + enabled: false + autosync: true + version: 1.38.0 +kyverno: + enabled: false + autosync: true + metrics: false + version: 3.2.5 + resources: + cleanupController: + memory: "64Mi" + reportsController: + memory: "64Mi" + backgroundController: + memory: "64Mi" +velero: + enabled: true + autosync: true + version: 6.0.0 + kubeletRootDir: "/var/lib/kubernetes/pods" + bucket: velero-backup + bsl: default + # Opt-in or opt-out pvc backup + # https://velero.io/docs/main/file-system-backup/#to-back-up + backupAllVolumes: true + credentials: + secretName: "s3-credentials" + s3: + region: us-east-1 + url: "https://nutanix-obj-s3.kube-system" + insecureSkipTLSVerify: true + resources: + velero: + request: + cpu: 500m + memory: 1Gi + limit: + memory: 2Gi + nodeAgent: + request: + cpu: 500m + memory: 1Gi + limit: + memory: 2Gi +loki: + enabled: false + autosync: true + version: 6.12.0 + compactor: false + s3: + endpoint: "" + region: "" + insecure_skip_verify: false + secret: + name: "" + access_key: "" + access_secret: "" + buckets: + chunks: "" + ruler: "" + admin: "" +tempo: + enabled: false + autosync: true + version: 1.14.0 + s3: + endpoint: "" + region: "" + insecure_skip_verify: false + secret: + name: "" + access_key: "" + access_secret: "" + bucketName: "" +otel: + enabled: false + autosync: true + version: 0.107.0 +promtail: + enabled: false + autosync: true + version: 6.6.1 +x509_exporter: + enabled: true + autosync: true + alerts: true + version: 3.6.0 +mariadb_operator: + enabled: false + autosync: true + version: 0.30.0 +chartmuseum: + enabled: false + autosync: true + version: 3.10.2 + storage: + size: 8Gi + ingress: + enabled: true +downscaler: + enabled: false + autosync: true + version: 0.2.12 + extraConfig: | + DEFAULT_UPTIME: "Mon-Fri 07:00-20:00 Europe/Berlin" + excludedNamespaces: + - py-kube-downscaler + - kube-downscaler + - kube-system +clickhouse_operator: + enabled: false + autosync: true + version: 0.24.4 +oncall: + enabled: false + externalGrafana: + url: "" diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-applicationset-ingress.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-applicationset-ingress.yaml new file mode 100644 index 00000000..1678e7a3 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-applicationset-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-applicationset-ingress + namespace: argocd +spec: + description: Allow access from the ingress controller + endpointSelector: + matchLabels: + app.kubernetes.io/component: applicationset-controller + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-notifications.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-notifications.yaml new file mode 100644 index 00000000..045dbc56 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-notifications.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-argo-notifications + namespace: argocd +spec: + description: Allow access to the ArgoCD Notifications + egress: + - toFQDNs: + - matchName: slack.com + endpointSelector: + matchLabels: + app.kubernetes.io/component: notifications-controller diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access-applicationset.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access-applicationset.yaml new file mode 100644 index 00000000..0af071b5 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access-applicationset.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-argo-repo-access-applicationset + namespace: argocd +spec: + description: Allow access to the ArgoCD repo Applicationset + egress: + - toEntities: + - world + endpointSelector: + matchLabels: + app.kubernetes.io/component: applicationset-controller diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access.yaml new file mode 100644 index 00000000..6e2b7e04 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-argo-repo-access.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-argo-repo-access + namespace: argocd +spec: + description: Allow access to the ArgoCD repo server + egress: + - toEntities: + - world + endpointSelector: + matchLabels: + app.kubernetes.io/component: repo-server diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-chartmuseum-ingress.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-chartmuseum-ingress.yaml new file mode 100644 index 00000000..5f030377 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-chartmuseum-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-chartmuseum-ingress + namespace: argocd +spec: + description: Allow access to the chartmuseum ingress + endpointSelector: + matchLabels: + app.kubernetes.io/name: chartmuseum + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-image-updater-repo-access.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-image-updater-repo-access.yaml new file mode 100644 index 00000000..1534b3c8 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-image-updater-repo-access.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-image-updater-repo-access + namespace: argocd +spec: + description: Allow argoCD image updater to access github container registry + egress: + - toFQDNs: + - matchName: ghcr.io + endpointSelector: + matchLabels: + app.kubernetes.io/name: argocd-image-updater diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-ingress.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-ingress.yaml new file mode 100644 index 00000000..2096eaae --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-ingress + namespace: argocd +spec: + description: Allow access from the ingress controller + endpointSelector: + matchLabels: + app.kubernetes.io/component: server + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..40045bb8 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: argocd +spec: + description: Allow access to the Kube API server + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-microsoft-sso.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-microsoft-sso.yaml new file mode 100644 index 00000000..e68b04d2 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-microsoft-sso.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-microsoft-sso + namespace: argocd +spec: + description: Allow argoCD dex server to authenticate to microsoft online azure oatuh + egress: + - toFQDNs: + - matchName: login.microsoftonline.com + - matchPattern: '*.microsoftonline.com' + - matchName: github.com + - matchName: api.github.com + endpointSelector: + matchLabels: + app.kubernetes.io/name: argocd-dex-server diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-rollout.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-rollout.yaml new file mode 100644 index 00000000..ebfed5bd --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-rollout.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics-rollout + namespace: argocd +spec: + description: Allow access to the Prometheus metrics + endpointSelector: + matchLabels: + app.kubernetes.io/instance: argo-rollouts + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "8090" + protocol: TCP diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-workflows.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-workflows.yaml new file mode 100644 index 00000000..f8f81286 --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics-workflows.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics-workflows + namespace: argocd +spec: + description: Allow access to the Prometheus metrics + endpointSelector: + matchLabels: + app.kubernetes.io/instance: argo-workflows + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "9090" + protocol: TCP diff --git a/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..a1b0f86f --- /dev/null +++ b/policies/sys/argocd/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,30 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: argocd +spec: + description: Allow access to the Prometheus metrics + endpointSelector: + matchLabels: + app.kubernetes.io/instance: argocd + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "8082" + protocol: TCP + - port: "8080" + protocol: TCP + - port: "9001" + protocol: TCP + - port: "9121" + protocol: TCP + - port: "8084" + protocol: TCP + - port: "8083" + protocol: TCP + - port: "5558" + protocol: TCP diff --git a/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server-to-cert-manager.yaml b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server-to-cert-manager.yaml new file mode 100644 index 00000000..7ff9859e --- /dev/null +++ b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server-to-cert-manager.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server-to-cert-manager + namespace: cert-manager +spec: + description: Allow the API server to communicate with the cert-manager pods + endpointSelector: + matchLabels: + app.kubernetes.io/instance: cert-manager + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..49e026d4 --- /dev/null +++ b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: cert-manager +spec: + description: Allow the Kube API server to communicate with cert-manager + egress: + - toEntities: + - kube-apiserver + endpointSelector: + matchLabels: {} diff --git a/policies/sys/cert-manager/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..d64ede50 --- /dev/null +++ b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: cert-manager +spec: + description: Allow Prometheus metrics + endpointSelector: + matchLabels: + app.kubernetes.io/instance: cert-manager + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "9402" + protocol: TCP diff --git a/policies/sys/cert-manager/CiliumNetworkPolicy-allow-world-traffic.yaml b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-world-traffic.yaml new file mode 100644 index 00000000..a3d26127 --- /dev/null +++ b/policies/sys/cert-manager/CiliumNetworkPolicy-allow-world-traffic.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-world-traffic + namespace: cert-manager +spec: + description: Allow the world to communicate with cert-manager + egress: + - toEntities: + - world + endpointSelector: + matchLabels: {} diff --git a/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..ca0bd2c4 --- /dev/null +++ b/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: cilium-spire +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-remote-node-to-server.yaml b/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-remote-node-to-server.yaml new file mode 100644 index 00000000..013a84f9 --- /dev/null +++ b/policies/sys/cilium-spire/CiliumNetworkPolicy-allow-remote-node-to-server.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-server + namespace: cilium-spire +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - remote-node + toPorts: + - ports: + - port: "8081" + protocol: TCP diff --git a/policies/sys/cilium-test/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/cilium-test/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..28045ea2 --- /dev/null +++ b/policies/sys/cilium-test/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,22 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: cilium-test +spec: + egress: + - toEndpoints: + - {} + - toEntities: + - cluster + - toEntities: + - remote-node + - toEntities: + - world + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - cluster + - fromEntities: + - world diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-acme-solvers.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-acme-solvers.yaml new file mode 100644 index 00000000..214dade6 --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-acme-solvers.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-acme-solvers +spec: + description: Policy for ingress for Acme Solvers. + endpointSelector: + matchLabels: + acme.cert-manager.io/http01-solver: "true" + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-cnpg-backups.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-cnpg-backups.yaml new file mode 100644 index 00000000..320d574f --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-cnpg-backups.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-cnpg-backups +spec: + description: Policy for egress for CNPG Backups. + egress: + - toFQDNs: + - matchName: s3.production.itpartner.no + endpointSelector: + matchLabels: + cnpg.io/podRole: instance diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-dns.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-dns.yaml new file mode 100644 index 00000000..0a7f77b3 --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-dns.yaml @@ -0,0 +1,24 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-dns +spec: + description: 'description: Allow only dns traffic by default. Also acts as a deny-all policy' + egress: + - toEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: kube-system + k8s-app: kube-dns + toPorts: + - ports: + - port: "53" + protocol: UDP + - rules: + dns: + - matchPattern: '*' + endpointSelector: + matchExpressions: + - key: io.kubernetes.pod.namespace + operator: NotIn + values: + - kube-system diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-mariadb-operator.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-mariadb-operator.yaml new file mode 100644 index 00000000..a0a41bcc --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-allow-mariadb-operator.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-mariadb-operator +spec: + description: allow mariadb instances to be reached by operator + endpointSelector: + matchLabels: + app.kubernetes.io/name: mariadb + ingress: + - fromEndpoints: + - matchLabels: + app.kubernetes.io/name: mariadb-operator + io.kubernetes.pod.namespace: mariadb-operator + toPorts: + - ports: + - port: "3306" + protocol: TCP diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-cilium-health-checks.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-cilium-health-checks.yaml new file mode 100644 index 00000000..9fc9bb26 --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-cilium-health-checks.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: cilium-health-checks +spec: + description: Health checks + egress: + - toEntities: + - remote-node + endpointSelector: + matchLabels: + reserved:health: "" + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-deny-all.yaml b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-deny-all.yaml new file mode 100644 index 00000000..7ba45d08 --- /dev/null +++ b/policies/sys/clusterwide/CiliumClusterwideNetworkPolicy-deny-all.yaml @@ -0,0 +1,9 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: deny-all +spec: + description: Deny all + egress: [] + endpointSelector: {} + ingress: [] diff --git a/policies/sys/cnpg/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/cnpg/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..d32ac553 --- /dev/null +++ b/policies/sys/cnpg/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: cnpg +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: postgres-operator diff --git a/policies/sys/cnpg/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml b/policies/sys/cnpg/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml new file mode 100644 index 00000000..6c04cc22 --- /dev/null +++ b/policies/sys/cnpg/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-webhooks + namespace: cnpg +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "9443" + protocol: TCP diff --git a/policies/sys/downscaler/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/downscaler/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..7c7345ec --- /dev/null +++ b/policies/sys/downscaler/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: kube-downscaler +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + application: downscaler-py-kube-downscaler diff --git a/policies/sys/downscaler/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml b/policies/sys/downscaler/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml new file mode 100644 index 00000000..e99b9eec --- /dev/null +++ b/policies/sys/downscaler/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-webhooks + namespace: kube-downscaler +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "9443" + protocol: TCP diff --git a/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-host-traffic.yaml b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-host-traffic.yaml new file mode 100644 index 00000000..4ffbbd8c --- /dev/null +++ b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-host-traffic.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-host-traffic + namespace: ingress-nginx +spec: + egress: + - toEntities: + - kube-apiserver + - host + endpointSelector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/instance: ingress-nginx diff --git a/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-hubble-traffic.yaml b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-hubble-traffic.yaml new file mode 100644 index 00000000..fa9ee953 --- /dev/null +++ b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-hubble-traffic.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-hubble-traffic + namespace: ingress-nginx +spec: + egress: + - toFQDNs: + - matchPattern: hubble.*.*.* + - matchPattern: hubble.*.*.*.* + endpointSelector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/instance: ingress-nginx diff --git a/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..98bbc402 --- /dev/null +++ b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: ingress-nginx +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: ingress-nginx + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "9913" + protocol: TCP diff --git a/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-s3-traffic.yaml b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-s3-traffic.yaml new file mode 100644 index 00000000..b3bcc3d3 --- /dev/null +++ b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-s3-traffic.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3-traffic + namespace: ingress-nginx +spec: + egress: + - toCIDR: + - 10.139.2.10/32 + - toCIDR: + - 10.139.2.11/32 + - toCIDR: + - 10.139.2.20/32 + - toCIDR: + - 10.139.2.21/32 + endpointSelector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/instance: ingress-nginx diff --git a/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-world-to-ingress-nginx.yaml b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-world-to-ingress-nginx.yaml new file mode 100644 index 00000000..4ecbe4fa --- /dev/null +++ b/policies/sys/ingress-nginx/CiliumNetworkPolicy-allow-world-to-ingress-nginx.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-world-to-ingress-nginx + namespace: ingress-nginx +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/component: controller + app.kubernetes.io/instance: ingress-nginx + ingress: + - fromEntities: + - world + - toPorts: + - ports: + - port: "80" + protocol: TCP + - port: "443" + protocol: TCP diff --git a/policies/sys/jaeger/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/jaeger/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..29cd1826 --- /dev/null +++ b/policies/sys/jaeger/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: jaeger +spec: + egress: + - toEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/jaeger/CiliumNetworkPolicy-allow-remote-node-to-jaeger.yaml b/policies/sys/jaeger/CiliumNetworkPolicy-allow-remote-node-to-jaeger.yaml new file mode 100644 index 00000000..3d1bddcd --- /dev/null +++ b/policies/sys/jaeger/CiliumNetworkPolicy-allow-remote-node-to-jaeger.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-jaeger + namespace: jaeger +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: jaeger-operator + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/kafka/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/kafka/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..1e35e6ad --- /dev/null +++ b/policies/sys/kafka/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: kafka +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: kafka-operator diff --git a/policies/sys/kafka/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml b/policies/sys/kafka/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml new file mode 100644 index 00000000..cbf9ee6b --- /dev/null +++ b/policies/sys/kafka/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-webhooks + namespace: kafka +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "9443" + protocol: TCP diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-controller-metrics.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-controller-metrics.yaml new file mode 100644 index 00000000..31b7dacc --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-controller-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-controller-metrics + namespace: kube-system +spec: + description: Allow Controller Metrics + endpointSelector: + matchLabels: + k8s-app: kube-controller-manager + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "10257" + protocol: TCP diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-csi-webhook.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-csi-webhook.yaml new file mode 100644 index 00000000..9e8e47fe --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-csi-webhook.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-csi-webhook + namespace: kube-system +spec: + endpointSelector: + matchLabels: + app: csi-snapshot-webhook + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-metrics.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-metrics.yaml new file mode 100644 index 00000000..b4c33ac7 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-dns-metrics + namespace: kube-system +spec: + description: Allow DNS metrics + endpointSelector: + matchLabels: + k8s-app: kube-dns + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "9153" + protocol: TCP diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-world.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-world.yaml new file mode 100644 index 00000000..b69f15f6 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns-world.yaml @@ -0,0 +1,31 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-dns-world + namespace: kube-system +spec: + description: Allow DNS World + egress: + - toCIDR: + - 8.8.8.8/32 + - 172.31.254.11/32 + - 1.1.1.1/32 + toPorts: + - ports: + - port: "53" + protocol: UDP + rules: + dns: + - matchPattern: '*' + - toEntities: + - world + toPorts: + - ports: + - port: "53" + protocol: UDP + rules: + dns: + - matchPattern: '*' + endpointSelector: + matchLabels: + k8s-app: kube-dns diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns.yaml new file mode 100644 index 00000000..7d19e1de --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-dns.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-dns + namespace: kube-system +spec: + description: Allow DNS + endpointSelector: + matchLabels: + k8s-app: kube-dns + ingress: + - fromEndpoints: + - matchExpressions: + - key: io.kubernetes.pod.namespace + operator: Exists + toPorts: + - ports: + - port: "53" + protocol: UDP diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-host-traffic.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-host-traffic.yaml new file mode 100644 index 00000000..08710d89 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-host-traffic.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-host-traffic + namespace: kube-system +spec: + description: Allow Host Traffic + egress: + - toEntities: + - remote-node + - host + - kube-apiserver + endpointSelector: + matchLabels: {} diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-ingress.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-ingress.yaml new file mode 100644 index 00000000..ec1c6cf8 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-hubble-ingress + namespace: kube-system +spec: + description: Allow Hubble ingress + endpointSelector: + matchLabels: + k8s-app: hubble-ui + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-oauth2-ingress.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-oauth2-ingress.yaml new file mode 100644 index 00000000..7e31779e --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-oauth2-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-hubble-oauth2-ingress + namespace: kube-system +spec: + description: Allow Hubble OAuth2 ingress + endpointSelector: + matchLabels: + k8s-app: oauth2-proxy + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-relay-metrics.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-relay-metrics.yaml new file mode 100644 index 00000000..676dddde --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-hubble-relay-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-hubble-relay-metrics + namespace: kube-system +spec: + description: Allow Hubble Relay Metrics + endpointSelector: + matchLabels: + k8s-app: hubble-relay + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "9966" + protocol: TCP diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-microsoft-sso.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-microsoft-sso.yaml new file mode 100644 index 00000000..71769867 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-microsoft-sso.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-microsoft-sso + namespace: kube-system +spec: + description: Allow Microsoft SSO + egress: + - toFQDNs: + - matchName: login.microsoftonline.com + - matchPattern: '*.microsoftonline.com' + - matchName: graph.microsoft.com + endpointSelector: + matchLabels: + k8s-app: oauth2-proxy diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-namespace-traffic.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-namespace-traffic.yaml new file mode 100644 index 00000000..9b20afc2 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-namespace-traffic.yaml @@ -0,0 +1,26 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-namespace-traffic + namespace: kube-system +spec: + description: Allow Namespace Traffic + egress: + - toEndpoints: + - {} + - toEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: kube-system + k8s-app: kube-dns + toPorts: + - ports: + - port: "53" + protocol: UDP + rules: + dns: + - matchPattern: '*' + endpointSelector: + matchLabels: {} + ingress: + - fromEndpoints: + - {} diff --git a/policies/sys/kube-system/CiliumNetworkPolicy-allow-proxy-metrics.yaml b/policies/sys/kube-system/CiliumNetworkPolicy-allow-proxy-metrics.yaml new file mode 100644 index 00000000..0d99e202 --- /dev/null +++ b/policies/sys/kube-system/CiliumNetworkPolicy-allow-proxy-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-proxy-metrics + namespace: kube-system +spec: + description: Allow Proxy metrics + endpointSelector: + matchLabels: + k8s-app: kube-proxy + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "10249" + protocol: TCP diff --git a/policies/sys/kubelet-serving/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/kubelet-serving/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..59732e3a --- /dev/null +++ b/policies/sys/kubelet-serving/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: kubelet-serving-cert-approver +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/kyverno/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/kyverno/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..d52ee5c9 --- /dev/null +++ b/policies/sys/kyverno/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: kyverno +spec: + egress: + - toEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/kyverno/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/kyverno/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..f547d4a5 --- /dev/null +++ b/policies/sys/kyverno/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: kyverno +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: kyverno + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "8000" + protocol: TCP diff --git a/policies/sys/kyverno/CiliumNetworkPolicy-allow-remote-node-to-kyverno.yaml b/policies/sys/kyverno/CiliumNetworkPolicy-allow-remote-node-to-kyverno.yaml new file mode 100644 index 00000000..5087fa86 --- /dev/null +++ b/policies/sys/kyverno/CiliumNetworkPolicy-allow-remote-node-to-kyverno.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-kyverno + namespace: kyverno +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: kyverno + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-loki-backend-to-api-server.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-loki-backend-to-api-server.yaml new file mode 100644 index 00000000..7e43aeb7 --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-loki-backend-to-api-server.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-loki-backend-to-api-server + namespace: loki +spec: + description: Promtail needs to reach kube-apiserver + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/component: backend + app.kubernetes.io/instance: loki diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..e3161e8b --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,20 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: loki +spec: + description: Allow Prometheus read and write + endpointSelector: + matchLabels: + app.kubernetes.io/instance: loki + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "3100" + protocol: TCP + - port: "3500" + protocol: TCP diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-promtail-to-api-server.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-promtail-to-api-server.yaml new file mode 100644 index 00000000..5d7cd58a --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-promtail-to-api-server.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-promtail-to-api-server + namespace: loki +spec: + description: Promtail needs to reach kube-apiserver + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: promtail diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-s3-traffic.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-s3-traffic.yaml new file mode 100644 index 00000000..3be3f4f6 --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-s3-traffic.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3-traffic + namespace: loki +spec: + egress: + - toCIDR: + - 10.139.2.20/32 + - toCIDR: + - 10.139.2.21/32 + endpointSelector: + matchLabels: {} diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-s3.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-s3.yaml new file mode 100644 index 00000000..66ce893f --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-s3.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3 + namespace: loki +spec: + description: Allow loki to ship logs to s3 + egress: + - toFQDNs: + - matchName: s3.production.itpartner.no + - matchPattern: s3.*.itpartner.no + endpointSelector: + matchLabels: + app.kubernetes.io/instance: loki diff --git a/policies/sys/loki/CiliumNetworkPolicy-allow-stats-grafana.yaml b/policies/sys/loki/CiliumNetworkPolicy-allow-stats-grafana.yaml new file mode 100644 index 00000000..47a8be11 --- /dev/null +++ b/policies/sys/loki/CiliumNetworkPolicy-allow-stats-grafana.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-stats-grafana + namespace: loki +spec: + description: Allow stats + egress: + - toFQDNs: + - matchName: stats.grafana.org + endpointSelector: + matchLabels: + app.kubernetes.io/instance: loki diff --git a/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..f90d4d76 --- /dev/null +++ b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: mariadb-operator +spec: + egress: + - toEntities: + - kube-apiserver + endpointSelector: + matchLabels: + app.kubernetes.io/instance: mariadb-operator diff --git a/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-host-to-mariadb.yaml b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-host-to-mariadb.yaml new file mode 100644 index 00000000..5da9d113 --- /dev/null +++ b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-host-to-mariadb.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-host-to-mariadb + namespace: mariadb-operator +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: mariadb-operator + ingress: + - fromEntities: + - host diff --git a/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..726e1b72 --- /dev/null +++ b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: mariadb-operator +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: mariadb-operator + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "8080" + protocol: TCP diff --git a/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml new file mode 100644 index 00000000..43e812ad --- /dev/null +++ b/policies/sys/mariadb-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-webhooks + namespace: mariadb-operator +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - kube-apiserver + - remote-node + toPorts: + - ports: + - port: "443" + protocol: TCP + - port: "9443" + protocol: TCP diff --git a/policies/sys/mayastor/CiliumNetworkPolicy-allow-host-traffic.yaml b/policies/sys/mayastor/CiliumNetworkPolicy-allow-host-traffic.yaml new file mode 100644 index 00000000..7d296c8e --- /dev/null +++ b/policies/sys/mayastor/CiliumNetworkPolicy-allow-host-traffic.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-host-traffic + namespace: mayastor +spec: + description: Allow Host Traffic + egress: + - toEntities: + - remote-node + - host + - kube-apiserver + endpointSelector: + matchLabels: {} diff --git a/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-agent-core.yaml b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-agent-core.yaml new file mode 100644 index 00000000..00e783d1 --- /dev/null +++ b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-agent-core.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-agent-core + namespace: mayastor +spec: + description: Allow Remote to Agent Core + endpointSelector: + matchLabels: + app: agent-core + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-etcd.yaml b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-etcd.yaml new file mode 100644 index 00000000..10464d0e --- /dev/null +++ b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-etcd.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-etcd + namespace: mayastor +spec: + description: Allow Remote to Etcd + endpointSelector: + matchLabels: + app.kubernetes.io/name: etcd + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-maya.yaml b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-maya.yaml new file mode 100644 index 00000000..1de55fac --- /dev/null +++ b/policies/sys/mayastor/CiliumNetworkPolicy-allow-remote-node-to-maya.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-maya + namespace: mayastor +spec: + description: Allow Remote to Mayastor + endpointSelector: + matchLabels: + app: api-rest + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-kube-api.yaml b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..6c53acf9 --- /dev/null +++ b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-kube-api +spec: + description: Allow access to the Kube API server + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app: minio diff --git a/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-minio-operator.yaml b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-minio-operator.yaml new file mode 100644 index 00000000..f5ad26b5 --- /dev/null +++ b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-minio-operator.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-minio-operator +spec: + description: Allow access to the Kube API server + endpointSelector: + matchLabels: + app: minio + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: minio-operator + toPorts: + - ports: + - port: "9000" + protocol: TCP diff --git a/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-nodeport-ingress.yaml b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-nodeport-ingress.yaml new file mode 100644 index 00000000..83985384 --- /dev/null +++ b/policies/sys/minio-operator/CiliumClusterwideNetworkPolicy-allow-nodeport-ingress.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumClusterwideNetworkPolicy +metadata: + name: allow-nodeport-ingress +spec: + description: Allow access to the Kube API server + endpointSelector: + matchLabels: + app: minio + ingress: + - fromEntities: + - world + toPorts: + - ports: + - port: "9000" + protocol: TCP diff --git a/policies/sys/minio-operator/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/minio-operator/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..83a6d612 --- /dev/null +++ b/policies/sys/minio-operator/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: minio-operator +spec: + description: Allow access to the Kube API server + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/odigos-system/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/odigos-system/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..cb20793f --- /dev/null +++ b/policies/sys/odigos-system/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: odigos-system +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/odigos-system/CiliumNetworkPolicy-allow-port-4317.yaml b/policies/sys/odigos-system/CiliumNetworkPolicy-allow-port-4317.yaml new file mode 100644 index 00000000..f1b59b9e --- /dev/null +++ b/policies/sys/odigos-system/CiliumNetworkPolicy-allow-port-4317.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-port-4317 + namespace: odigos-system +spec: + egress: + - toPorts: + - ports: + - port: "4317" + protocol: TCP + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..23c8a706 --- /dev/null +++ b/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: one-password +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: one-password-operator diff --git a/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml b/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml new file mode 100644 index 00000000..9a4a6c4b --- /dev/null +++ b/policies/sys/one-password-operator/CiliumNetworkPolicy-allow-remote-node-webhooks.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-webhooks + namespace: one-password +spec: + endpointSelector: + matchLabels: {} + ingress: + - fromEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "9443" + protocol: TCP diff --git a/policies/sys/opencost/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/opencost/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..99971950 --- /dev/null +++ b/policies/sys/opencost/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: opencost +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: opencost diff --git a/policies/sys/otel/CiliumNetworkPolicy-allow-otel-collector-loadbalancer-ingress.yaml b/policies/sys/otel/CiliumNetworkPolicy-allow-otel-collector-loadbalancer-ingress.yaml new file mode 100644 index 00000000..80f83639 --- /dev/null +++ b/policies/sys/otel/CiliumNetworkPolicy-allow-otel-collector-loadbalancer-ingress.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-otel-collector-loadbalancer-ingress + namespace: otel +spec: + description: Allow ingress from world + endpointSelector: + matchLabels: + app.kubernetes.io/name: opentelemetry-collector + ingress: + - fromEntities: + - world diff --git a/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-egress.yaml b/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-egress.yaml new file mode 100644 index 00000000..0691f418 --- /dev/null +++ b/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-egress.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-mail-egress + namespace: postfix +spec: + description: Allow mailserver to send mails to world + egress: + - toEntities: + - world + endpointSelector: + matchLabels: + app: smtp-relay diff --git a/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-ingress.yaml b/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-ingress.yaml new file mode 100644 index 00000000..a8a2d699 --- /dev/null +++ b/policies/sys/postfix/CiliumNetworkPolicy-allow-mail-ingress.yaml @@ -0,0 +1,21 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-mail-ingress + namespace: postfix +spec: + description: Allow all services in cluster to send mail + endpointSelector: + matchLabels: + app: smtp-relay + ingress: + - fromEndpoints: + - matchExpressions: + - key: io.kubernetes.pod.namespace + operator: Exists + toPorts: + - ports: + - port: "25" + protocol: TCP + - port: "587" + protocol: TCP diff --git a/policies/sys/postfix/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/postfix/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..0bac3318 --- /dev/null +++ b/policies/sys/postfix/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: postfix +spec: + description: 'Allow prometheus metrics ' + endpointSelector: + matchLabels: + app: smtp-relay + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + toPorts: + - ports: + - port: "9154" + protocol: TCP diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-alerting.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-alerting.yaml new file mode 100644 index 00000000..e092cb26 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-alerting.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-alerting + namespace: prometheus +spec: + description: Allow alerting + egress: + - toEntities: + - world + endpointSelector: + matchLabels: + app.kubernetes.io/instance: prom-alertmanager diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-alertmanager-ingress.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-alertmanager-ingress.yaml new file mode 100644 index 00000000..b6f96e64 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-alertmanager-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-alertmanager-ingress + namespace: prometheus +spec: + description: Allow Nginx ingress + endpointSelector: + matchLabels: + app.kubernetes.io/name: alertmanager + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-dns-metrics.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-dns-metrics.yaml new file mode 100644 index 00000000..0ee91e6e --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-dns-metrics.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-dns-metrics + namespace: prometheus +spec: + description: Allow DNS metrics + egress: + - toPorts: + - ports: + - port: "9153" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/name: prometheus diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-etcd-metrics.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-etcd-metrics.yaml new file mode 100644 index 00000000..90ac789e --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-etcd-metrics.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-etcd-metrics + namespace: prometheus +spec: + description: Allow ETCD metrics + egress: + - toPorts: + - ports: + - port: "2379" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/name: prometheus diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-ingress.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-ingress.yaml new file mode 100644 index 00000000..fca3baf2 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-grafana-ingress + namespace: prometheus +spec: + description: Allow Grafana ingress + endpointSelector: + matchLabels: + app.kubernetes.io/name: grafana + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-oidc-login.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-oidc-login.yaml new file mode 100644 index 00000000..ed2084fe --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-oidc-login.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-grafana-oidc-login + namespace: prometheus +spec: + description: Allow Grafana OIDC login + egress: + - toFQDNs: + - matchName: login.microsoftonline.com + - matchPattern: '*.microsoftonline.com' + - matchName: api.github.com + - matchName: github.com + endpointSelector: + matchLabels: + app.kubernetes.io/name: grafana diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-plugins.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-plugins.yaml new file mode 100644 index 00000000..60721c6a --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-plugins.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-grafana-plugins + namespace: prometheus +spec: + description: Allow Grafana Plugins + egress: + - toFQDNs: + - matchName: grafana.com + - matchName: storage.googleapis.com + - matchName: raw.githubusercontent.com + endpointSelector: + matchLabels: + app.kubernetes.io/name: grafana diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-secure-gravatar.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-secure-gravatar.yaml new file mode 100644 index 00000000..453c2330 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-grafana-secure-gravatar.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-grafana-secure-gravatar + namespace: prometheus +spec: + description: Allow Grafana Secure Gravatar + egress: + - toFQDNs: + - matchName: secure.grafana.com + - matchName: secure.gravatar.com + endpointSelector: + matchLabels: + app.kubernetes.io/name: grafana diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-host-traffic.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-host-traffic.yaml new file mode 100644 index 00000000..bb3a591a --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-host-traffic.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-host-traffic + namespace: prometheus +spec: + description: Allow Host Traffic + egress: + - toEntities: + - remote-node + - host + - kube-apiserver + endpointSelector: + matchLabels: {} diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-nginx-ingress.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-nginx-ingress.yaml new file mode 100644 index 00000000..ac650e55 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-nginx-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-nginx-ingress + namespace: prometheus +spec: + description: Allow Nginx ingress + endpointSelector: + matchLabels: + app.kubernetes.io/name: prometheus + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-opencost-scrape.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-opencost-scrape.yaml new file mode 100644 index 00000000..4b7bd679 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-opencost-scrape.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-opencost-scrape + namespace: prometheus +spec: + description: Allow OpenCost scrape + endpointSelector: + matchLabels: + app.kubernetes.io/name: prometheus + ingress: + - fromEndpoints: + - matchLabels: + app.kubernetes.io/name: opencost + io.kubernetes.pod.namespace: opencost + - toPorts: + - ports: + - port: "9090" + protocol: TCP diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-metrics-server.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-metrics-server.yaml new file mode 100644 index 00000000..0603da13 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-metrics-server.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-metrics-server + namespace: prometheus +spec: + description: Allow Remote Metrics Server + endpointSelector: + matchLabels: + app.kubernetes.io/instance: metrics-server + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-webhook.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-webhook.yaml new file mode 100644 index 00000000..eeabfcbd --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-remote-node-to-webhook.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-remote-node-to-webhook + namespace: prometheus +spec: + description: Allow Remote Web Hook + endpointSelector: + matchLabels: + app: kube-prometheus-stack-operator + ingress: + - fromEntities: + - remote-node diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-robusta-ingress.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-robusta-ingress.yaml new file mode 100644 index 00000000..c1856c3f --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-robusta-ingress.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-robusta-ingress + namespace: prometheus +spec: + description: Allow Robusta ingress + endpointSelector: + matchLabels: + app.kubernetes.io/name: prom-prometheus + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: robusta diff --git a/policies/sys/prometheus/CiliumNetworkPolicy-allow-stats-grafana.yaml b/policies/sys/prometheus/CiliumNetworkPolicy-allow-stats-grafana.yaml new file mode 100644 index 00000000..5d1ed102 --- /dev/null +++ b/policies/sys/prometheus/CiliumNetworkPolicy-allow-stats-grafana.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-stats-grafana + namespace: prometheus +spec: + description: Allow stats + egress: + - toFQDNs: + - matchName: stats.grafana.org + endpointSelector: + matchLabels: + app.kubernetes.io/name: grafana diff --git a/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-inter-node-traffic.yaml b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-inter-node-traffic.yaml new file mode 100644 index 00000000..d06ad626 --- /dev/null +++ b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-inter-node-traffic.yaml @@ -0,0 +1,52 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-inter-node-traffic + namespace: rabbitmq +spec: + description: Allow communication between nodes int the RabbitMQ cluster + egress: + - toEndpoints: + - matchLabels: + app.kubernetes.io/component: rabbitmq + toPorts: + - ports: + - port: "4369" + - endPort: 6500 + port: "6000" + - port: "25672" + - port: "35672" + - port: "35673" + - port: "35674" + - port: "35675" + - port: "35676" + - port: "35677" + - port: "35678" + - port: "35679" + - port: "35680" + - port: "35681" + - port: "35682" + endpointSelector: + matchLabels: + app.kubernetes.io/component: rabbitmq + ingress: + - fromEndpoints: + - matchLabels: + app.kubernetes.io/component: rabbitmq + toPorts: + - ports: + - port: "4369" + - endPort: 6500 + port: "6000" + - port: "25672" + - port: "35672" + - port: "35673" + - port: "35674" + - port: "35675" + - port: "35676" + - port: "35677" + - port: "35678" + - port: "35679" + - port: "35680" + - port: "35681" + - port: "35682" diff --git a/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-operator-traffic.yaml b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-operator-traffic.yaml new file mode 100644 index 00000000..b7deeb34 --- /dev/null +++ b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-operator-traffic.yaml @@ -0,0 +1,18 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-operator-traffic + namespace: rabbitmq +spec: + description: Allow access to the RabbitMQ operator + endpointSelector: + matchLabels: + app.kubernetes.io/component: rabbitmq + ingress: + - fromEndpoints: + - matchLabels: + app.kubernetes.io/component: rabbitmq-operator + toPorts: + - ports: + - port: "15672" + - port: "15671" diff --git a/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-rabbitmq-traffic.yaml b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-rabbitmq-traffic.yaml new file mode 100644 index 00000000..f57cd209 --- /dev/null +++ b/policies/sys/rabbitmq/CiliumNetworkPolicy-allow-rabbitmq-traffic.yaml @@ -0,0 +1,27 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-rabbitmq-traffic + namespace: rabbitmq +spec: + description: Allow access to the RabbitMQ cluster + endpointSelector: + matchLabels: + app.kubernetes.io/component: rabbitmq + ingress: + - toPorts: + - ports: + - port: "5672" + - port: "5671" + - port: "5552" + - port: "5551" + - port: "15672" + - port: "15671" + - port: "61613" + - port: "61614" + - port: "1883" + - port: "8883" + - port: "15674" + - port: "15675" + - port: "15692" + - port: "15691" diff --git a/policies/sys/robusta/CiliumNetworkPolicy-allow-ingress.yaml b/policies/sys/robusta/CiliumNetworkPolicy-allow-ingress.yaml new file mode 100644 index 00000000..5e8415c3 --- /dev/null +++ b/policies/sys/robusta/CiliumNetworkPolicy-allow-ingress.yaml @@ -0,0 +1,13 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-ingress + namespace: robusta +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/component: server + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: ingress-nginx diff --git a/policies/sys/robusta/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/robusta/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..f91eed07 --- /dev/null +++ b/policies/sys/robusta/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,15 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: robusta +spec: + egress: + - toEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: {} diff --git a/policies/sys/robusta/CiliumNetworkPolicy-allow-slack.yaml b/policies/sys/robusta/CiliumNetworkPolicy-allow-slack.yaml new file mode 100644 index 00000000..c38a398a --- /dev/null +++ b/policies/sys/robusta/CiliumNetworkPolicy-allow-slack.yaml @@ -0,0 +1,11 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-slack + namespace: robusta +spec: + egress: + - toFQDNs: + - matchPattern: slack.com + endpointSelector: + matchLabels: {} diff --git a/policies/sys/rook-ceph/CiliumNetworkPolicy-allow-oceanbox-subnet.yaml b/policies/sys/rook-ceph/CiliumNetworkPolicy-allow-oceanbox-subnet.yaml new file mode 100644 index 00000000..960eac40 --- /dev/null +++ b/policies/sys/rook-ceph/CiliumNetworkPolicy-allow-oceanbox-subnet.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-oceanbox-subnet + namespace: rook-ceph +spec: + description: Allow oceanbox traffic + egress: + - toCIDR: + - 10.255.241.0/24 + - toCIDR: + - 10.255.244.0/24 + endpointSelector: + matchLabels: {} + ingress: + - fromCIDR: + - 10.255.241.0/24 + - fromCIDR: + - 10.255.244.0/24 diff --git a/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-internal.yaml b/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-internal.yaml new file mode 100644 index 00000000..cd00612d --- /dev/null +++ b/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-internal.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3-internal + namespace: s3-sync +spec: + description: Allow s3 traffic internal + egress: + - toCIDR: + - 10.139.2.20/32 + - toCIDR: + - 10.139.2.21/32 + endpointSelector: + matchLabels: {} diff --git a/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-sync.yaml b/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-sync.yaml new file mode 100644 index 00000000..58b8e709 --- /dev/null +++ b/policies/sys/s3-sync/CiliumNetworkPolicy-allow-s3-sync.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3-sync + namespace: s3-sync +spec: + description: Allow sync to safespring + egress: + - toFQDNs: + - matchName: s3.osl2.safedc.net + endpointSelector: + matchLabels: {} diff --git a/policies/sys/sealed-secrets/CiliumNetworkPolicy-allow-kube-api.yaml b/policies/sys/sealed-secrets/CiliumNetworkPolicy-allow-kube-api.yaml new file mode 100644 index 00000000..d56b8d90 --- /dev/null +++ b/policies/sys/sealed-secrets/CiliumNetworkPolicy-allow-kube-api.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-kube-api + namespace: sealed-secrets +spec: + egress: + - toEntities: + - kube-apiserver + - toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: sealed-secrets diff --git a/policies/sys/tempo/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/tempo/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..aa3ddd8c --- /dev/null +++ b/policies/sys/tempo/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,14 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: tempo +spec: + egress: + - toPorts: + - ports: + - port: "7946" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: tempo diff --git a/policies/sys/tempo/CiliumNetworkPolicy-allow-argo-repo-access.yaml b/policies/sys/tempo/CiliumNetworkPolicy-allow-argo-repo-access.yaml new file mode 100644 index 00000000..50b278c2 --- /dev/null +++ b/policies/sys/tempo/CiliumNetworkPolicy-allow-argo-repo-access.yaml @@ -0,0 +1,12 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-argo-repo-access + namespace: tempo +spec: + egress: + - toFQDNs: + - matchName: s3.production.itpartner.no + endpointSelector: + matchLabels: + app.kubernetes.io/instance: tempo diff --git a/policies/sys/velero/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/velero/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..cb01381b --- /dev/null +++ b/policies/sys/velero/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: velero +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: velero diff --git a/policies/sys/velero/CiliumNetworkPolicy-allow-job-api-server.yaml b/policies/sys/velero/CiliumNetworkPolicy-allow-job-api-server.yaml new file mode 100644 index 00000000..21c8e2ff --- /dev/null +++ b/policies/sys/velero/CiliumNetworkPolicy-allow-job-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-job-api-server + namespace: velero +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + batch.kubernetes.io/job-name: velero-upgrade-crds diff --git a/policies/sys/velero/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/velero/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..1631d4bf --- /dev/null +++ b/policies/sys/velero/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: velero +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: velero + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "8085" + protocol: TCP diff --git a/policies/sys/velero/CiliumNetworkPolicy-allow-s3-itpartner.yaml b/policies/sys/velero/CiliumNetworkPolicy-allow-s3-itpartner.yaml new file mode 100644 index 00000000..78facc0c --- /dev/null +++ b/policies/sys/velero/CiliumNetworkPolicy-allow-s3-itpartner.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-s3-itpartner + namespace: velero +spec: + egress: + - toFQDNs: + - matchName: s3.production.itpartner.no + - toFQDNs: + - matchName: nutanix-obj-s3.kube-system + - toCIDR: + - 10.139.2.10/32 + - toCIDR: + - 10.139.2.20/32 + endpointSelector: {} diff --git a/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-api-server.yaml b/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-api-server.yaml new file mode 100644 index 00000000..7742a0fe --- /dev/null +++ b/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-api-server.yaml @@ -0,0 +1,16 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-api-server + namespace: x509-exporter +spec: + egress: + - toEntities: + - kube-apiserver + toPorts: + - ports: + - port: "6443" + protocol: TCP + endpointSelector: + matchLabels: + app.kubernetes.io/instance: x509-exporter diff --git a/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-prometheus-metrics.yaml b/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-prometheus-metrics.yaml new file mode 100644 index 00000000..cc040dd9 --- /dev/null +++ b/policies/sys/x509-exporter/CiliumNetworkPolicy-allow-prometheus-metrics.yaml @@ -0,0 +1,17 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: allow-prometheus-metrics + namespace: x509-exporter +spec: + endpointSelector: + matchLabels: + app.kubernetes.io/instance: x509-exporter + ingress: + - fromEndpoints: + - matchLabels: + io.kubernetes.pod.namespace: prometheus + - toPorts: + - ports: + - port: "9793" + protocol: TCP diff --git a/values/sys/values-ekman.yaml b/values/sys/values-ekman.yaml new file mode 100644 index 00000000..cac0b848 --- /dev/null +++ b/values/sys/values-ekman.yaml @@ -0,0 +1,168 @@ +cluster_config: + env: "prod" + domain: "ekman.oceanbox.io" + initca: "/var/lib/kubernetes/secrets" + apiserver: "frontend" + apiserverip: "10.255.241.99" + etcd_nodes: [ "10.255.241.80, 10.255.241.90, 10.255.241.99" ] + k8s_nodes: [ "10.255.241.80, 10.255.241.90, 10.255.241.99, 10.255.241.100, 10.255.241.101, 10.255.241.102, 10.255.241.103, 10.255.241.104, 10.255.241.105, 10.255.241.106, 10.255.241.107, 10.255.241.108, 10.255.241.109, 10.255.241.110, 10.255.241.111, 10.255.241.112, 10.255.241.113, 10.255.241.114, 10.255.241.116, 10.255.241.121, 10.255.241.122, 10.255.241.123, 10.255.241.124, 10.255.241.125, 10.255.241.126, 10.255.241.127, 10.255.241.128" ] + cluster: "ekman" + ingress_nodes: ["ekman, frontend" ] + ingress_replica_count: 2 + fileserver: "10.255.241.90" + acme_email: "acme@oceanbox.io" + oidc: + - name: serit-oidc + provider: azuread + tenant: "95e5d757-4fb3-4113-a93c-c41393be61cf" + secret_ref: + name: serit-oidc + group_id: "dd2aa2d6-269d-48fe-90cc-04fd5c08bd29" + external_access: + enabled: false + - name: oceanbox-oidc + provider: azuread + tenant: "3f737008-e9a0-4485-9d27-40329d288089" + secret_ref: + name: oceanbox-oidc + group_id: "eb17a659-4ce6-41bc-9153-d9b117c44479" + nodes: + - name: frontend + taints: [] + labels: + - "node-role.kubernetes.io=control-plane" + - name: ekman + taints: [] + labels: + - "node-role.kubernetes.io=control-plane" + - name: nfs1 + taints: + - "workload=data:NoSchedule" + labels: + - "node-role.kubernetes.io=control-plane" + - "nfs=data" + - name: fs2 + taints: + - "workload=data:NoSchedule" + labels: + - "node-role.kubernetes.io=control-plane" + - "nfs=data" + - name: c0-1 + taints: + - "workload=compute:NoSchedule" + - name: c0-2 + taints: + - "workload=compute:NoSchedule" + - name: c0-3 + taints: + - "workload=compute:NoSchedule" + - name: c0-4 + taints: + - "workload=compute:NoSchedule" + - name: c0-5 + taints: + - "workload=compute:NoSchedule" + - name: c0-6 + taints: + - "workload=compute:NoSchedule" + - name: c0-7 + taints: + - "workload=compute:NoSchedule" + - name: c0-8 + taints: + - "workload=compute:NoSchedule" + - name: c0-9 + taints: + - "workload=compute:NoSchedule" + - name: c0-10 + taints: + - "workload=compute:NoSchedule" + - name: c0-11 + taints: + - "workload=compute:NoSchedule" + - name: c0-12 + taints: + - "workload=compute:NoSchedule" + - name: c0-13 + taints: + - "workload=compute:NoSchedule" + - name: c0-14 + taints: + - "workload=compute:NoSchedule" + - name: c0-15 + taints: + - "workload=compute:NoSchedule" + - name: c0-16 + taints: + - "workload=compute:NoSchedule" + - name: c1-1 + taints: + - "workload=compute:NoSchedule" + - name: c1-2 + taints: + - "workload=compute:NoSchedule" + - name: c1-3 + taints: + - "workload=compute:NoSchedule" + - name: c1-4 + taints: + - "workload=compute:NoSchedule" + - name: c1-5 + taints: + - "workload=compute:NoSchedule" + - name: c1-6 + taints: + - "workload=compute:NoSchedule" + - name: c1-7 + taints: + - "workload=compute:NoSchedule" + - name: c1-8 + taints: + - "workload=compute:NoSchedule" +argocd: + adminLogin: false + additional_rbac_settings: + - g, "eb17a659-4ce6-41bc-9153-d9b117c44479", role:org-admin +linkerd: + trustAnchorPEM: | + -----BEGIN CERTIFICATE----- + MIIBtDCCAVqgAwIBAgIQRlhbOLj9zw+QTGHqbOBaozAKBggqhkjOPQQDAjAlMSMw + IQYDVQQDExpyb290LmxpbmtlcmQuY2x1c3Rlci5sb2NhbDAeFw0yMTA0MDkxNDAy + NTFaFw0zMTA0MDcxNDAyNTFaMCUxIzAhBgNVBAMTGnJvb3QubGlua2VyZC5jbHVz + dGVyLmxvY2FsMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEljOLtSPSi6XIEdFP + VCGa4BKoQ0X5dBSZvHRLt/IzHRzAbIVIjgjvyRQc7EQlRKvZ8P9um/WG1ypyyA2l + C9MWz6NsMGowDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQEwHQYD + VR0OBBYEFHz4UuVKCNX8/hsZCcdTlmWnSCGXMCUGA1UdEQQeMByCGnJvb3QubGlu + a2VyZC5jbHVzdGVyLmxvY2FsMAoGCCqGSM49BAMCA0gAMEUCIGAiz3yNhboVdze1 + sNFcFL2GF5WwW9z53u03UkPkiuBTAiEA4ZHWZJVGV5VAQArL5v32HeH/IjC1ssGl + 7Y8D0rQqkis= + -----END CERTIFICATE----- + webhookPEM: | + -----BEGIN CERTIFICATE----- + MIIBlDCCATqgAwIBAgIRAP9aY0pRwkDnXqi3FwKmfZowCgYIKoZIzj0EAwIwKDEm + MCQGA1UEAxMdd2ViaG9vay5saW5rZXJkLmNsdXN0ZXIubG9jYWwwHhcNMjIxMDI3 + MDUxNTE0WhcNMjQxMDI1MDkxNTE0WjAoMSYwJAYDVQQDEx13ZWJob29rLmxpbmtl + cmQuY2x1c3Rlci5sb2NhbDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIGSt6Th + 62wgjM5dRbZLa9YwPQAm/T2QnTzzrAUm+GeqvKfBhpPMGX6+91/x20X0uV26LvKz + YV1wVMs7tuPZioijRTBDMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/ + AgEBMB0GA1UdDgQWBBQWV6+eqRWOPyLWz9s0HT96MOr01zAKBggqhkjOPQQDAgNI + ADBFAiBTBFuIJUBEI5T2unrnFhM+Bj0rZFfuxQqEwD6+z2YRzwIhAOINkH5u7Z8M + zIVl06Biq2N+MO4TJ+CSS1C1w/22CDru + -----END CERTIFICATE----- + multicluster: + enabled: false +prometheus: + version: 39.6.0 + snitchUrl: "https://nosnch.in/bceb803932" +nfs_provisioner: + version: 4.0.17 + extraMountOpts: + - soft +cert_manager: + version: 1.9.1 +gitlab_runner: + enabled: false +velero: + enabled: false +kyverno: + enabled: true diff --git a/values/sys/values-oceanbox.yaml b/values/sys/values-oceanbox.yaml new file mode 100644 index 00000000..c1348804 --- /dev/null +++ b/values/sys/values-oceanbox.yaml @@ -0,0 +1,160 @@ +cluster_config: + env: "prod" + distro: "talos" + domain: "adm.oceanbox.io" + initca: "" + apiserver: "" + apiserverip: "" + etcd_nodes: [ "10.255.241.201, 10.255.241.202, 10.255.241.203" ] + k8s_nodes: [ "" ] + cluster: "oceanbox" + ingress_nodes: ["oceanbox-controlplane-1, oceanbox-controlplane-2, oceanbox-controlplane-3" ] + ingress_replica_count: 3 + fileserver: "10.255.241.210" + acme_email: "acme@oceanbox.io" + oidc: + - name: serit-oidc + provider: azuread + tenant: "95e5d757-4fb3-4113-a93c-c41393be61cf" + secret_ref: + name: serit-oidc + group_id: "dd2aa2d6-269d-48fe-90cc-04fd5c08bd29" + external_access: + enabled: false + - name: oceanbox-oidc + provider: azuread + tenant: "3f737008-e9a0-4485-9d27-40329d288089" + secret_ref: + name: oceanbox-oidc + group_id: "eb17a659-4ce6-41bc-9153-d9b117c44479" + nodes: [] + ingress_whitelist_ips: + #itp internal + - 10.0.0.0/8 + - 172.16.0.0/12 + - 192.168.0.0/16 + - 172.19.255.0/24 +argocd: + adminLogin: false + version: 7.5.2 + additional_rbac_settings: + - g, "eb17a659-4ce6-41bc-9153-d9b117c44479", role:org-admin + resources: + controller: + memory: 2000Mi + repoServer: + cmp: + enabled: true + name: "kustomize-helm-with-rewrite" + image: "registry.gitlab.com/oceanbox/manifests/kustomize-helm-with-rewrite:latest" + helmTokenSecret: oceanbox-helm + imagePullSecret: + - name: gitlab-pull-secret + initContainers: + - command: + - /bin/sh + - /plugin/init-helm-repos.sh + image: registry.gitlab.com/oceanbox/manifests/kustomize-helm-with-rewrite:latest + imagePullPolicy: Always + name: init-helm-repos + resources: {} + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 999 + seccompProfile: + type: RuntimeDefault + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + env: + - name: OCEANBOX_HELM_ACCESS_TOKEN + valueFrom: + secretKeyRef: + key: token + name: oceanbox-helm + optional: false + volumeMounts: + - mountPath: /helm-working-dir + name: helm-working-dir +linkerd: + enabled: false +prometheus: + snitchUrl: "https://nosnch.in/136c1b564f" + pagerdutyRoutingKey: a5cff1fc46414d0bc02851e4af159ee7 + certRenewCronEnabled: false + fullname: prom + enableFeatures: + - otlp-write-reciever + #- remote-write-reciever + grafana: + persistence: true + thanos: + enabled: true + coredns: + targetPort: 9153 + scheduler: + targetPort: 10259 + kubelet: + enabled: true + https: true +nfs_provisioner: + extraMountOpts: + - soft +gitlab_runner: + enabled: false +kyverno: + enabled: true +cilium: + enabled: true + kubeProxyReplacement: true + upgradeCompatability: 1.15 + nodePort: + enabled: true + l2announcement: + enabled: true + policyAuditMode: false + encryption: + type: wireguard + ingressController: + enabled: false + defaultClass: false + loadbalancerMode: shared + loadbalancerPool: + enabled: true + cidr: + - 10.255.241.11/32 + - 10.255.241.12/32 + - 10.255.241.13/32 + - 10.255.241.14/32 + - 10.255.241.15/32 +velero: + enabled: true + # Opt-in or opt-out pvc backup + # https://velero.io/docs/main/file-system-backup/#to-back-up + backupAllVolumes: false + credentials: + secretName: "velero-s3" + s3: + region: us-east-1 + url: "http://10.255.241.30:30080" + insecureSkipTLSVerify: true + bsl: default + bucket: velero + kubeletRootDir: "/var/lib/kubelet/pods" + resources: + velero: + request: + cpu: 20m + memory: 1Gi + limit: + memory: 2Gi + nodeAgent: + request: + cpu: 20m + memory: 1Gi + limit: + memory: 2Gi