From 64f9d7934c7ff2dd35cfac8a6459c12a45c37289 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 14 Apr 2025 16:15:23 +0300 Subject: [PATCH 01/12] feat: added prometheus and grafana chart configuration --- kubernetes/helm/openslice/Chart.yaml | 11 ++ .../helm/openslice/templates/artemis.yaml | 14 +- .../helm/openslice/templates/blockdiag.yaml | 14 +- .../helm/openslice/templates/bugzilla.yaml | 14 +- .../helm/openslice/templates/centrallog.yaml | 14 +- .../openslice/templates/cridge-secret.yaml | 6 +- .../helm/openslice/templates/cridge.yaml | 10 +- .../openslice/templates/keycloak-config.yaml | 2 +- .../helm/openslice/templates/keycloak.yaml | 14 +- .../openslice/templates/kroki-ingress.yaml | 2 +- .../helm/openslice/templates/kroki.yaml | 14 +- .../helm/openslice/templates/manoclient.yaml | 18 ++- .../helm/openslice/templates/metrico.yaml | 10 +- .../openslice/templates/mysql-config.yaml | 2 +- .../openslice/templates/mysql-pv-pvc.yaml | 4 +- .../helm/openslice/templates/mysql.yaml | 14 +- .../helm/openslice/templates/oasapi.yaml | 14 +- .../templates/openslice-ingress.yaml | 2 +- kubernetes/helm/openslice/templates/osom.yaml | 14 +- .../templates/osportalapi-pv-pvc.yaml | 20 +-- .../helm/openslice/templates/osportalapi.yaml | 36 +++-- .../openslice/templates/osscapi-pv-pvc.yaml | 4 +- .../helm/openslice/templates/osscapi.yaml | 14 +- .../openslice/templates/portalweb-config.yaml | 2 +- .../helm/openslice/templates/portalweb.yaml | 14 +- .../openslice/templates/tmfweb-config.yaml | 2 +- .../helm/openslice/templates/tmfweb.yaml | 14 +- kubernetes/helm/openslice/values.yaml | 151 ++++++++++++++++-- 28 files changed, 330 insertions(+), 120 deletions(-) diff --git a/kubernetes/helm/openslice/Chart.yaml b/kubernetes/helm/openslice/Chart.yaml index b8ede11..49b95d1 100644 --- a/kubernetes/helm/openslice/Chart.yaml +++ b/kubernetes/helm/openslice/Chart.yaml @@ -21,3 +21,14 @@ version: 2.0.0 # 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. appVersion: 2025Q2-SNAPSHOT + +dependencies: + - name: grafana + version: "8.11.4" + repository: "https://grafana.github.io/helm-charts" + condition: grafana.enabled + - name: prometheus + version: "27.8.0" + repository: "https://prometheus-community.github.io/helm-charts" + condition: prometheus.enabled + diff --git a/kubernetes/helm/openslice/templates/artemis.yaml b/kubernetes/helm/openslice/templates/artemis.yaml index 87c75ea..ef55fcb 100644 --- a/kubernetes/helm/openslice/templates/artemis.yaml +++ b/kubernetes/helm/openslice/templates/artemis.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: artemis chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: artemis {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: artemis {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.artemis.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.artemis.repository }}:{{ .Values.image.artemis.tag | default .Chart.AppVersion }}" @@ -48,7 +52,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: artemis chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -65,6 +69,6 @@ spec: port: 61613 targetPort: 61613 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: artemis {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/blockdiag.yaml b/kubernetes/helm/openslice/templates/blockdiag.yaml index 30b2025..bdfd691 100644 --- a/kubernetes/helm/openslice/templates/blockdiag.yaml +++ b/kubernetes/helm/openslice/templates/blockdiag.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: blockdiag chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: blockdiag {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: blockdiag {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.blockdiag.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.blockdiag.repository }}:{{ .Values.image.blockdiag.tag | default .Chart.AppVersion }}" @@ -39,7 +43,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: blockdiag chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -50,6 +54,6 @@ spec: targetPort: 8001 port: 8001 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: blockdiag {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/bugzilla.yaml b/kubernetes/helm/openslice/templates/bugzilla.yaml index d759a25..5f0d339 100644 --- a/kubernetes/helm/openslice/templates/bugzilla.yaml +++ b/kubernetes/helm/openslice/templates/bugzilla.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: bugzilla chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: bugzilla {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: bugzilla {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.bugzilla.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.bugzilla.repository }}:{{ .Values.image.bugzilla.tag | default .Chart.AppVersion }}" @@ -50,7 +54,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: bugzilla chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -61,6 +65,6 @@ spec: port: 13010 targetPort: 13010 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: bugzilla {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/centrallog.yaml b/kubernetes/helm/openslice/templates/centrallog.yaml index b8143fc..b2ab823 100644 --- a/kubernetes/helm/openslice/templates/centrallog.yaml +++ b/kubernetes/helm/openslice/templates/centrallog.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: centrallog chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: centrallog {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: centrallog {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.centrallog.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.centrallog.repository }}:{{ .Values.image.centrallog.tag | default .Chart.AppVersion }}" @@ -48,7 +52,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: centrallog chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -59,7 +63,7 @@ spec: targetPort: 13013 port: 13013 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: centrallog {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/cridge-secret.yaml b/kubernetes/helm/openslice/templates/cridge-secret.yaml index 4a32bff..9838b73 100644 --- a/kubernetes/helm/openslice/templates/cridge-secret.yaml +++ b/kubernetes/helm/openslice/templates/cridge-secret.yaml @@ -15,10 +15,14 @@ kind: Secret metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: cridge chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} + annotations: + {{- with .Values.cridge.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ include "openslice.fullname" . }}-kubeconfig type: Opaque data: diff --git a/kubernetes/helm/openslice/templates/cridge.yaml b/kubernetes/helm/openslice/templates/cridge.yaml index 1065639..084c59d 100644 --- a/kubernetes/helm/openslice/templates/cridge.yaml +++ b/kubernetes/helm/openslice/templates/cridge.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: cridge chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -13,15 +13,19 @@ spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: cridge {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: cridge {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.cridge.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.cridge.repository }}:{{ .Values.image.cridge.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/keycloak-config.yaml b/kubernetes/helm/openslice/templates/keycloak-config.yaml index 748008b..3f2a8ed 100644 --- a/kubernetes/helm/openslice/templates/keycloak-config.yaml +++ b/kubernetes/helm/openslice/templates/keycloak-config.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/keycloak.yaml b/kubernetes/helm/openslice/templates/keycloak.yaml index fca2bdb..fc1d2ae 100644 --- a/kubernetes/helm/openslice/templates/keycloak.yaml +++ b/kubernetes/helm/openslice/templates/keycloak.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.keycloak.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: initContainers: - name: init-mysql-portal @@ -79,7 +83,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -93,6 +97,6 @@ spec: port: 8443 targetPort: 8443 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: keycloak {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/kroki-ingress.yaml b/kubernetes/helm/openslice/templates/kroki-ingress.yaml index c146764..fc9b681 100644 --- a/kubernetes/helm/openslice/templates/kroki-ingress.yaml +++ b/kubernetes/helm/openslice/templates/kroki-ingress.yaml @@ -3,7 +3,7 @@ kind: Ingress metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} annotations: diff --git a/kubernetes/helm/openslice/templates/kroki.yaml b/kubernetes/helm/openslice/templates/kroki.yaml index 5b34ae5..3b54325 100644 --- a/kubernetes/helm/openslice/templates/kroki.yaml +++ b/kubernetes/helm/openslice/templates/kroki.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: kroki chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: kroki {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: kroki {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.kroki.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.kroki.repository }}:{{ .Values.image.kroki.tag | default .Chart.AppVersion }}" @@ -42,7 +46,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: kroki chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -53,6 +57,6 @@ spec: targetPort: 8000 port: 8000 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: kroki {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/manoclient.yaml b/kubernetes/helm/openslice/templates/manoclient.yaml index 064c0c1..751cacb 100644 --- a/kubernetes/helm/openslice/templates/manoclient.yaml +++ b/kubernetes/helm/openslice/templates/manoclient.yaml @@ -3,10 +3,14 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: manoclient chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} + annotations: + {{- with .Values.manoclient.annotations }} + {{- toYaml . | nindent 6 }} + {{- end }} name: {{ include "openslice.fullname" . }}-manoclient spec: {{- if not .Values.autoscaling.enabled }} @@ -14,15 +18,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: manoclient {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: manoclient {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.manoclient.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.manoclient.repository }}:{{ .Values.image.manoclient.tag | default .Chart.AppVersion }}" @@ -48,7 +56,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: manoclient chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -59,6 +67,6 @@ spec: port: 13011 targetPort: 13011 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: manoclient {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/metrico.yaml b/kubernetes/helm/openslice/templates/metrico.yaml index 620ca0a..674ba90 100644 --- a/kubernetes/helm/openslice/templates/metrico.yaml +++ b/kubernetes/helm/openslice/templates/metrico.yaml @@ -4,7 +4,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: metrico chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -15,15 +15,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: metrico {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: metrico {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.metrico.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.metrico.repository }}:{{ .Values.image.metrico.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/mysql-config.yaml b/kubernetes/helm/openslice/templates/mysql-config.yaml index 0de0e52..2c207e1 100644 --- a/kubernetes/helm/openslice/templates/mysql-config.yaml +++ b/kubernetes/helm/openslice/templates/mysql-config.yaml @@ -3,7 +3,7 @@ kind: ConfigMap metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/mysql-pv-pvc.yaml b/kubernetes/helm/openslice/templates/mysql-pv-pvc.yaml index 2746bcf..5c3298f 100644 --- a/kubernetes/helm/openslice/templates/mysql-pv-pvc.yaml +++ b/kubernetes/helm/openslice/templates/mysql-pv-pvc.yaml @@ -3,7 +3,7 @@ kind: PersistentVolumeClaim metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -22,7 +22,7 @@ kind: PersistentVolume metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql type: local chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" diff --git a/kubernetes/helm/openslice/templates/mysql.yaml b/kubernetes/helm/openslice/templates/mysql.yaml index b69a3f1..e9b4391 100644 --- a/kubernetes/helm/openslice/templates/mysql.yaml +++ b/kubernetes/helm/openslice/templates/mysql.yaml @@ -3,7 +3,7 @@ kind: StatefulSet metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -15,15 +15,19 @@ spec: serviceName: {{ include "openslice.fullname" . }}-mysql selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.mysql.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.mysql.repository }}:{{ .Values.image.mysql.tag | default .Chart.AppVersion }}" @@ -72,7 +76,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -83,6 +87,6 @@ spec: port: 3306 targetPort: 3306 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: mysql {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/oasapi.yaml b/kubernetes/helm/openslice/templates/oasapi.yaml index bf78b5d..142ece0 100644 --- a/kubernetes/helm/openslice/templates/oasapi.yaml +++ b/kubernetes/helm/openslice/templates/oasapi.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: oasapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: oasapi {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: oasapi {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.oasapi.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: initContainers: - name: init-keycloak @@ -74,7 +78,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: oasapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -85,6 +89,6 @@ spec: targetPort: 13101 port: 13101 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: oasapi {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/openslice-ingress.yaml b/kubernetes/helm/openslice/templates/openslice-ingress.yaml index 365ffc7..92a295b 100644 --- a/kubernetes/helm/openslice/templates/openslice-ingress.yaml +++ b/kubernetes/helm/openslice/templates/openslice-ingress.yaml @@ -3,7 +3,7 @@ kind: Ingress metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} annotations: diff --git a/kubernetes/helm/openslice/templates/osom.yaml b/kubernetes/helm/openslice/templates/osom.yaml index 14c8d2d..9674c9c 100644 --- a/kubernetes/helm/openslice/templates/osom.yaml +++ b/kubernetes/helm/openslice/templates/osom.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osom chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osom {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osom {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.osom.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: containers: - image: "{{ .Values.image.osom.repository }}:{{ .Values.image.osom.tag | default .Chart.AppVersion }}" @@ -49,7 +53,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osom chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -60,6 +64,6 @@ spec: targetPort: 13100 port: 13100 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osom {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/osportalapi-pv-pvc.yaml b/kubernetes/helm/openslice/templates/osportalapi-pv-pvc.yaml index cb3bc42..46409c6 100644 --- a/kubernetes/helm/openslice/templates/osportalapi-pv-pvc.yaml +++ b/kubernetes/helm/openslice/templates/osportalapi-pv-pvc.yaml @@ -3,37 +3,37 @@ kind: PersistentVolumeClaim metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - name: {{ include "openslice.fullname" . }}-osportalapi-claim0 + name: {{ include "openslice.fullname" . }}-portalapi-claim0 spec: - storageClassName: {{ .Values.storageClass | default "osportalapi-pv-volume" }} + storageClassName: {{ .Values.storageClass | default "portalapi-pv-volume" }} accessModes: - ReadWriteOnce resources: requests: storage: "1Gi" --- -{{- if or (not .Values.storageClass) (eq .Values.storageClass "osportalapi-pv-volume") }} +{{- if or (not .Values.storageClass) (eq .Values.storageClass "portalapi-pv-volume") }} apiVersion: v1 kind: PersistentVolume metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi type: local chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - name: {{ include "openslice.fullname" . }}-osportalapi-pv-volume + name: {{ include "openslice.fullname" . }}-portalapi-pv-volume spec: - storageClassName: "osportalapi-pv-volume" + storageClassName: "portalapi-pv-volume" capacity: storage: "1Gi" accessModes: - ReadWriteOnce hostPath: - path: "/dockerdata-nfs/osportalapi-pv-volume" + path: "/dockerdata-nfs/portalapi-pv-volume" {{- end }} diff --git a/kubernetes/helm/openslice/templates/osportalapi.yaml b/kubernetes/helm/openslice/templates/osportalapi.yaml index 6df11d4..4f8b668 100644 --- a/kubernetes/helm/openslice/templates/osportalapi.yaml +++ b/kubernetes/helm/openslice/templates/osportalapi.yaml @@ -4,26 +4,30 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - name: {{ include "openslice.fullname" . }}-osportalapi + name: {{ include "openslice.fullname" . }}-portalapi spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.portalapi.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} initContainers: @@ -36,7 +40,7 @@ spec: containers: - image: "{{ .Values.image.portalapi.repository }}:{{ .Values.image.portalapi.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.portalapi.pullPolicy | default "Always" }} - name: {{ include "openslice.fullname" . }}-osportalapi + name: {{ include "openslice.fullname" . }}-portalapi env: - name: SPRING_APPLICATION_JSON value: >- @@ -66,30 +70,30 @@ spec: ports: - containerPort: 13000 volumeMounts: - - name: osportalapi-claim0 + - name: portalapi-claim0 mountPath: /root restartPolicy: Always volumes: - - name: osportalapi-claim0 + - name: portalapi-claim0 persistentVolumeClaim: - claimName: {{ include "openslice.fullname" . }}-osportalapi-claim0 + claimName: {{ include "openslice.fullname" . }}-portalapi-claim0 --- apiVersion: v1 kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - name: {{ include "openslice.fullname" . }}-osportalapi + name: {{ include "openslice.fullname" . }}-portalapi spec: ports: - name: "13000" port: 13000 targetPort: 13000 selector: - app: {{ include "openslice.fullname" . }} - org.etsi.osl.service: osportalapi + app: openslice + org.etsi.osl.service: portalapi {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/osscapi-pv-pvc.yaml b/kubernetes/helm/openslice/templates/osscapi-pv-pvc.yaml index d8ce702..2a7049d 100644 --- a/kubernetes/helm/openslice/templates/osscapi-pv-pvc.yaml +++ b/kubernetes/helm/openslice/templates/osscapi-pv-pvc.yaml @@ -3,7 +3,7 @@ kind: PersistentVolumeClaim metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -22,7 +22,7 @@ kind: PersistentVolume metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi type: local chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" diff --git a/kubernetes/helm/openslice/templates/osscapi.yaml b/kubernetes/helm/openslice/templates/osscapi.yaml index 758d519..5da9a63 100644 --- a/kubernetes/helm/openslice/templates/osscapi.yaml +++ b/kubernetes/helm/openslice/templates/osscapi.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.osscapi.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} initContainers: @@ -83,7 +87,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -94,6 +98,6 @@ spec: targetPort: 13082 port: 13082 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: osscapi {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/portalweb-config.yaml b/kubernetes/helm/openslice/templates/portalweb-config.yaml index 0ce4191..f7b923f 100644 --- a/kubernetes/helm/openslice/templates/portalweb-config.yaml +++ b/kubernetes/helm/openslice/templates/portalweb-config.yaml @@ -4,7 +4,7 @@ metadata: name: {{ include "openslice.fullname" . }}-portalweb-config namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/portalweb.yaml b/kubernetes/helm/openslice/templates/portalweb.yaml index c2b22a1..629def6 100644 --- a/kubernetes/helm/openslice/templates/portalweb.yaml +++ b/kubernetes/helm/openslice/templates/portalweb.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.portalweb.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} containers: @@ -53,7 +57,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -63,6 +67,6 @@ spec: - name: "portalwebport" port: 80 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: portalweb {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/tmfweb-config.yaml b/kubernetes/helm/openslice/templates/tmfweb-config.yaml index badce41..b1853ad 100644 --- a/kubernetes/helm/openslice/templates/tmfweb-config.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb-config.yaml @@ -3,7 +3,7 @@ apiVersion: v1 metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/templates/tmfweb.yaml b/kubernetes/helm/openslice/templates/tmfweb.yaml index 2d324ec..70301e2 100644 --- a/kubernetes/helm/openslice/templates/tmfweb.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -14,15 +14,19 @@ spec: {{- end }} selector: matchLabels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb {{- include "openslice.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb {{- include "openslice.selectorLabels" . | nindent 8 }} + annotations: + {{- with .Values.tmfweb.podAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} containers: @@ -48,7 +52,7 @@ kind: Service metadata: namespace: {{ .Release.Namespace }} labels: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} @@ -58,6 +62,6 @@ spec: - name: "tmwebport" port: 80 selector: - app: {{ include "openslice.fullname" . }} + app: openslice org.etsi.osl.service: tmfweb {{- include "openslice.selectorLabels" . | nindent 4 }} diff --git a/kubernetes/helm/openslice/values.yaml b/kubernetes/helm/openslice/values.yaml index e531b73..b4334e8 100644 --- a/kubernetes/helm/openslice/values.yaml +++ b/kubernetes/helm/openslice/values.yaml @@ -132,11 +132,35 @@ cridge: raw: "" # Provide raw kubeconfig here if available portalapi: + + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13000" + prometheus.io/path: "/actuator/prometheus" + logLevel: INFO spring: loglevel: INFO +portalweb: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13000" + prometheus.io/path: "/actuator/prometheus" + +tmfweb: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13000" + prometheus.io/path: "/actuator/prometheus" + manoclient: + + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + spring: loglevel: INFO @@ -154,6 +178,42 @@ osscapi: spring: loglevel: INFO +artemis: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + +kroki: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + +blockdiag: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + +keycloak: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + +centrallog: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + +bugzilla: + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "13011" + prometheus.io/path: "/actuator/prometheus" + # Storage class to be used for provisioning. Default is manual # storageClass: ~ @@ -172,8 +232,6 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" -podAnnotations: {} - podSecurityContext: {} # fsGroup: 2000 @@ -213,13 +271,88 @@ ingress: - path: "/" service: "tmfweb" port: 80 + - path: "/grafana(/|$)(.*)" + service: "grafana" + port: 80 + - path: "/prometheus(/|$)(.*)" + service: "prometheus-server" + port: 80 annotations: {} +## Using default values from https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus +## +prometheus: + enabled: true + + alertmanager: + enabled: false - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local + kube-state-metrics: + enabled: false + + prometheus-node-exporter: + enabled: false + + prometheus-pushgateway: + enabled: false + + commonMetaLabels: + app: openslice + + server: + prefixURL: "/prometheus" + + + ingress: + enabled: false + + persistentVolume: + enabled: false + + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/path: /metrics + prometheus.io/port: "9090" + + serverFiles: + prometheus.yml: + scrape_configs: + - job_name: 'openslice-apps' + kubernetes_sd_configs: + - role: pod + relabel_configs: + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] + action: keep + regex: "true" + - source_labels: [__meta_kubernetes_pod_label_app] + action: keep + regex: openslice + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] + action: replace + regex: (.+):(?:\d+);(\d+) + replacement: ${1}:${2} + target_label: __address__ + +## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml +## +grafana: + enabled: true + adminPassword: admin + + testFramework: + enabled: false # Disable test pod + + grafana.ini: + server: + root_url: "%(protocol)s://%(domain)s/grafana" + serve_from_sub_path: true + + extraLabels: + app: openslice resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -239,9 +372,3 @@ autoscaling: maxReplicas: 100 targetCPUUtilizationPercentage: 80 targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} -- GitLab From 9319722757c457400ad475b54dc87e49ce03392f Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Fri, 9 May 2025 13:23:42 +0300 Subject: [PATCH 02/12] feat: added grafana dashboard config --- .../openslice/files/observability/README.md | 19 + .../observability/grafana_osl_dashboard.json | 1084 +++++++++++++++++ .../helm/openslice/templates/artemis.yaml | 2 +- .../helm/openslice/templates/manoclient.yaml | 2 +- kubernetes/helm/openslice/values.yaml | 26 +- 5 files changed, 1106 insertions(+), 27 deletions(-) create mode 100644 kubernetes/helm/openslice/files/observability/README.md create mode 100644 kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json diff --git a/kubernetes/helm/openslice/files/observability/README.md b/kubernetes/helm/openslice/files/observability/README.md new file mode 100644 index 0000000..b900c22 --- /dev/null +++ b/kubernetes/helm/openslice/files/observability/README.md @@ -0,0 +1,19 @@ +# Openslice Pod Metrics Dashboard (Grafana) + +To visualize Kubernetes pod metrics for Openslice, you have two options: + +## Option 1: Use Grafana Dashboard ID + +1. Open your Grafana instance. +2. Go to **"Import"**. +3. Enter dashboard ID `14350`. +4. Select your Prometheus data source. +5. In the **"namespace"** dropdown, select `openslice`. + +## Option 2: Use the Predefined JSON Dashboard + +1. Locate the file: + `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json` +2. In Grafana, go to **"Import"**. +3. Upload or paste the JSON content. +4. This version has the `openslice` namespace already hardcoded — no dropdown selection is needed. \ No newline at end of file diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json new file mode 100644 index 0000000..61428c0 --- /dev/null +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -0,0 +1,1084 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "7.5.4" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "${DS_PROMETHEUS}", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Fork with improved view and metrics.\r\n\r\n----\r\n\r\nA dashboard to view pod metrics by namespace and pod names.\r\n\r\nUse this Helm chart to launch Grafana into a Kubernetes cluster. It will include this dashboard and many more dashboards to give you visibility into the Kubernetes Cluster. (https://github.com/sekka1/cloud-public/tree/master/kubernetes/pods/grafana-helm)", + "editable": true, + "gnetId": 14350, + "graphTooltip": 0, + "id": null, + "iteration": 1619810022123, + "links": [], + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "hiddenSeries": false, + "id": 8, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(container_cpu_usage_seconds_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU sum", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:378", + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:379", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 12, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum (container_memory_working_set_bytes{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"})", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory sum", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:614", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 18 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(container_network_receive_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network RX sum", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:614", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "decimals": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 18 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(container_network_transmit_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network TX sum", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:614", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 27 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_cpu_usage_seconds_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m])) by (pod,container)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:457", + "format": "cpu", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:458", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 1, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[5m])) by (pod) /sum(increase(container_cpu_cfs_periods_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[5m])) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{container}}", + "legendLink": null, + "refId": "A", + "step": 10 + } + ], + "thresholds": [ + { + "$$hashKey": "object:155", + "colorMode": "critical", + "fill": true, + "line": true, + "op": "gt", + "value": 0.25, + "yaxis": "left" + } + ], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Throttling", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:131", + "format": "percentunit", + "label": null, + "logBase": 1, + "max": 1, + "min": 0, + "show": true + }, + { + "$$hashKey": "object:132", + "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": "${DS_PROMETHEUS}", + "decimals": null, + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 46 + }, + "hiddenSeries": false, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum (container_memory_working_set_bytes{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}) by (pod, container)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:614", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 55 + }, + "hiddenSeries": false, + "id": 6, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "avg(irate(container_network_receive_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m])) by (pod, container)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network RX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:692", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:693", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "links": [] + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 55 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.4", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(irate(container_network_transmit_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m])) by (pod, container)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Network TX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:769", + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "$$hashKey": "object:770", + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "10s", + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "text": "openslice", + "value": "openslice" + }, + "datasource": "${DS_PROMETHEUS}", + "definition": "", + "description": null, + "error": null, + "hide": 2, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(kube_pod_info, namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "description": null, + "error": null, + "hide": 2, + "label": null, + "name": "pod_name", + "options": [ + { + "selected": false, + "text": ".*", + "value": ".*" + } + ], + "query": ".*", + "queryValue": ".*", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-30m", + "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": "Pods (Aggregated view)", + "uid": "-7mPcYniz", + "version": 8 + } \ No newline at end of file diff --git a/kubernetes/helm/openslice/templates/artemis.yaml b/kubernetes/helm/openslice/templates/artemis.yaml index ef55fcb..1cd8f4f 100644 --- a/kubernetes/helm/openslice/templates/artemis.yaml +++ b/kubernetes/helm/openslice/templates/artemis.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.artemis.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/manoclient.yaml b/kubernetes/helm/openslice/templates/manoclient.yaml index 751cacb..0a06b4c 100644 --- a/kubernetes/helm/openslice/templates/manoclient.yaml +++ b/kubernetes/helm/openslice/templates/manoclient.yaml @@ -29,7 +29,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.manoclient.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/values.yaml b/kubernetes/helm/openslice/values.yaml index b4334e8..eda0b3f 100644 --- a/kubernetes/helm/openslice/values.yaml +++ b/kubernetes/helm/openslice/values.yaml @@ -114,7 +114,7 @@ spring: oauthClientSecret: secret mysql: - storage: 10Gi + storage: 100Mi metrico: enabled: true @@ -301,7 +301,6 @@ prometheus: server: prefixURL: "/prometheus" - ingress: enabled: false @@ -314,29 +313,6 @@ prometheus: prometheus.io/path: /metrics prometheus.io/port: "9090" - serverFiles: - prometheus.yml: - scrape_configs: - - job_name: 'openslice-apps' - kubernetes_sd_configs: - - role: pod - relabel_configs: - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] - action: keep - regex: "true" - - source_labels: [__meta_kubernetes_pod_label_app] - action: keep - regex: openslice - - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] - action: replace - target_label: __metrics_path__ - regex: (.+) - - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] - action: replace - regex: (.+):(?:\d+);(\d+) - replacement: ${1}:${2} - target_label: __address__ - ## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml ## grafana: -- GitLab From f554a9641d9fa49048c5f0cdcac42707636fa8d1 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 12 May 2025 12:25:13 +0300 Subject: [PATCH 03/12] feat: added correct identation for pod annotations --- kubernetes/helm/openslice/templates/blockdiag.yaml | 2 +- kubernetes/helm/openslice/templates/bugzilla.yaml | 2 +- kubernetes/helm/openslice/templates/centrallog.yaml | 2 +- kubernetes/helm/openslice/templates/cridge.yaml | 2 +- kubernetes/helm/openslice/templates/keycloak.yaml | 2 +- kubernetes/helm/openslice/templates/kroki.yaml | 2 +- kubernetes/helm/openslice/templates/metrico.yaml | 2 +- kubernetes/helm/openslice/templates/mysql.yaml | 2 +- kubernetes/helm/openslice/templates/osom.yaml | 2 +- kubernetes/helm/openslice/templates/osportalapi.yaml | 2 +- kubernetes/helm/openslice/templates/osscapi.yaml | 2 +- kubernetes/helm/openslice/templates/portalweb.yaml | 2 +- kubernetes/helm/openslice/templates/tmfweb.yaml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/kubernetes/helm/openslice/templates/blockdiag.yaml b/kubernetes/helm/openslice/templates/blockdiag.yaml index bdfd691..bba2c80 100644 --- a/kubernetes/helm/openslice/templates/blockdiag.yaml +++ b/kubernetes/helm/openslice/templates/blockdiag.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.blockdiag.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/bugzilla.yaml b/kubernetes/helm/openslice/templates/bugzilla.yaml index 5f0d339..66fabb5 100644 --- a/kubernetes/helm/openslice/templates/bugzilla.yaml +++ b/kubernetes/helm/openslice/templates/bugzilla.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.bugzilla.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/centrallog.yaml b/kubernetes/helm/openslice/templates/centrallog.yaml index b2ab823..4ee9d45 100644 --- a/kubernetes/helm/openslice/templates/centrallog.yaml +++ b/kubernetes/helm/openslice/templates/centrallog.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.centrallog.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/cridge.yaml b/kubernetes/helm/openslice/templates/cridge.yaml index 084c59d..5a095e3 100644 --- a/kubernetes/helm/openslice/templates/cridge.yaml +++ b/kubernetes/helm/openslice/templates/cridge.yaml @@ -24,7 +24,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.cridge.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/keycloak.yaml b/kubernetes/helm/openslice/templates/keycloak.yaml index fc1d2ae..3fa36e5 100644 --- a/kubernetes/helm/openslice/templates/keycloak.yaml +++ b/kubernetes/helm/openslice/templates/keycloak.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.keycloak.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: initContainers: diff --git a/kubernetes/helm/openslice/templates/kroki.yaml b/kubernetes/helm/openslice/templates/kroki.yaml index 3b54325..6015ba2 100644 --- a/kubernetes/helm/openslice/templates/kroki.yaml +++ b/kubernetes/helm/openslice/templates/kroki.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.kroki.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/metrico.yaml b/kubernetes/helm/openslice/templates/metrico.yaml index 674ba90..46616da 100644 --- a/kubernetes/helm/openslice/templates/metrico.yaml +++ b/kubernetes/helm/openslice/templates/metrico.yaml @@ -26,7 +26,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.metrico.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/mysql.yaml b/kubernetes/helm/openslice/templates/mysql.yaml index e9b4391..4af7091 100644 --- a/kubernetes/helm/openslice/templates/mysql.yaml +++ b/kubernetes/helm/openslice/templates/mysql.yaml @@ -26,7 +26,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.mysql.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/osom.yaml b/kubernetes/helm/openslice/templates/osom.yaml index 9674c9c..b920913 100644 --- a/kubernetes/helm/openslice/templates/osom.yaml +++ b/kubernetes/helm/openslice/templates/osom.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.osom.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: containers: diff --git a/kubernetes/helm/openslice/templates/osportalapi.yaml b/kubernetes/helm/openslice/templates/osportalapi.yaml index 4f8b668..246c351 100644 --- a/kubernetes/helm/openslice/templates/osportalapi.yaml +++ b/kubernetes/helm/openslice/templates/osportalapi.yaml @@ -26,7 +26,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.portalapi.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} diff --git a/kubernetes/helm/openslice/templates/osscapi.yaml b/kubernetes/helm/openslice/templates/osscapi.yaml index 5da9a63..ca88bb6 100644 --- a/kubernetes/helm/openslice/templates/osscapi.yaml +++ b/kubernetes/helm/openslice/templates/osscapi.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.osscapi.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} diff --git a/kubernetes/helm/openslice/templates/portalweb.yaml b/kubernetes/helm/openslice/templates/portalweb.yaml index 629def6..88c7706 100644 --- a/kubernetes/helm/openslice/templates/portalweb.yaml +++ b/kubernetes/helm/openslice/templates/portalweb.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.portalweb.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} diff --git a/kubernetes/helm/openslice/templates/tmfweb.yaml b/kubernetes/helm/openslice/templates/tmfweb.yaml index 70301e2..60df5f9 100644 --- a/kubernetes/helm/openslice/templates/tmfweb.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb.yaml @@ -25,7 +25,7 @@ spec: {{- include "openslice.selectorLabels" . | nindent 8 }} annotations: {{- with .Values.tmfweb.podAnnotations }} - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 8 }} {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} -- GitLab From 598d1b0bfe51adf9752f0388bcbd6269ba2536c5 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 19 May 2025 11:41:37 +0300 Subject: [PATCH 04/12] feat: revert prometheus/grafana changes --- kubernetes/helm/openslice/Chart.yaml | 11 ----- kubernetes/helm/openslice/values.yaml | 59 +-------------------------- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/kubernetes/helm/openslice/Chart.yaml b/kubernetes/helm/openslice/Chart.yaml index 49b95d1..b8ede11 100644 --- a/kubernetes/helm/openslice/Chart.yaml +++ b/kubernetes/helm/openslice/Chart.yaml @@ -21,14 +21,3 @@ version: 2.0.0 # 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. appVersion: 2025Q2-SNAPSHOT - -dependencies: - - name: grafana - version: "8.11.4" - repository: "https://grafana.github.io/helm-charts" - condition: grafana.enabled - - name: prometheus - version: "27.8.0" - repository: "https://prometheus-community.github.io/helm-charts" - condition: prometheus.enabled - diff --git a/kubernetes/helm/openslice/values.yaml b/kubernetes/helm/openslice/values.yaml index eda0b3f..b030067 100644 --- a/kubernetes/helm/openslice/values.yaml +++ b/kubernetes/helm/openslice/values.yaml @@ -114,7 +114,7 @@ spring: oauthClientSecret: secret mysql: - storage: 100Mi + storage: 10Gi metrico: enabled: true @@ -271,65 +271,8 @@ ingress: - path: "/" service: "tmfweb" port: 80 - - path: "/grafana(/|$)(.*)" - service: "grafana" - port: 80 - - path: "/prometheus(/|$)(.*)" - service: "prometheus-server" - port: 80 annotations: {} -## Using default values from https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus -## -prometheus: - enabled: true - - alertmanager: - enabled: false - - kube-state-metrics: - enabled: false - - prometheus-node-exporter: - enabled: false - - prometheus-pushgateway: - enabled: false - - commonMetaLabels: - app: openslice - - server: - prefixURL: "/prometheus" - - ingress: - enabled: false - - persistentVolume: - enabled: false - - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/path: /metrics - prometheus.io/port: "9090" - -## Using default values from https://github.com/grafana/helm-charts/blob/main/charts/grafana/values.yaml -## -grafana: - enabled: true - adminPassword: admin - - testFramework: - enabled: false # Disable test pod - - grafana.ini: - server: - root_url: "%(protocol)s://%(domain)s/grafana" - serve_from_sub_path: true - - extraLabels: - app: openslice - resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little -- GitLab From e9990134bd33211d72a19cf6c8ded5bef62762a4 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 19 May 2025 12:20:10 +0300 Subject: [PATCH 05/12] feat: reverted pod annotation changes --- .../helm/openslice/templates/artemis.yaml | 4 -- .../helm/openslice/templates/blockdiag.yaml | 4 -- .../helm/openslice/templates/bugzilla.yaml | 4 -- .../helm/openslice/templates/centrallog.yaml | 4 -- .../openslice/templates/cridge-secret.yaml | 4 -- .../helm/openslice/templates/cridge.yaml | 4 -- .../helm/openslice/templates/keycloak.yaml | 4 -- .../helm/openslice/templates/kroki.yaml | 4 -- .../helm/openslice/templates/manoclient.yaml | 8 --- .../helm/openslice/templates/metrico.yaml | 4 -- .../helm/openslice/templates/mysql.yaml | 4 -- .../helm/openslice/templates/oasapi.yaml | 4 -- kubernetes/helm/openslice/templates/osom.yaml | 4 -- .../helm/openslice/templates/osportalapi.yaml | 4 -- .../helm/openslice/templates/osscapi.yaml | 4 -- .../helm/openslice/templates/portalweb.yaml | 4 -- .../helm/openslice/templates/tmfweb.yaml | 4 -- kubernetes/helm/openslice/values.yaml | 60 ------------------- 18 files changed, 132 deletions(-) diff --git a/kubernetes/helm/openslice/templates/artemis.yaml b/kubernetes/helm/openslice/templates/artemis.yaml index 1cd8f4f..6691392 100644 --- a/kubernetes/helm/openslice/templates/artemis.yaml +++ b/kubernetes/helm/openslice/templates/artemis.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: artemis {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.artemis.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.artemis.repository }}:{{ .Values.image.artemis.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/blockdiag.yaml b/kubernetes/helm/openslice/templates/blockdiag.yaml index bba2c80..ec961ea 100644 --- a/kubernetes/helm/openslice/templates/blockdiag.yaml +++ b/kubernetes/helm/openslice/templates/blockdiag.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: blockdiag {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.blockdiag.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.blockdiag.repository }}:{{ .Values.image.blockdiag.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/bugzilla.yaml b/kubernetes/helm/openslice/templates/bugzilla.yaml index 66fabb5..b9d9fef 100644 --- a/kubernetes/helm/openslice/templates/bugzilla.yaml +++ b/kubernetes/helm/openslice/templates/bugzilla.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: bugzilla {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.bugzilla.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.bugzilla.repository }}:{{ .Values.image.bugzilla.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/centrallog.yaml b/kubernetes/helm/openslice/templates/centrallog.yaml index 4ee9d45..2ad48cf 100644 --- a/kubernetes/helm/openslice/templates/centrallog.yaml +++ b/kubernetes/helm/openslice/templates/centrallog.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: centrallog {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.centrallog.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.centrallog.repository }}:{{ .Values.image.centrallog.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/cridge-secret.yaml b/kubernetes/helm/openslice/templates/cridge-secret.yaml index 9838b73..8b2811d 100644 --- a/kubernetes/helm/openslice/templates/cridge-secret.yaml +++ b/kubernetes/helm/openslice/templates/cridge-secret.yaml @@ -19,10 +19,6 @@ metadata: org.etsi.osl.service: cridge chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - annotations: - {{- with .Values.cridge.podAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} name: {{ include "openslice.fullname" . }}-kubeconfig type: Opaque data: diff --git a/kubernetes/helm/openslice/templates/cridge.yaml b/kubernetes/helm/openslice/templates/cridge.yaml index 5a095e3..c83e526 100644 --- a/kubernetes/helm/openslice/templates/cridge.yaml +++ b/kubernetes/helm/openslice/templates/cridge.yaml @@ -22,10 +22,6 @@ spec: app: openslice org.etsi.osl.service: cridge {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.cridge.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.cridge.repository }}:{{ .Values.image.cridge.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/keycloak.yaml b/kubernetes/helm/openslice/templates/keycloak.yaml index 3fa36e5..5ee1274 100644 --- a/kubernetes/helm/openslice/templates/keycloak.yaml +++ b/kubernetes/helm/openslice/templates/keycloak.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: keycloak {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.keycloak.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: initContainers: - name: init-mysql-portal diff --git a/kubernetes/helm/openslice/templates/kroki.yaml b/kubernetes/helm/openslice/templates/kroki.yaml index 6015ba2..197f572 100644 --- a/kubernetes/helm/openslice/templates/kroki.yaml +++ b/kubernetes/helm/openslice/templates/kroki.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: kroki {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.kroki.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.kroki.repository }}:{{ .Values.image.kroki.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/manoclient.yaml b/kubernetes/helm/openslice/templates/manoclient.yaml index 0a06b4c..4e3fba3 100644 --- a/kubernetes/helm/openslice/templates/manoclient.yaml +++ b/kubernetes/helm/openslice/templates/manoclient.yaml @@ -7,10 +7,6 @@ metadata: org.etsi.osl.service: manoclient chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" {{- include "openslice.labels" . | nindent 4 }} - annotations: - {{- with .Values.manoclient.annotations }} - {{- toYaml . | nindent 6 }} - {{- end }} name: {{ include "openslice.fullname" . }}-manoclient spec: {{- if not .Values.autoscaling.enabled }} @@ -27,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: manoclient {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.manoclient.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.manoclient.repository }}:{{ .Values.image.manoclient.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/metrico.yaml b/kubernetes/helm/openslice/templates/metrico.yaml index 46616da..0047fee 100644 --- a/kubernetes/helm/openslice/templates/metrico.yaml +++ b/kubernetes/helm/openslice/templates/metrico.yaml @@ -24,10 +24,6 @@ spec: app: openslice org.etsi.osl.service: metrico {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.metrico.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.metrico.repository }}:{{ .Values.image.metrico.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/mysql.yaml b/kubernetes/helm/openslice/templates/mysql.yaml index 4af7091..62955ce 100644 --- a/kubernetes/helm/openslice/templates/mysql.yaml +++ b/kubernetes/helm/openslice/templates/mysql.yaml @@ -24,10 +24,6 @@ spec: app: openslice org.etsi.osl.service: mysql {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.mysql.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.mysql.repository }}:{{ .Values.image.mysql.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/oasapi.yaml b/kubernetes/helm/openslice/templates/oasapi.yaml index 142ece0..b5a7103 100644 --- a/kubernetes/helm/openslice/templates/oasapi.yaml +++ b/kubernetes/helm/openslice/templates/oasapi.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: oasapi {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.oasapi.podAnnotations }} - {{- toYaml . | nindent 4 }} - {{- end }} spec: initContainers: - name: init-keycloak diff --git a/kubernetes/helm/openslice/templates/osom.yaml b/kubernetes/helm/openslice/templates/osom.yaml index b920913..a8221bc 100644 --- a/kubernetes/helm/openslice/templates/osom.yaml +++ b/kubernetes/helm/openslice/templates/osom.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: osom {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.osom.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: containers: - image: "{{ .Values.image.osom.repository }}:{{ .Values.image.osom.tag | default .Chart.AppVersion }}" diff --git a/kubernetes/helm/openslice/templates/osportalapi.yaml b/kubernetes/helm/openslice/templates/osportalapi.yaml index 246c351..df894f2 100644 --- a/kubernetes/helm/openslice/templates/osportalapi.yaml +++ b/kubernetes/helm/openslice/templates/osportalapi.yaml @@ -24,10 +24,6 @@ spec: app: openslice org.etsi.osl.service: portalapi {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.portalapi.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} initContainers: diff --git a/kubernetes/helm/openslice/templates/osscapi.yaml b/kubernetes/helm/openslice/templates/osscapi.yaml index ca88bb6..0adf86d 100644 --- a/kubernetes/helm/openslice/templates/osscapi.yaml +++ b/kubernetes/helm/openslice/templates/osscapi.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: osscapi {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.osscapi.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} initContainers: diff --git a/kubernetes/helm/openslice/templates/portalweb.yaml b/kubernetes/helm/openslice/templates/portalweb.yaml index 88c7706..e492c65 100644 --- a/kubernetes/helm/openslice/templates/portalweb.yaml +++ b/kubernetes/helm/openslice/templates/portalweb.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: portalweb {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.portalweb.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} containers: diff --git a/kubernetes/helm/openslice/templates/tmfweb.yaml b/kubernetes/helm/openslice/templates/tmfweb.yaml index 60df5f9..854ac5a 100644 --- a/kubernetes/helm/openslice/templates/tmfweb.yaml +++ b/kubernetes/helm/openslice/templates/tmfweb.yaml @@ -23,10 +23,6 @@ spec: app: openslice org.etsi.osl.service: tmfweb {{- include "openslice.selectorLabels" . | nindent 8 }} - annotations: - {{- with .Values.tmfweb.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} spec: hostNetwork: {{ .Values.hostNetwork }} containers: diff --git a/kubernetes/helm/openslice/values.yaml b/kubernetes/helm/openslice/values.yaml index b030067..fac3528 100644 --- a/kubernetes/helm/openslice/values.yaml +++ b/kubernetes/helm/openslice/values.yaml @@ -132,35 +132,11 @@ cridge: raw: "" # Provide raw kubeconfig here if available portalapi: - - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13000" - prometheus.io/path: "/actuator/prometheus" - logLevel: INFO spring: loglevel: INFO -portalweb: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13000" - prometheus.io/path: "/actuator/prometheus" - -tmfweb: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13000" - prometheus.io/path: "/actuator/prometheus" - manoclient: - - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - spring: loglevel: INFO @@ -178,42 +154,6 @@ osscapi: spring: loglevel: INFO -artemis: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - -kroki: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - -blockdiag: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - -keycloak: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - -centrallog: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - -bugzilla: - podAnnotations: - prometheus.io/scrape: "true" - prometheus.io/port: "13011" - prometheus.io/path: "/actuator/prometheus" - # Storage class to be used for provisioning. Default is manual # storageClass: ~ -- GitLab From c37096a162828aade116c0a01f41e837905bf637 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Thu, 29 May 2025 17:44:49 +0000 Subject: [PATCH 06/12] feat: update dashboard with logs --- .../openslice/files/observability/README.md | 8 +- .../observability/grafana_osl_dashboard.json | 2650 ++++++++++------- 2 files changed, 1654 insertions(+), 1004 deletions(-) diff --git a/kubernetes/helm/openslice/files/observability/README.md b/kubernetes/helm/openslice/files/observability/README.md index b900c22..2cadf14 100644 --- a/kubernetes/helm/openslice/files/observability/README.md +++ b/kubernetes/helm/openslice/files/observability/README.md @@ -1,6 +1,6 @@ # Openslice Pod Metrics Dashboard (Grafana) -To visualize Kubernetes pod metrics for Openslice, you have two options: +To visualize Kubernetes pod metrics for Openslice, you have the following options: ## Option 1: Use Grafana Dashboard ID @@ -10,10 +10,14 @@ To visualize Kubernetes pod metrics for Openslice, you have two options: 4. Select your Prometheus data source. 5. In the **"namespace"** dropdown, select `openslice`. +This option includes a dashboard with metrics only. + ## Option 2: Use the Predefined JSON Dashboard 1. Locate the file: `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json` 2. In Grafana, go to **"Import"**. 3. Upload or paste the JSON content. -4. This version has the `openslice` namespace already hardcoded — no dropdown selection is needed. \ No newline at end of file +4. This version may need some more work since you may have to configure the Prometheus and Loki data sources. + +This option includes a dashboard with both metrics and logs. diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json index 61428c0..ff27d75 100644 --- a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -1,1084 +1,1730 @@ { - "__inputs": [ + "annotations": { + "list": [ { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" + "builtIn": 1, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.5.4" + ] + }, + "description": "Combined Prometheus + Loki dashboard for pods", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 14350, + "graphTooltip": 0, + "id": 3, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "${DS_PROMETHEUS}", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "description": "Fork with improved view and metrics.\r\n\r\n----\r\n\r\nA dashboard to view pod metrics by namespace and pod names.\r\n\r\nUse this Helm chart to launch Grafana into a Kubernetes cluster. It will include this dashboard and many more dashboards to give you visibility into the Kubernetes Cluster. (https://github.com/sekka1/cloud-public/tree/master/kubernetes/pods/grafana-helm)", - "editable": true, - "gnetId": 14350, - "graphTooltip": 0, - "id": null, - "iteration": 1619810022123, - "links": [], - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 0 + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": "cpu", + "unitScale": true }, - "hiddenSeries": false, - "id": 8, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(container_cpu_usage_seconds_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m]))", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU sum", "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:378", - "format": "cpu", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - { - "$$hashKey": "object:379", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(irate(container_cpu_usage_seconds_total{pod=~\"$pod\",namespace=\"$namespace\",image!=\"\",container!=\"POD\"}[2m]))", + "format": "time_series", + "refId": "A" } + ], + "title": "CPU sum", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": null, - "fieldConfig": { - "defaults": { - "links": [] + "description": "Total Count of log lines in the specified time range", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 9 - }, - "hiddenSeries": false, - "id": 12, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"})", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory sum", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "rgb(31, 255, 7)", + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(31, 255, 7)", + "value": null + }, + { + "color": "rgb(31, 255, 7)", + "value": 10 + }, + { + "color": "rgb(31, 255, 7)", + "value": 50 + } + ] + }, + "unit": "short", + "unitScale": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 11, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false }, - "yaxes": [ - { - "$$hashKey": "object:613", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "$$hashKey": "object:614", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"})[$__interval]))", + "hide": false, + "refId": "A" } + ], + "title": "Total Count of logs", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": null, - "fieldConfig": { - "defaults": { - "links": [] + "description": "Total Count: of $searchable_pattern in the specified time range", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 13, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(irate(container_network_receive_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m]))", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network RX sum", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "0" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short", + "unitScale": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 6, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false }, - "yaxes": [ - { - "$$hashKey": "object:613", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "$$hashKey": "object:614", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval]))", + "hide": false, + "refId": "A" } + ], + "title": "Total Count of pattern in logs: $searchable_pattern", + "type": "stat" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": null, - "fieldConfig": { - "defaults": { - "links": [] + "description": "Live logs is a like 'tail -f' in a real time", + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 21, + "options": { + "dedupStrategy": "none", + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "expr": "{namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\" ", + "hide": false, + "refId": "A" + } + ], + "title": "Live logs", + "type": "logs" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true + }, + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 21 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - "overrides": [] + "expr": "sum(container_memory_working_set_bytes{pod=~\"$pod\",namespace=\"$namespace\",image!=\"\",container!=\"POD\"})", + "format": "time_series", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Memory sum", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "show": true }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 18 + { + "format": "short", + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": { + "stderr": "#C4162A", + "stdout": "#37872D" + }, + "breakPoint": "50%", + "combine": { + "label": "Others", + "threshold": 0 + }, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "#299c46", + "text": "0" + } + }, + "type": "special" + } + ], + "unit": "none", + "unitScale": true }, - "hiddenSeries": false, - "id": 14, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 7, + "w": 9, + "x": 0, + "y": 30 + }, + "id": 19, + "legend": { + "header": "Total Count", + "percentage": true, + "percentageDecimals": 2, + "show": true, + "sort": "total", + "sortDesc": true, + "values": true + }, + "legendType": "right", + "links": [], + "maxDataPoints": 100, + "nullPointMode": "connected", + "options": { "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": true + "displayMode": "list", + "placement": "right", + "showLegend": true }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum(irate(container_network_transmit_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m]))", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network TX sum", "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:613", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "mode": "single", + "sort": "none" + } + }, + "pieType": "pie", + "pluginVersion": "7.0.4", + "strokeWidth": "1.5", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "$$hashKey": "object:614", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval])) by (stream)", + "hide": false, + "refId": "A" } + ], + "title": "Total count of stderr / stdout pie", + "type": "piechart", + "valueName": "total" + }, + { + "aliasColors": {}, + "breakPoint": "50%", + "combine": { + "label": "Others", + "threshold": 0 }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "decimals": 0, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "overrides": [] - }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 27 + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unitScale": true }, - "hiddenSeries": false, - "id": 2, + "overrides": [] + }, + "fontSize": "80%", + "format": "short", + "gridPos": { + "h": 7, + "w": 9, + "x": 9, + "y": 30 + }, + "id": 20, + "interval": "1m", + "legend": { + "header": "total count", + "percentage": true, + "show": true, + "sort": "total", + "sortDesc": true, + "values": true + }, + "legendType": "right", + "links": [], + "maxDataPoints": "", + "nullPointMode": "connected", + "options": { "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true + "displayMode": "list", + "placement": "right", + "showLegend": true }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg(irate(container_cpu_usage_seconds_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m])) by (pod,container)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU", "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "mode": "single", + "sort": "none" + } + }, + "pieType": "donut", + "pluginVersion": "6.4.3", + "strokeWidth": "0.4", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", + "refId": "A" + } + ], + "title": "Matched word: \"$searchable_pattern\" donut", + "type": "piechart", + "valueName": "total" + }, + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": { + "mappings": [ + { + "options": { + "match": "null", + "result": { + "color": "green", + "text": "0" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "percent", + "unitScale": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 30 + }, + "id": 9, + "links": [], + "maxDataPoints": 100, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false }, - "yaxes": [ - { - "$$hashKey": "object:457", - "format": "cpu", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "showThresholdLabels": false, + "showThresholdMarkers": false, + "sizing": "auto" + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "$$hashKey": "object:458", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) * 100 / sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"})[$__interval]))", + "hide": false, + "refId": "A" } + ], + "title": "\"$searchable_pattern\" Percentage for specified time", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": {}, - "overrides": [] + "decimals": 0, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 36 + "overrides": [] + }, + "fill": 1, + "fillGradient": 1, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 37 + }, + "hiddenSeries": false, + "id": 18, + "interval": "1m", + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 3, + "links": [], + "maxDataPoints": "", + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Matched word: \"$searchable_pattern\" historical", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:425", + "decimals": 0, + "format": "short", + "label": "Count", + "logBase": 1, + "show": true }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true + { + "$$hashKey": "object:426", + "format": "short", + "logBase": 1, + "show": false + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", - "options": { - "alertThreshold": true + "overrides": [] + }, + "fill": 1, + "fillGradient": 10, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 37 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 0.5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "expr": "sum(rate(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[30s])) by (pod)", + "hide": false, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "\"$searchable_pattern\" Rate per Pod", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:2804", + "format": "short", + "logBase": 10, + "show": true }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 1, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(increase(container_cpu_cfs_throttled_periods_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[5m])) by (pod) /sum(increase(container_cpu_cfs_periods_total{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[5m])) by (pod)", - "format": "time_series", - "interval": "", - "intervalFactor": 2, - "legendFormat": "{{container}}", - "legendLink": null, - "refId": "A", - "step": 10 - } - ], - "thresholds": [ - { - "$$hashKey": "object:155", - "colorMode": "critical", - "fill": true, - "line": true, - "op": "gt", - "value": 0.25, - "yaxis": "left" - } - ], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "CPU Throttling", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + { + "$$hashKey": "object:2805", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unit": "none", + "unitScale": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "overrides": [] + }, + "fill": 2, + "fillGradient": 4, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 46 + }, + "hiddenSeries": false, + "id": 7, + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "maxDataPoints": 100, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 2, + "points": true, + "renderer": "flot", + "seriesOverrides": [ + { + "$$hashKey": "object:154", + "alias": "{stream=\"stderr\"} stderr", + "color": "#C4162A", + "legend": false, + "linewidth": 2 }, - "yaxes": [ - { - "$$hashKey": "object:131", - "format": "percentunit", - "label": null, - "logBase": 1, - "max": 1, - "min": 0, - "show": true + { + "$$hashKey": "object:220", + "alias": "{stream=\"stdout\"} stdout", + "color": "#56A64B", + "legend": false, + "linewidth": 2 + } + ], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "P8E80F9AEF21F6940" }, - { - "$$hashKey": "object:132", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval])) by (stream)", + "hide": false, + "refId": "A" } + ], + "thresholds": [], + "timeRegions": [], + "title": "Count of stderr / stdout historical", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": null, - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:188", + "format": "none", + "logBase": 1, + "show": true }, - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 46 + { + "$$hashKey": "object:189", + "format": "short", + "label": "", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "hiddenSeries": false, - "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 54 + }, + "hiddenSeries": false, + "id": 13, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(irate(container_network_receive_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network RX sum", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "logBase": 1, + "show": true }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", - "options": { - "alertThreshold": true + { + "$$hashKey": "object:614", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "sum (container_memory_working_set_bytes{pod=~\"[[pod_name]].*\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}) by (pod, container)", - "format": "time_series", - "hide": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Memory", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 54 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "max": true, + "min": false, + "rightSide": true, + "show": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum(irate(container_network_transmit_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m]))", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network TX sum", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:613", + "format": "decbytes", + "logBase": 1, + "show": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + { + "$$hashKey": "object:614", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "yaxes": [ - { - "$$hashKey": "object:613", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "overrides": [] + }, + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 63 + }, + "hiddenSeries": false, + "id": 15, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": true, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "max", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - { - "$$hashKey": "object:614", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "editorMode": "code", + "expr": "avg(irate(container_cpu_usage_seconds_total{pod=~\"$pod\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m])) by (pod,container)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" } + ], + "thresholds": [], + "timeRegions": [], + "title": "CPU", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:457", + "format": "cpu", + "logBase": 1, + "show": true }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 55 + { + "$$hashKey": "object:458", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes", + "unitScale": true }, - "hiddenSeries": false, - "id": 6, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 72 + }, + "id": 4, + "links": [], + "options": { "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "avg(irate(container_network_receive_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m])) by (pod, container)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network RX", "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum (container_memory_working_set_bytes{pod=~\"$pod$\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}) by (pod, container)", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Memory", + "type": "timeseries" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 81 + }, + "hiddenSeries": false, + "id": 22, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "editorMode": "code", + "expr": "avg(irate(container_network_receive_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m])) by (pod, container)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network RX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:692", + "format": "decbytes", + "logBase": 1, + "show": true }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + { + "$$hashKey": "object:693", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" + }, + "fieldConfig": { + "defaults": { + "links": [], + "unitScale": true }, - "yaxes": [ - { - "$$hashKey": "object:692", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 81 + }, + "hiddenSeries": false, + "id": 23, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "10.3.3", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - { - "$$hashKey": "object:693", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null + "editorMode": "code", + "exemplar": true, + "expr": "avg(irate(container_network_transmit_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m])) by (pod, container)", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "range": true, + "refId": "A" } + ], + "thresholds": [], + "timeRegions": [], + "title": "Network TX", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" }, + "type": "graph", + "xaxis": { + "mode": "time", + "show": true, + "values": [] + }, + "yaxes": [ + { + "$$hashKey": "object:769", + "format": "decbytes", + "logBase": 1, + "show": true + }, + { + "$$hashKey": "object:770", + "format": "short", + "logBase": 1, + "show": true + } + ], + "yaxis": { + "align": false + } + } + ], + "refresh": "10s", + "schemaVersion": 39, + "tags": [], + "templating": { + "list": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fieldConfig": { - "defaults": { - "links": [] - }, - "overrides": [] + "current": { + "selected": false, + "text": "monitoring", + "value": "monitoring" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 55 + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - "hiddenSeries": false, - "id": 7, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "definition": "", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "namespace", + "options": [], + "query": "label_values(kube_pod_info, namespace)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "alertThreshold": true + "datasource": { + "type": "prometheus", + "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" }, - "percentage": false, - "pluginVersion": "7.5.4", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "avg(irate(container_network_transmit_bytes_total{pod=~\"[[pod_name]].*\", namespace=~\"[[namespace]].*\"}[5m])) by (pod, container)", - "format": "time_series", - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Network TX", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" + "definition": "", + "hide": 0, + "includeAll": true, + "multi": false, + "name": "pod", + "options": [], + "query": "label_values(kube_pod_info{namespace=\"$namespace\"},pod)", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": false, + "text": ".*", + "value": ".*" }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "hide": 0, + "includeAll": false, + "multi": false, + "name": "stream", + "options": [], + "query": ".*", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" }, - "yaxes": [ - { - "$$hashKey": "object:769", - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:770", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "hide": 0, + "includeAll": false, + "multi": false, + "name": "searchable_pattern", + "options": [], + "query": "", + "skipUrlSync": false, + "type": "textbox" } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" ], - "refresh": "10s", - "schemaVersion": 27, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "selected": true, - "text": "openslice", - "value": "openslice" - }, - "datasource": "${DS_PROMETHEUS}", - "definition": "", - "description": null, - "error": null, - "hide": 2, - "includeAll": false, - "label": null, - "multi": false, - "name": "namespace", - "options": [], - "query": { - "query": "label_values(kube_pod_info, namespace)", - "refId": "Prometheus-namespace-Variable-Query" - }, - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "current": {}, - "description": null, - "error": null, - "hide": 2, - "label": null, - "name": "pod_name", - "options": [ - { - "selected": false, - "text": ".*", - "value": ".*" - } - ], - "query": ".*", - "queryValue": ".*", - "skipUrlSync": false, - "type": "textbox" - } - ] - }, - "time": { - "from": "now-30m", - "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": "Pods (Aggregated view)", - "uid": "-7mPcYniz", - "version": 8 - } \ No newline at end of file + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Pods + Logs Dashboard", + "uid": "-pods-logs-dashboard", + "version": 13, + "weekStart": "" +} \ No newline at end of file -- GitLab From 06b9b0ae23e3d1d6d85de67e0ac4366977f922e9 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 16 Jun 2025 15:54:01 +0000 Subject: [PATCH 07/12] feat: use loki logs --- .../observability/grafana_osl_dashboard.json | 521 ++---------------- 1 file changed, 59 insertions(+), 462 deletions(-) diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json index ff27d75..c068939 100644 --- a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -3,10 +3,7 @@ "list": [ { "builtIn": 1, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -25,10 +22,7 @@ "liveNow": false, "panels": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -112,10 +106,7 @@ "pluginVersion": "10.3.3", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "expr": "sum(irate(container_cpu_usage_seconds_total{pod=~\"$pod\",namespace=\"$namespace\",image!=\"\",container!=\"POD\"}[2m]))", "format": "time_series", "refId": "A" @@ -125,10 +116,7 @@ "type": "timeseries" }, { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "description": "Total Count of log lines in the specified time range", "fieldConfig": { "defaults": { @@ -197,11 +185,8 @@ "pluginVersion": "10.3.3", "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"})[$__interval]))", + "datasource": "${DS_LOKI}", + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval]))", "hide": false, "refId": "A" } @@ -210,10 +195,7 @@ "type": "stat" }, { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "description": "Total Count: of $searchable_pattern in the specified time range", "fieldConfig": { "defaults": { @@ -277,11 +259,8 @@ "pluginVersion": "10.3.3", "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval]))", + "datasource": "${DS_LOKI}", + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval]))", "hide": false, "refId": "A" } @@ -290,10 +269,7 @@ "type": "stat" }, { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "description": "Live logs is a like 'tail -f' in a real time", "gridPos": { "h": 9, @@ -314,11 +290,8 @@ }, "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "{namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\" ", + "datasource": "${DS_LOKI}", + "expr": "{namespace=\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\" ", "hide": false, "refId": "A" } @@ -331,10 +304,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -378,10 +348,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "expr": "sum(container_memory_working_set_bytes{pod=~\"$pod\",namespace=\"$namespace\",image!=\"\",container!=\"POD\"})", "format": "time_series", "refId": "A" @@ -415,108 +382,6 @@ "align": false } }, - { - "aliasColors": { - "stderr": "#C4162A", - "stdout": "#37872D" - }, - "breakPoint": "50%", - "combine": { - "label": "Others", - "threshold": 0 - }, - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "#299c46", - "text": "0" - } - }, - "type": "special" - } - ], - "unit": "none", - "unitScale": true - }, - "overrides": [] - }, - "fontSize": "80%", - "format": "short", - "gridPos": { - "h": 7, - "w": 9, - "x": 0, - "y": 30 - }, - "id": 19, - "legend": { - "header": "Total Count", - "percentage": true, - "percentageDecimals": 2, - "show": true, - "sort": "total", - "sortDesc": true, - "values": true - }, - "legendType": "right", - "links": [], - "maxDataPoints": 100, - "nullPointMode": "connected", - "options": { - "legend": { - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "pieType": "pie", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pieType": "pie", - "pluginVersion": "7.0.4", - "strokeWidth": "1.5", - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval])) by (stream)", - "hide": false, - "refId": "A" - } - ], - "title": "Total count of stderr / stdout pie", - "type": "piechart", - "valueName": "total" - }, { "aliasColors": {}, "breakPoint": "50%", @@ -524,10 +389,7 @@ "label": "Others", "threshold": 0 }, - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "decimals": 0, "fieldConfig": { "defaults": { @@ -592,11 +454,8 @@ "strokeWidth": "0.4", "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", + "datasource": "${DS_LOKI}", + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", "refId": "A" } ], @@ -605,10 +464,7 @@ "valueName": "total" }, { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "fieldConfig": { "defaults": { "mappings": [ @@ -666,11 +522,8 @@ "pluginVersion": "10.3.3", "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) * 100 / sum(count_over_time(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"})[$__interval]))", + "datasource": "${DS_LOKI}", + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) * 100 / sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval]))", "hide": false, "refId": "A" } @@ -683,10 +536,7 @@ "bars": true, "dashLength": 10, "dashes": false, - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, + "datasource": "${DS_LOKI}", "decimals": 0, "fieldConfig": { "defaults": { @@ -698,10 +548,10 @@ "fill": 1, "fillGradient": 1, "gridPos": { - "h": 9, - "w": 12, + "h": 7, + "w": 9, "x": 0, - "y": 37 + "y": 30 }, "hiddenSeries": false, "id": 18, @@ -738,11 +588,8 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\", stream=~\"$stream\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", + "datasource": "${DS_LOKI}", + "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[$__interval])) by (pod)", "refId": "A" } ], @@ -785,221 +632,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "fieldConfig": { - "defaults": { - "links": [], - "unitScale": true - }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 10, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 37 - }, - "hiddenSeries": false, - "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "maxDataPoints": 100, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "10.3.3", - "pointradius": 0.5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(rate(({namespace=\"$namespace\", stream=~\"$stream\", pod=~\"$pod\"} |~ \"(?i)$searchable_pattern\")[30s])) by (pod)", - "hide": false, - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "\"$searchable_pattern\" Rate per Pod", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:2804", - "format": "short", - "logBase": 10, - "show": true - }, - { - "$$hashKey": "object:2805", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "fieldConfig": { - "defaults": { - "links": [], - "unit": "none", - "unitScale": true - }, - "overrides": [] - }, - "fill": 2, - "fillGradient": 4, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 46 - }, - "hiddenSeries": false, - "id": 7, - "legend": { - "alignAsTable": false, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "maxDataPoints": 100, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "10.3.3", - "pointradius": 2, - "points": true, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:154", - "alias": "{stream=\"stderr\"} stderr", - "color": "#C4162A", - "legend": false, - "linewidth": 2 - }, - { - "$$hashKey": "object:220", - "alias": "{stream=\"stdout\"} stdout", - "color": "#56A64B", - "legend": false, - "linewidth": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "datasource": { - "type": "loki", - "uid": "P8E80F9AEF21F6940" - }, - "expr": "sum(count_over_time(({namespace=\"$namespace\", pod=~\"$pod\"})[$__interval])) by (stream)", - "hide": false, - "refId": "A" - } - ], - "thresholds": [], - "timeRegions": [], - "title": "Count of stderr / stdout historical", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:188", - "format": "none", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:189", - "format": "short", - "label": "", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -1046,10 +679,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, "expr": "sum(irate(container_network_receive_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m]))", @@ -1099,10 +729,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -1149,10 +776,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, "expr": "sum(irate(container_network_transmit_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m]))", @@ -1202,10 +826,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -1255,10 +876,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "expr": "avg(irate(container_cpu_usage_seconds_total{pod=~\"$pod\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}[2m])) by (pod,container)", "format": "time_series", @@ -1303,10 +921,7 @@ } }, { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "color": { @@ -1392,10 +1007,7 @@ "pluginVersion": "10.3.3", "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, "expr": "sum (container_memory_working_set_bytes{pod=~\"$pod$\", namespace=\"$namespace\", image!=\"\", pod!=\"\", container!=\"POD\", container!=\"\"}) by (pod, container)", @@ -1416,10 +1028,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -1464,10 +1073,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "expr": "avg(irate(container_network_receive_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m])) by (pod, container)", "format": "time_series", @@ -1515,10 +1121,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "fieldConfig": { "defaults": { "links": [], @@ -1563,10 +1166,7 @@ "steppedLine": false, "targets": [ { - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "editorMode": "code", "exemplar": true, "expr": "avg(irate(container_network_transmit_bytes_total{pod=~\"$pod\", namespace=~\"$namespace\"}[5m])) by (pod, container)", @@ -1622,10 +1222,7 @@ "text": "monitoring", "value": "monitoring" }, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": true, @@ -1645,10 +1242,7 @@ "text": "All", "value": "$__all" }, - "datasource": { - "type": "prometheus", - "uid": "fe5aa271-2586-46ed-9d19-73cf8e39f3f7" - }, + "datasource": "${DS_PROMETHEUS}", "definition": "", "hide": 0, "includeAll": true, @@ -1662,21 +1256,6 @@ "sort": 0, "type": "query" }, - { - "current": { - "selected": false, - "text": ".*", - "value": ".*" - }, - "hide": 0, - "includeAll": false, - "multi": false, - "name": "stream", - "options": [], - "query": ".*", - "skipUrlSync": false, - "type": "textbox" - }, { "current": { "selected": false, @@ -1726,5 +1305,23 @@ "title": "Pods + Logs Dashboard", "uid": "-pods-logs-dashboard", "version": 13, - "weekStart": "" + "weekStart": "", + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + }, + { + "name": "DS_LOKI", + "label": "Loki", + "description": "", + "type": "datasource", + "pluginId": "loki", + "pluginName": "Loki" + } + ] } \ No newline at end of file -- GitLab From 71cd4066aa5a050ce2ca2ec5b26589f9f6e2f7dd Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 16 Jun 2025 16:06:32 +0000 Subject: [PATCH 08/12] feat: improve log dashboard --- .../openslice/files/observability/grafana_osl_dashboard.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json index c068939..c8e33f7 100644 --- a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -279,14 +279,14 @@ }, "id": 21, "options": { - "dedupStrategy": "none", + "dedupStrategy": "signature", "enableLogDetails": true, "prettifyLogMessage": false, "showCommonLabels": false, "showLabels": false, "showTime": true, "sortOrder": "Descending", - "wrapLogMessage": false + "wrapLogMessage": true }, "targets": [ { -- GitLab From a8d1b140cbbfaf9218969882500b47dd0cadcc5a Mon Sep 17 00:00:00 2001 From: trantzas Date: Tue, 17 Jun 2025 12:31:58 +0000 Subject: [PATCH 09/12] Changed a graph title for uniformity --- .../openslice/files/observability/grafana_osl_dashboard.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json index c8e33f7..f417a70 100644 --- a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -528,7 +528,7 @@ "refId": "A" } ], - "title": "\"$searchable_pattern\" Percentage for specified time", + "title": "Matched word: \"$searchable_pattern\" Percentage for specified time", "type": "gauge" }, { -- GitLab From cac8338cdea520c680526051d8020a17d9126637 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 23 Jun 2025 16:34:37 +0300 Subject: [PATCH 10/12] feat: update readme --- .../openslice/files/observability/README.md | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/kubernetes/helm/openslice/files/observability/README.md b/kubernetes/helm/openslice/files/observability/README.md index 2cadf14..d67464b 100644 --- a/kubernetes/helm/openslice/files/observability/README.md +++ b/kubernetes/helm/openslice/files/observability/README.md @@ -1,23 +1,24 @@ # Openslice Pod Metrics Dashboard (Grafana) -To visualize Kubernetes pod metrics for Openslice, you have the following options: +A dashboard to visualize Kubernetes pod metrics and logs. -## Option 1: Use Grafana Dashboard ID +## Prerequisites -1. Open your Grafana instance. -2. Go to **"Import"**. -3. Enter dashboard ID `14350`. -4. Select your Prometheus data source. -5. In the **"namespace"** dropdown, select `openslice`. +- **Grafana** + A running Grafana instance (v7.0+ recommended). +- **Prometheus data source** + - Must be added in Grafana and scraping your cluster’s metrics (e.g. via kube-prometheus or another Prometheus setup). +- **Loki data source** + - Must be added in Grafana to include pod logs alongside metrics. +- **Kubernetes metrics exposure** + - Metrics-server or Prometheus exporters installed so that Prometheus can scrape pod-level metrics. -This option includes a dashboard with metrics only. +## Import Dashboard from JSON -## Option 2: Use the Predefined JSON Dashboard - -1. Locate the file: - `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json` -2. In Grafana, go to **"Import"**. -3. Upload or paste the JSON content. -4. This version may need some more work since you may have to configure the Prometheus and Loki data sources. - -This option includes a dashboard with both metrics and logs. +1. In your Grafana UI, click **“Import”**. +2. Under **“Upload JSON file”**, select + `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json`. +3. Choose your **Prometheus** data source. +4. Choose your **Loki** data source. +5. Click **“Import”**. +6. In the **“namespace”** variable dropdown, select `openslice`. -- GitLab From 8c7a085bfc3ac017d235f1c603a2da6a731639f4 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 23 Jun 2025 13:36:28 +0000 Subject: [PATCH 11/12] feat: updated README --- .../openslice/files/observability/README.md | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/kubernetes/helm/openslice/files/observability/README.md b/kubernetes/helm/openslice/files/observability/README.md index 2cadf14..b268ff6 100644 --- a/kubernetes/helm/openslice/files/observability/README.md +++ b/kubernetes/helm/openslice/files/observability/README.md @@ -1,23 +1,24 @@ -# Openslice Pod Metrics Dashboard (Grafana) +# Openslice Pod Metrics and Logs Dashboard (Grafana) -To visualize Kubernetes pod metrics for Openslice, you have the following options: +A dashboard to visualize Kubernetes pod metrics and logs. -## Option 1: Use Grafana Dashboard ID +## Prerequisites -1. Open your Grafana instance. -2. Go to **"Import"**. -3. Enter dashboard ID `14350`. -4. Select your Prometheus data source. -5. In the **"namespace"** dropdown, select `openslice`. +- **Grafana** + A running Grafana instance (v7.0+ recommended). +- **Prometheus data source** + - Must be added in Grafana and scraping your cluster’s metrics (e.g. via kube-prometheus or another Prometheus setup). +- **Loki data source** + - Must be added in Grafana to include pod logs alongside metrics. +- **Kubernetes metrics exposure** + - Metrics-server or Prometheus exporters installed so that Prometheus can scrape pod-level metrics. -This option includes a dashboard with metrics only. +## Import Dashboard from JSON -## Option 2: Use the Predefined JSON Dashboard - -1. Locate the file: - `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json` -2. In Grafana, go to **"Import"**. -3. Upload or paste the JSON content. -4. This version may need some more work since you may have to configure the Prometheus and Loki data sources. - -This option includes a dashboard with both metrics and logs. +1. In your Grafana UI, click **“Import”**. +2. Under **“Upload JSON file”**, select + `kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json`. +3. Choose your **Prometheus** data source. +4. Choose your **Loki** data source. +5. Click **“Import”**. +6. In the **“namespace”** variable dropdown, select `openslice`. -- GitLab From 20439b4aaeb2dabdd30ca416a78a498eb800d5f2 Mon Sep 17 00:00:00 2001 From: Dimitrios Giannopoulos Date: Mon, 14 Jul 2025 14:47:48 +0300 Subject: [PATCH 12/12] feat: added RPS to graph --- .../observability/grafana_osl_dashboard.json | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json index f417a70..9ec89e3 100644 --- a/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json +++ b/kubernetes/helm/openslice/files/observability/grafana_osl_dashboard.json @@ -1023,6 +1023,108 @@ "title": "Memory", "type": "timeseries" }, + { + "datasource": "${DS_PROMETHEUS}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "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": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps", + "unitScale": true + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 5, + "links": [], + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Max", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "10.3.3", + "targets": [ + { + "datasource": "${DS_PROMETHEUS}", + "editorMode": "code", + "exemplar": true, + "expr": "sum by (http_status_code, pod) ( rate(http_server_duration_count{namespace=~\"$namespace\", pod=~\"$pod\"}[5m]) )", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "({{http_status_code}}) {{pod}}", + "range": true, + "refId": "A" + } + ], + "title": "RPS by HTTP Status", + "type": "timeseries" + }, { "aliasColors": {}, "bars": false, -- GitLab