From 395b659d475c1804c00c689b3c1b66a657fbe13d Mon Sep 17 00:00:00 2001 From: Dan T <96055340+Dan0x54@users.noreply.github.com> Date: Tue, 6 May 2025 18:47:48 +0100 Subject: [PATCH 01/10] Added Helm support for Affinity and Tolerations (#304) * Added support for tolerations / affinity to Helm chart with consistent flow control --- helm/install/templates/manager.yaml | 8 ++++++++ helm/install/values.yaml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/helm/install/templates/manager.yaml b/helm/install/templates/manager.yaml index 8bae42ba..7e7066fc 100644 --- a/helm/install/templates/manager.yaml +++ b/helm/install/templates/manager.yaml @@ -64,3 +64,11 @@ spec: port: 8081 initialDelaySeconds: 5 periodSeconds: 10 + {{- if .Values.tolerations }} + tolerations: + {{- toYaml .Values.tolerations | nindent 8 }} + {{- end }} + {{- if .Values.affinity }} + affinity: + {{- toYaml .Values.affinity | nindent 8 }} + {{- end }} diff --git a/helm/install/values.yaml b/helm/install/values.yaml index f38b0920..a66d1efd 100644 --- a/helm/install/values.yaml +++ b/helm/install/values.yaml @@ -87,3 +87,9 @@ resources: # envOverride: # - name: PG_DEBUG # value: "true" + +# tolerations allows you to define pod tolerations for the operator pods. +tolerations: [] + +# affinity allows you to define pod affinity and anti-affinity rules for the operator pods. +affinity: {} \ No newline at end of file From 37732f45fbbdc09aa8302b0972277a2dc4085169 Mon Sep 17 00:00:00 2001 From: jmckulk Date: Thu, 15 May 2025 15:38:42 -0400 Subject: [PATCH 02/10] update for release --- helm/install/Chart.yaml | 4 +-- ...crunchydata.com_crunchybridgeclusters.yaml | 2 +- ...res-operator.crunchydata.com_pgadmins.yaml | 2 +- ...s-operator.crunchydata.com_pgupgrades.yaml | 2 +- ...ator.crunchydata.com_postgresclusters.yaml | 30 +++++++++++++++---- helm/install/templates/manager.yaml | 2 +- helm/install/values.yaml | 30 +++++++++---------- .../images-by-tag/kustomization.yaml | 24 +++++++-------- ...crunchydata.com_crunchybridgeclusters.yaml | 2 +- ...res-operator.crunchydata.com_pgadmins.yaml | 2 +- ...s-operator.crunchydata.com_pgupgrades.yaml | 2 +- ...ator.crunchydata.com_postgresclusters.yaml | 30 +++++++++++++++---- kustomize/install/default/kustomization.yaml | 2 +- .../singlenamespace/kustomization.yaml | 2 +- 14 files changed, 86 insertions(+), 50 deletions(-) diff --git a/helm/install/Chart.yaml b/helm/install/Chart.yaml index 9834cf9e..48285eed 100644 --- a/helm/install/Chart.yaml +++ b/helm/install/Chart.yaml @@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D type: application # The version below should match the version on the PostgresCluster CRD -version: 5.8.1 -appVersion: 5.8.1 +version: 5.8.2 +appVersion: 5.8.2 diff --git a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index 8f401bdd..d9111933 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml index 1b922e86..349adf16 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml index 115309c6..fc1bb6b2 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml index b015af2d..df686ff6 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: @@ -41,9 +41,19 @@ spec: description: PostgresClusterSpec defines the desired state of PostgresCluster properties: authentication: + description: Authentication settings for the PostgreSQL server properties: rules: - description: 'More info: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html' + description: |- + Postgres compares every new connection to these rules in the order they are + defined. The first rule that matches determines if and how the connection + must then authenticate. Connections that match no rules are disconnected. + + When this is omitted or empty, Postgres accepts encrypted connections to any + database from users that have a password. To refuse all network connections, + set this to one rule that matches "host" connections to the "reject" method. + + More info: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html items: properties: connection: @@ -78,6 +88,7 @@ spec: description: |- The authentication method to use when a connection matches this rule. The special value "reject" refuses connections that match this rule. + More info: https://www.postgresql.org/docs/current/auth-methods.html maxLength: 20 minLength: 1 @@ -92,6 +103,7 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + description: Additional settings for this rule or its authentication method. maxProperties: 20 type: object x-kubernetes-map-type: atomic @@ -108,9 +120,15 @@ spec: x-kubernetes-map-type: atomic x-kubernetes-validations: - message: '"hba" cannot be combined with other fields' - rule: 'has(self.hba) ? !has(self.connection) && !has(self.databases) && !has(self.method) && !has(self.options) && !has(self.users) : true' + rule: '[has(self.hba), has(self.connection) || has(self.databases) || has(self.method) || has(self.options) || has(self.users)].exists_one(b,b)' - message: '"connection" and "method" are required' - rule: 'has(self.hba) ? true : has(self.connection) && has(self.method)' + rule: has(self.hba) || (has(self.connection) && has(self.method)) + - message: the "ldap" method requires an "ldapbasedn", "ldapprefix", or "ldapsuffix" option + rule: has(self.hba) || self.method != "ldap" || (has(self.options) && ["ldapbasedn","ldapprefix","ldapsuffix"].exists(k, k in self.options)) + - message: cannot use "ldapbasedn", "ldapbinddn", "ldapbindpasswd", "ldapsearchattribute", or "ldapsearchfilter" options with "ldapprefix" or "ldapsuffix" options + rule: has(self.hba) || self.method != "ldap" || !has(self.options) || [["ldapprefix","ldapsuffix"], ["ldapbasedn","ldapbinddn","ldapbindpasswd","ldapsearchattribute","ldapsearchfilter"]].exists_one(a, a.exists(k, k in self.options)) + - message: the "radius" method requires "radiusservers" and "radiussecrets" options + rule: has(self.hba) || self.method != "radius" || (has(self.options) && ["radiusservers","radiussecrets"].all(k, k in self.options)) maxItems: 10 type: array x-kubernetes-list-type: atomic @@ -4211,6 +4229,7 @@ spec: type: object type: object config: + description: General configuration of the PostgreSQL server properties: files: description: Files to mount under "/etc/postgres". @@ -6291,8 +6310,7 @@ spec: - stanza type: object x-kubernetes-validations: - - fieldPath: .repo - message: Only S3, GCS or Azure repos can be used as a pgBackRest data source. + - message: Only S3, GCS or Azure repos can be used as a pgBackRest data source. rule: '!has(self.repo.volume)' postgresCluster: description: |- diff --git a/helm/install/templates/manager.yaml b/helm/install/templates/manager.yaml index 7e7066fc..fa04aa40 100644 --- a/helm/install/templates/manager.yaml +++ b/helm/install/templates/manager.yaml @@ -71,4 +71,4 @@ spec: {{- if .Values.affinity }} affinity: {{- toYaml .Values.affinity | nindent 8 }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/helm/install/values.yaml b/helm/install/values.yaml index a66d1efd..07fd34fb 100644 --- a/helm/install/values.yaml +++ b/helm/install/values.yaml @@ -2,34 +2,34 @@ # controllerImages are used to run the operator's controllers. # The cluster image defined below runs the PostgresCluster and PGUpgrade controllers. controllerImages: - cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.1-0 + cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.2-0 # relatedImages are used when an image is omitted from PostgresCluster, PGAdmin or PGUpgrade specs. relatedImages: postgres_17: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.4-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.5-2520 postgres_17_gis_3.5: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.4-3.5-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.5-3.5-2520 postgres_17_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.4-3.4-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.5-3.4-2520 postgres_16: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.8-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.9-2520 postgres_16_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.8-3.4-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.9-3.4-2520 postgres_16_gis_3.3: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.8-3.3-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.9-3.3-2520 pgbackrest: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.54.2-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.54.2-2520 pgbouncer: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2520 pgexporter: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2520 pgupgrade: - image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-17.4-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-17.5-2520 standalone_pgadmin: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.2-2516 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.2-2520 collector: - image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.1-0 + image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.2-0 # singleNamespace controls where PGO watches for PostgresClusters. When false, # PGO watches for and responds to PostgresClusters in all namespaces. When true, @@ -89,7 +89,7 @@ resources: # value: "true" # tolerations allows you to define pod tolerations for the operator pods. -tolerations: [] +# tolerations: [] # affinity allows you to define pod affinity and anti-affinity rules for the operator pods. -affinity: {} \ No newline at end of file +# affinity: {} diff --git a/kustomize/install/components/images-by-tag/kustomization.yaml b/kustomize/install/components/images-by-tag/kustomization.yaml index 4affeac2..6855d30f 100644 --- a/kustomize/install/components/images-by-tag/kustomization.yaml +++ b/kustomize/install/components/images-by-tag/kustomization.yaml @@ -2,37 +2,37 @@ kind: Component images: - name: image-pgadmin newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4 - newTag: ubi9-9.2-2516 + newTag: ubi9-9.2-2520 - name: image-pgbackrest newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest - newTag: ubi9-2.54.2-2516 + newTag: ubi9-2.54.2-2520 - name: image-pgbouncer newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer - newTag: ubi9-1.24-2516 + newTag: ubi9-1.24-2520 - name: image-postgres-exporter newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter - newTag: ubi9-0.17.1-2516 + newTag: ubi9-0.17.1-2520 - name: image-postgres-operator-5.8 newName: registry.developers.crunchydata.com/crunchydata/postgres-operator - newTag: ubi9-5.8.1-0 + newTag: ubi9-5.8.2-0 - name: image-crunchy-postgres-16 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-16.8-2516 + newTag: ubi9-16.9-2520 - name: image-crunchy-postgres-17 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-17.4-2516 + newTag: ubi9-17.5-2520 - name: image-crunchy-upgrade newName: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade - newTag: ubi9-17.4-2516 + newTag: ubi9-17.5-2520 - name: image-crunchy-postgres-16-gis-3.3 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.8-3.3-2516 + newTag: ubi9-16.9-3.3-2520 - name: image-crunchy-postgres-16-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.8-3.4-2516 + newTag: ubi9-16.9-3.4-2520 - name: image-crunchy-postgres-17-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.4-3.4-2516 + newTag: ubi9-17.5-3.4-2520 - name: image-crunchy-postgres-17-gis-3.5 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.4-3.5-2516 + newTag: ubi9-17.5-3.5-2520 diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index 8f401bdd..d9111933 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml index 1b922e86..349adf16 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml index 115309c6..fc1bb6b2 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index b015af2d..df686ff6 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 spec: group: postgres-operator.crunchydata.com names: @@ -41,9 +41,19 @@ spec: description: PostgresClusterSpec defines the desired state of PostgresCluster properties: authentication: + description: Authentication settings for the PostgreSQL server properties: rules: - description: 'More info: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html' + description: |- + Postgres compares every new connection to these rules in the order they are + defined. The first rule that matches determines if and how the connection + must then authenticate. Connections that match no rules are disconnected. + + When this is omitted or empty, Postgres accepts encrypted connections to any + database from users that have a password. To refuse all network connections, + set this to one rule that matches "host" connections to the "reject" method. + + More info: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html items: properties: connection: @@ -78,6 +88,7 @@ spec: description: |- The authentication method to use when a connection matches this rule. The special value "reject" refuses connections that match this rule. + More info: https://www.postgresql.org/docs/current/auth-methods.html maxLength: 20 minLength: 1 @@ -92,6 +103,7 @@ spec: - type: integer - type: string x-kubernetes-int-or-string: true + description: Additional settings for this rule or its authentication method. maxProperties: 20 type: object x-kubernetes-map-type: atomic @@ -108,9 +120,15 @@ spec: x-kubernetes-map-type: atomic x-kubernetes-validations: - message: '"hba" cannot be combined with other fields' - rule: 'has(self.hba) ? !has(self.connection) && !has(self.databases) && !has(self.method) && !has(self.options) && !has(self.users) : true' + rule: '[has(self.hba), has(self.connection) || has(self.databases) || has(self.method) || has(self.options) || has(self.users)].exists_one(b,b)' - message: '"connection" and "method" are required' - rule: 'has(self.hba) ? true : has(self.connection) && has(self.method)' + rule: has(self.hba) || (has(self.connection) && has(self.method)) + - message: the "ldap" method requires an "ldapbasedn", "ldapprefix", or "ldapsuffix" option + rule: has(self.hba) || self.method != "ldap" || (has(self.options) && ["ldapbasedn","ldapprefix","ldapsuffix"].exists(k, k in self.options)) + - message: cannot use "ldapbasedn", "ldapbinddn", "ldapbindpasswd", "ldapsearchattribute", or "ldapsearchfilter" options with "ldapprefix" or "ldapsuffix" options + rule: has(self.hba) || self.method != "ldap" || !has(self.options) || [["ldapprefix","ldapsuffix"], ["ldapbasedn","ldapbinddn","ldapbindpasswd","ldapsearchattribute","ldapsearchfilter"]].exists_one(a, a.exists(k, k in self.options)) + - message: the "radius" method requires "radiusservers" and "radiussecrets" options + rule: has(self.hba) || self.method != "radius" || (has(self.options) && ["radiusservers","radiussecrets"].all(k, k in self.options)) maxItems: 10 type: array x-kubernetes-list-type: atomic @@ -4211,6 +4229,7 @@ spec: type: object type: object config: + description: General configuration of the PostgreSQL server properties: files: description: Files to mount under "/etc/postgres". @@ -6291,8 +6310,7 @@ spec: - stanza type: object x-kubernetes-validations: - - fieldPath: .repo - message: Only S3, GCS or Azure repos can be used as a pgBackRest data source. + - message: Only S3, GCS or Azure repos can be used as a pgBackRest data source. rule: '!has(self.repo.volume)' postgresCluster: description: |- diff --git a/kustomize/install/default/kustomization.yaml b/kustomize/install/default/kustomization.yaml index 7c0d7111..e7ba6cea 100644 --- a/kustomize/install/default/kustomization.yaml +++ b/kustomize/install/default/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 - includeSelectors: true includeTemplates: true pairs: diff --git a/kustomize/install/singlenamespace/kustomization.yaml b/kustomize/install/singlenamespace/kustomization.yaml index fc190a64..a4a9c565 100644 --- a/kustomize/install/singlenamespace/kustomization.yaml +++ b/kustomize/install/singlenamespace/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.1 + app.kubernetes.io/version: 5.8.2 - includeSelectors: true includeTemplates: true pairs: From edaf5c2e59a2df70b25a2e121aa8b16a874121ea Mon Sep 17 00:00:00 2001 From: jmckulk Date: Thu, 15 May 2025 15:46:49 -0400 Subject: [PATCH 03/10] fix whitespace --- helm/install/templates/manager.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm/install/templates/manager.yaml b/helm/install/templates/manager.yaml index fa04aa40..7e7066fc 100644 --- a/helm/install/templates/manager.yaml +++ b/helm/install/templates/manager.yaml @@ -71,4 +71,4 @@ spec: {{- if .Values.affinity }} affinity: {{- toYaml .Values.affinity | nindent 8 }} - {{- end }} \ No newline at end of file + {{- end }} From 4f8d0d9413b34f18ea098856dd90e58a76a344d6 Mon Sep 17 00:00:00 2001 From: andrewlecuyer Date: Thu, 22 May 2025 14:30:57 +0000 Subject: [PATCH 04/10] Update Examples for the Latest Version of Keycloak The Keycloak example now works with the latest version of Keycloak. This includes using the new env vars and settings that are now available in the latest version of Keycloak. The PostgresCluster's created for the Keycloak examples (which includes any PostgresCluster's created for use with Keycloak in the Crunchy Postgres for Kubernetes documentation) have also been updated to set the "autoCreateUserSchema" annotation to "true". Without this setting, Keycloak will crash on startup when attempting to use the public schema. --- kustomize/keycloak/keycloak.yaml | 20 ++++++++++---------- kustomize/keycloak/postgres.yaml | 2 ++ kustomize/postgres/postgres.yaml | 4 +++- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/kustomize/keycloak/keycloak.yaml b/kustomize/keycloak/keycloak.yaml index bfa66376..c6306b72 100644 --- a/kustomize/keycloak/keycloak.yaml +++ b/kustomize/keycloak/keycloak.yaml @@ -19,24 +19,24 @@ spec: args: ["start-dev"] name: keycloak env: - - name: DB_VENDOR + - name: KC_DB value: "postgres" - - name: DB_ADDR + - name: KC_DB_URL_HOST valueFrom: { secretKeyRef: { name: keycloakdb-pguser-keycloakdb, key: host } } - - name: DB_PORT + - name: KC_DB_URL_PORT valueFrom: { secretKeyRef: { name: keycloakdb-pguser-keycloakdb, key: port } } - - name: DB_DATABASE + - name: KC_DB_URL_DATABASE valueFrom: { secretKeyRef: { name: keycloakdb-pguser-keycloakdb, key: dbname } } - - name: DB_USER + - name: KC_DB_USERNAME valueFrom: { secretKeyRef: { name: keycloakdb-pguser-keycloakdb, key: user } } - - name: DB_PASSWORD + - name: KC_DB_PASSWORD valueFrom: { secretKeyRef: { name: keycloakdb-pguser-keycloakdb, key: password } } - - name: KEYCLOAK_ADMIN + - name: KC_BOOTSTRAP_ADMIN_USERNAME value: "admin" - - name: KEYCLOAK_ADMIN_PASSWORD + - name: KC_BOOTSTRAP_ADMIN_PASSWORD value: "admin" - - name: KC_PROXY - value: "edge" + - name: KC_PROXY_HEADERS + value: "xforwarded" ports: - name: http containerPort: 8080 diff --git a/kustomize/keycloak/postgres.yaml b/kustomize/keycloak/postgres.yaml index 67624313..e2b8c0d9 100644 --- a/kustomize/keycloak/postgres.yaml +++ b/kustomize/keycloak/postgres.yaml @@ -2,6 +2,8 @@ apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: name: keycloakdb + annotations: + postgres-operator.crunchydata.com/autoCreateUserSchema: "true" spec: postgresVersion: 17 instances: diff --git a/kustomize/postgres/postgres.yaml b/kustomize/postgres/postgres.yaml index a832aa5a..53328559 100644 --- a/kustomize/postgres/postgres.yaml +++ b/kustomize/postgres/postgres.yaml @@ -2,10 +2,12 @@ apiVersion: postgres-operator.crunchydata.com/v1beta1 kind: PostgresCluster metadata: name: hippo + annotations: + postgres-operator.crunchydata.com/autoCreateUserSchema: "true" spec: postgresVersion: 17 users: - - name: rhino + - name: hippo databases: - zoo instances: From 89a07af45ff01fe200f6176be110b53ac6b2b029 Mon Sep 17 00:00:00 2001 From: Benjamin Blattberg Date: Fri, 29 Aug 2025 18:12:30 -0500 Subject: [PATCH 05/10] patching Kustomize monitoring installer (#311) --- .../monitoring/alertmanager/deployment.yaml | 2 +- .../grafana/dashboards/pgbouncer_direct.json | 4 +-- .../dashboards/postgresql_details.json | 16 ++++++------ .../dashboards/postgresql_overview.json | 2 +- .../grafana/dashboards/prometheus_alerts.json | 6 ++--- kustomize/monitoring/grafana/deployment.yaml | 2 +- .../config/crunchy-alert-rules-pg.yml | 26 ++++++++++++++++--- 7 files changed, 39 insertions(+), 19 deletions(-) diff --git a/kustomize/monitoring/alertmanager/deployment.yaml b/kustomize/monitoring/alertmanager/deployment.yaml index 8844a6e6..5453205f 100644 --- a/kustomize/monitoring/alertmanager/deployment.yaml +++ b/kustomize/monitoring/alertmanager/deployment.yaml @@ -8,7 +8,7 @@ spec: spec: containers: - name: alertmanager - image: prom/alertmanager:v0.27.0 + image: prom/alertmanager:v0.28.1 args: - --config.file=/etc/alertmanager/alertmanager.yml - --storage.path=/alertmanager diff --git a/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json b/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json index 68c23793..a70694f5 100644 --- a/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json +++ b/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json @@ -28,7 +28,7 @@ "name": "Prometheus", "version": "1.0.0" } - ], + ], "annotations": { "list": [ { @@ -660,7 +660,7 @@ ], "value": [ "$__all" - ] + ] }, "datasource": "PROMETHEUS", "definition": "label_values(ccp_pgbouncer_databases_pool_size{cluster_name=\"[[cluster_name]]\", pod=\"[[pgbnode]]\"},name)", diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_details.json b/kustomize/monitoring/grafana/dashboards/postgresql_details.json index 90866777..d38cf826 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_details.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_details.json @@ -151,7 +151,7 @@ "pluginVersion": "7.4.5", "targets": [ { - "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} < ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ", + "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -1701,29 +1701,29 @@ "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "expr": "sum(ccp_stat_io_bgwriter_writes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, - "legendFormat": "Backend", - "metric": "ccp_stat_bgwriter_buffers_backend", + "legendFormat": "Writes", + "metric": "ccp_stat_io_bgwriter_writes", "refId": "B", "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "expr": "sum(ccp_stat_io_bgwriter_fsyncs{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "FSync", - "metric": "ccp_stat_bgwriter_buffers_backend_fsync", + "metric": "ccp_stat_io_bgwriter_fsyncs", "refId": "C", "step": 2 }, { - "expr": "sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", + "expr": "sum(ccp_stat_checkpointer_buffers_written{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "CheckPoint", - "metric": "ccp_stat_bgwriter_buffers_checkpoint", + "metric": "ccp_stat_checkpointer_buffers_written", "refId": "D", "step": 2 }, diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json index b965463f..f9bf2e94 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json @@ -163,7 +163,7 @@ "targets": [ { "$hashKey": "object:243", - "expr": "sum(pg_up{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"}) or sum(up{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"})", + "expr": "sum(pg_up{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"}) or sum(patroni_postgres_running{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"})", "format": "time_series", "interval": "", "intervalFactor": 1, diff --git a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json index f41aa481..e0090cf8 100644 --- a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json +++ b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json @@ -136,7 +136,7 @@ "pluginVersion": "7.4.5", "targets": [ { - "expr": "count(count by (kubernetes_namespace) (pg_up)) or count(count by (kubernetes_namespace) (up))", + "expr": "sum(count by (kubernetes_namespace) (pg_up{pg_cluster!=''})) + sum(count by (kubernetes_namespace) (patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, "interval": "", @@ -208,7 +208,7 @@ "pluginVersion": "7.4.5", "targets": [ { - "expr": "count(count by (pg_cluster) (pg_up)) or count(count by (pg_cluster) (up))", + "expr": "sum(count by (pg_cluster) (pg_up{pg_cluster!=''})) + sum(count by (pg_cluster) (patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, "interval": "", @@ -280,7 +280,7 @@ "pluginVersion": "7.4.5", "targets": [ { - "expr": "count(pg_up) or count(up)", + "expr": "sum(count(pg_up{pg_cluster!=''})) + sum(count(patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, "interval": "", diff --git a/kustomize/monitoring/grafana/deployment.yaml b/kustomize/monitoring/grafana/deployment.yaml index ddfea378..67d60d8b 100644 --- a/kustomize/monitoring/grafana/deployment.yaml +++ b/kustomize/monitoring/grafana/deployment.yaml @@ -8,7 +8,7 @@ spec: spec: containers: - name: grafana - image: grafana/grafana:11.1.5 + image: grafana/grafana:11.1.13 ports: - containerPort: 3000 env: diff --git a/kustomize/monitoring/prometheus/config/crunchy-alert-rules-pg.yml b/kustomize/monitoring/prometheus/config/crunchy-alert-rules-pg.yml index 83f666e4..b68a197e 100644 --- a/kustomize/monitoring/prometheus/config/crunchy-alert-rules-pg.yml +++ b/kustomize/monitoring/prometheus/config/crunchy-alert-rules-pg.yml @@ -22,7 +22,7 @@ groups: ########## SYSTEM RULES ########## - alert: ExporterDown - expr: avg_over_time(up[5m]) < 0.5 + expr: avg_over_time(up{job=~"crunchy-otel-collector|crunchy-postgres-exporter",exported_job!="patroni"}[5m]) < 0.5 for: 10s labels: service: system @@ -35,15 +35,35 @@ groups: ########## POSTGRESQL RULES ########## - alert: PGIsUp - expr: "pg_up < 1 or up < 1" + expr: "pg_up < 1 or patroni_postgres_running < 1" for: 60s labels: service: postgresql severity: critical severity_num: 300 annotations: - summary: 'postgres_exporter running on {{ $labels.job }} is unable to communicate with the configured database' + summary: 'Metrics exporter running on {{ $labels.job }} is unable to communicate with the configured database' + - alert: PGNoPrimary + expr: max by (cluster_name) (ccp_is_in_recovery_status) < 2 + for: 30s + labels: + service: postgresql + severity: critical + severity_num: 300 + annotations: + summary: 'cluster {{ $labels.cluster_name }} does not have a primary instance' + +# Alert on missing or absent replicas +# - alert: PGNoReplica +# expr: min by (cluster_name) (ccp_is_in_recovery_status) > 1 +# for: 30s +# labels: +# service: postgresql +# severity: critical +# severity_num: 300 +# annotations: +# summary: 'cluster {{ $labels.cluster_name }} does not have a replica instance' # Example to check for current version of PostgreSQL. Metric returns the version that the exporter is running on, so you can set a rule to check for the minimum version you'd like all systems to be on. Number returned is the 6 digit integer representation contained in the setting "server_version_num". # From 6b9bb005f171690d228bf49ca19f8f4caff95451 Mon Sep 17 00:00:00 2001 From: Valerie Clarkson Date: Tue, 2 Sep 2025 15:26:45 -0400 Subject: [PATCH 06/10] release updates PGO-2649 --- helm/install/Chart.yaml | 4 +- ...crunchydata.com_crunchybridgeclusters.yaml | 2 +- ...res-operator.crunchydata.com_pgadmins.yaml | 137 +++++++++++++++++- ...s-operator.crunchydata.com_pgupgrades.yaml | 2 +- ...ator.crunchydata.com_postgresclusters.yaml | 137 +++++++++++++++++- helm/install/values.yaml | 26 ++-- .../images-by-tag/kustomization.yaml | 24 +-- ...crunchydata.com_crunchybridgeclusters.yaml | 2 +- ...res-operator.crunchydata.com_pgadmins.yaml | 137 +++++++++++++++++- ...s-operator.crunchydata.com_pgupgrades.yaml | 2 +- ...ator.crunchydata.com_postgresclusters.yaml | 137 +++++++++++++++++- kustomize/install/default/kustomization.yaml | 2 +- .../singlenamespace/kustomization.yaml | 2 +- 13 files changed, 577 insertions(+), 37 deletions(-) diff --git a/helm/install/Chart.yaml b/helm/install/Chart.yaml index 48285eed..42207888 100644 --- a/helm/install/Chart.yaml +++ b/helm/install/Chart.yaml @@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D type: application # The version below should match the version on the PostgresCluster CRD -version: 5.8.2 -appVersion: 5.8.2 +version: 5.8.3 +appVersion: 5.8.3 diff --git a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index d9111933..794d8248 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml index 349adf16..0124eb15 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: @@ -1623,6 +1623,122 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + environmentVariables: + description: |- + EnvironmentVariables allows the user to add environment variables to the + collector container. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + x-kubernetes-validations: + - message: Cannot overwrite environment variables set by operator + rule: self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD' + minItems: 1 + type: array + x-kubernetes-list-type: atomic exporters: description: |- Exporters allows users to configure OpenTelemetry exporters that exist @@ -2019,6 +2135,13 @@ spec: type: string x-kubernetes-validations: - rule: duration("0") <= self && self <= duration("60m") + databases: + description: |- + The databases to target with added custom queries. + Default behavior is to target `postgres`. + items: + type: string + type: array name: description: |- The name of this batch of queries, which will be used in naming the OTel @@ -2062,6 +2185,18 @@ spec: type: string type: array type: object + exporters: + description: The names of exporters that should send metrics. + items: + type: string + minItems: 1 + type: array + x-kubernetes-list-type: set + perDBMetricTargets: + description: User defined databases to target for default per-db metrics + items: + type: string + type: array type: object resources: description: Resources holds the resource requirements for the collector container. diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml index fc1bb6b2..476b1ef1 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml index df686ff6..fd078c2a 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: @@ -10970,6 +10970,122 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + environmentVariables: + description: |- + EnvironmentVariables allows the user to add environment variables to the + collector container. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + x-kubernetes-validations: + - message: Cannot overwrite environment variables set by operator + rule: self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD' + minItems: 1 + type: array + x-kubernetes-list-type: atomic exporters: description: |- Exporters allows users to configure OpenTelemetry exporters that exist @@ -11366,6 +11482,13 @@ spec: type: string x-kubernetes-validations: - rule: duration("0") <= self && self <= duration("60m") + databases: + description: |- + The databases to target with added custom queries. + Default behavior is to target `postgres`. + items: + type: string + type: array name: description: |- The name of this batch of queries, which will be used in naming the OTel @@ -11409,6 +11532,18 @@ spec: type: string type: array type: object + exporters: + description: The names of exporters that should send metrics. + items: + type: string + minItems: 1 + type: array + x-kubernetes-list-type: set + perDBMetricTargets: + description: User defined databases to target for default per-db metrics + items: + type: string + type: array type: object resources: description: Resources holds the resource requirements for the collector container. diff --git a/helm/install/values.yaml b/helm/install/values.yaml index 07fd34fb..9018ccbd 100644 --- a/helm/install/values.yaml +++ b/helm/install/values.yaml @@ -2,34 +2,34 @@ # controllerImages are used to run the operator's controllers. # The cluster image defined below runs the PostgresCluster and PGUpgrade controllers. controllerImages: - cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.2-0 + cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.3-0 # relatedImages are used when an image is omitted from PostgresCluster, PGAdmin or PGUpgrade specs. relatedImages: postgres_17: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.5-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.6-2534 postgres_17_gis_3.5: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.5-3.5-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.5-2534 postgres_17_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.5-3.4-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.4-2534 postgres_16: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.9-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.10-2534 postgres_16_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.9-3.4-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.4-2534 postgres_16_gis_3.3: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.9-3.3-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.3-2534 pgbackrest: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.54.2-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2534 pgbouncer: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2534 pgexporter: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2534 pgupgrade: - image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-17.5-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-17.6-2534 standalone_pgadmin: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.2-2520 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.2-2534 collector: - image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.2-0 + image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.3-0 # singleNamespace controls where PGO watches for PostgresClusters. When false, # PGO watches for and responds to PostgresClusters in all namespaces. When true, diff --git a/kustomize/install/components/images-by-tag/kustomization.yaml b/kustomize/install/components/images-by-tag/kustomization.yaml index 6855d30f..327ec16f 100644 --- a/kustomize/install/components/images-by-tag/kustomization.yaml +++ b/kustomize/install/components/images-by-tag/kustomization.yaml @@ -2,37 +2,37 @@ kind: Component images: - name: image-pgadmin newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4 - newTag: ubi9-9.2-2520 + newTag: ubi9-9.2-2534 - name: image-pgbackrest newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest - newTag: ubi9-2.54.2-2520 + newTag: ubi9-2.56.0-2534 - name: image-pgbouncer newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer - newTag: ubi9-1.24-2520 + newTag: ubi9-1.24-2534 - name: image-postgres-exporter newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter - newTag: ubi9-0.17.1-2520 + newTag: ubi9-0.17.1-2534 - name: image-postgres-operator-5.8 newName: registry.developers.crunchydata.com/crunchydata/postgres-operator - newTag: ubi9-5.8.2-0 + newTag: ubi9-5.8.3-0 - name: image-crunchy-postgres-16 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-16.9-2520 + newTag: ubi9-16.10-2534 - name: image-crunchy-postgres-17 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-17.5-2520 + newTag: ubi9-17.6-2534 - name: image-crunchy-upgrade newName: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade - newTag: ubi9-17.5-2520 + newTag: ubi9-17.6-2534 - name: image-crunchy-postgres-16-gis-3.3 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.9-3.3-2520 + newTag: ubi9-16.10-3.3-2534 - name: image-crunchy-postgres-16-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.9-3.4-2520 + newTag: ubi9-16.10-3.4-2534 - name: image-crunchy-postgres-17-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.5-3.4-2520 + newTag: ubi9-17.6-3.4-2534 - name: image-crunchy-postgres-17-gis-3.5 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.5-3.5-2520 + newTag: ubi9-17.6-3.5-2534 diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index d9111933..794d8248 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml index 349adf16..0124eb15 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: @@ -1623,6 +1623,122 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + environmentVariables: + description: |- + EnvironmentVariables allows the user to add environment variables to the + collector container. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + x-kubernetes-validations: + - message: Cannot overwrite environment variables set by operator + rule: self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD' + minItems: 1 + type: array + x-kubernetes-list-type: atomic exporters: description: |- Exporters allows users to configure OpenTelemetry exporters that exist @@ -2019,6 +2135,13 @@ spec: type: string x-kubernetes-validations: - rule: duration("0") <= self && self <= duration("60m") + databases: + description: |- + The databases to target with added custom queries. + Default behavior is to target `postgres`. + items: + type: string + type: array name: description: |- The name of this batch of queries, which will be used in naming the OTel @@ -2062,6 +2185,18 @@ spec: type: string type: array type: object + exporters: + description: The names of exporters that should send metrics. + items: + type: string + minItems: 1 + type: array + x-kubernetes-list-type: set + perDBMetricTargets: + description: User defined databases to target for default per-db metrics + items: + type: string + type: array type: object resources: description: Resources holds the resource requirements for the collector container. diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml index fc1bb6b2..476b1ef1 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index df686ff6..fd078c2a 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -5,7 +5,7 @@ metadata: controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 spec: group: postgres-operator.crunchydata.com names: @@ -10970,6 +10970,122 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map + environmentVariables: + description: |- + EnvironmentVariables allows the user to add environment variables to the + collector container. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. If a variable cannot be resolved, + the reference in the input string will be unchanged. Double $$ are reduced + to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + x-kubernetes-validations: + - message: Cannot overwrite environment variables set by operator + rule: self.name != 'K8S_POD_NAMESPACE' && self.name != 'K8S_POD_NAME' && self.name != 'PGPASSWORD' + minItems: 1 + type: array + x-kubernetes-list-type: atomic exporters: description: |- Exporters allows users to configure OpenTelemetry exporters that exist @@ -11366,6 +11482,13 @@ spec: type: string x-kubernetes-validations: - rule: duration("0") <= self && self <= duration("60m") + databases: + description: |- + The databases to target with added custom queries. + Default behavior is to target `postgres`. + items: + type: string + type: array name: description: |- The name of this batch of queries, which will be used in naming the OTel @@ -11409,6 +11532,18 @@ spec: type: string type: array type: object + exporters: + description: The names of exporters that should send metrics. + items: + type: string + minItems: 1 + type: array + x-kubernetes-list-type: set + perDBMetricTargets: + description: User defined databases to target for default per-db metrics + items: + type: string + type: array type: object resources: description: Resources holds the resource requirements for the collector container. diff --git a/kustomize/install/default/kustomization.yaml b/kustomize/install/default/kustomization.yaml index e7ba6cea..e7a0ea52 100644 --- a/kustomize/install/default/kustomization.yaml +++ b/kustomize/install/default/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 - includeSelectors: true includeTemplates: true pairs: diff --git a/kustomize/install/singlenamespace/kustomization.yaml b/kustomize/install/singlenamespace/kustomization.yaml index a4a9c565..73f990c0 100644 --- a/kustomize/install/singlenamespace/kustomization.yaml +++ b/kustomize/install/singlenamespace/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.2 + app.kubernetes.io/version: 5.8.3 - includeSelectors: true includeTemplates: true pairs: From 70fb0d1b92a1594af6ec294a2a071d1411a933ae Mon Sep 17 00:00:00 2001 From: andrewlecuyer Date: Mon, 5 May 2025 14:40:43 +0000 Subject: [PATCH 07/10] Adds Monitoring for the Prometheus & Grafana Operators Adds a Kustomize installer for those using CPK metrics & monitoring with the Prometheus and/or Grafana operators. --- .../operator/grafana/dashboards.yaml | 95 +++++++++++++++++++ .../operator/grafana/datasources.yaml | 27 ++++++ .../monitoring/operator/grafana/grafana.yaml | 24 +++++ .../operator/grafana/kustomization.yaml | 17 ++++ .../monitoring/operator/grafana/rbac.yaml | 25 +++++ .../monitoring/operator/kustomization.yaml | 5 + .../operator/prometheus/kustomization.yaml | 3 + .../operator/prometheus/podmonitor.yaml | 86 +++++++++++++++++ .../monitoring/operator/prometheus/rbac.yaml | 35 +++++++ 9 files changed, 317 insertions(+) create mode 100644 kustomize/monitoring/operator/grafana/dashboards.yaml create mode 100644 kustomize/monitoring/operator/grafana/datasources.yaml create mode 100644 kustomize/monitoring/operator/grafana/grafana.yaml create mode 100644 kustomize/monitoring/operator/grafana/kustomization.yaml create mode 100644 kustomize/monitoring/operator/grafana/rbac.yaml create mode 100644 kustomize/monitoring/operator/kustomization.yaml create mode 100644 kustomize/monitoring/operator/prometheus/kustomization.yaml create mode 100644 kustomize/monitoring/operator/prometheus/podmonitor.yaml create mode 100644 kustomize/monitoring/operator/prometheus/rbac.yaml diff --git a/kustomize/monitoring/operator/grafana/dashboards.yaml b/kustomize/monitoring/operator/grafana/dashboards.yaml new file mode 100644 index 00000000..5e110544 --- /dev/null +++ b/kustomize/monitoring/operator/grafana/dashboards.yaml @@ -0,0 +1,95 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: pgbackrest +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: pgbackrest.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: pgbouncer-direct +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: pgbouncer_direct.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: pod-details +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: pod_details.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: postgresql-details +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: postgresql_details.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: postgresql-overview +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: postgresql_overview.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: postgresql-service-health +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: postgresql_service_health.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: prometheus-alerts +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: prometheus_alerts.json +--- +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDashboard +metadata: + name: query-statistics +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + configMapRef: + name: grafana-dashboards + key: query_statistics.json diff --git a/kustomize/monitoring/operator/grafana/datasources.yaml b/kustomize/monitoring/operator/grafana/datasources.yaml new file mode 100644 index 00000000..d91161af --- /dev/null +++ b/kustomize/monitoring/operator/grafana/datasources.yaml @@ -0,0 +1,27 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: GrafanaDatasource +metadata: + name: grafana-datasources +spec: + instanceSelector: + matchLabels: + dashboards: crunchy-grafana + valuesFrom: + - targetPath: "secureJsonData.httpHeaderValue1" + valueFrom: + secretKeyRef: + name: grafana-pgo + key: token + datasource: + access: proxy + editable: true + isDefault: true + jsonData: + httpHeaderName1: 'Authorization' + timeInterval: 5s + tlsSkipVerify: true + name: PROMETHEUS + secureJsonData: + httpHeaderValue1: 'Bearer ${token}' + type: prometheus + url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091/ diff --git a/kustomize/monitoring/operator/grafana/grafana.yaml b/kustomize/monitoring/operator/grafana/grafana.yaml new file mode 100644 index 00000000..a7969854 --- /dev/null +++ b/kustomize/monitoring/operator/grafana/grafana.yaml @@ -0,0 +1,24 @@ +apiVersion: grafana.integreatly.org/v1beta1 +kind: Grafana +metadata: + name: crunchy-grafana + labels: + dashboards: crunchy-grafana +spec: + deployment: + spec: + template: + spec: + containers: + - name: grafana + env: + - name: GF_SECURITY_ADMIN_USER + valueFrom: + secretKeyRef: + name: grafana-admin + key: username + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: grafana-admin + key: password diff --git a/kustomize/monitoring/operator/grafana/kustomization.yaml b/kustomize/monitoring/operator/grafana/kustomization.yaml new file mode 100644 index 00000000..dd03879c --- /dev/null +++ b/kustomize/monitoring/operator/grafana/kustomization.yaml @@ -0,0 +1,17 @@ +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: grafana-admin + literals: + - password=admin + - username=admin + type: Opaque + +resources: +- rbac.yaml +- grafana.yaml +- datasources.yaml +- ../../grafana/dashboards +- dashboards.yaml + diff --git a/kustomize/monitoring/operator/grafana/rbac.yaml b/kustomize/monitoring/operator/grafana/rbac.yaml new file mode 100644 index 00000000..9ab926fc --- /dev/null +++ b/kustomize/monitoring/operator/grafana/rbac.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: grafana-pgo +--- +apiVersion: v1 +kind: Secret +type: kubernetes.io/service-account-token +metadata: + name: grafana-pgo + annotations: + kubernetes.io/service-account.name: grafana-pgo +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: grafana-pgo +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-monitoring-view +subjects: +- kind: ServiceAccount + name: grafana-pgo + namespace: postgres-operator diff --git a/kustomize/monitoring/operator/kustomization.yaml b/kustomize/monitoring/operator/kustomization.yaml new file mode 100644 index 00000000..f9ca1732 --- /dev/null +++ b/kustomize/monitoring/operator/kustomization.yaml @@ -0,0 +1,5 @@ +namespace: postgres-operator + +resources: +- grafana +- prometheus diff --git a/kustomize/monitoring/operator/prometheus/kustomization.yaml b/kustomize/monitoring/operator/prometheus/kustomization.yaml new file mode 100644 index 00000000..6d088183 --- /dev/null +++ b/kustomize/monitoring/operator/prometheus/kustomization.yaml @@ -0,0 +1,3 @@ +resources: +- rbac.yaml +- podmonitor.yaml diff --git a/kustomize/monitoring/operator/prometheus/podmonitor.yaml b/kustomize/monitoring/operator/prometheus/podmonitor.yaml new file mode 100644 index 00000000..a5fa9a35 --- /dev/null +++ b/kustomize/monitoring/operator/prometheus/podmonitor.yaml @@ -0,0 +1,86 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: crunchy-otel-collector +spec: + selector: + matchLabels: + postgres-operator.crunchydata.com/crunchy-otel-collector: "true" + + # Uncomment to monitor a single namespace only + # namespaceSelector: + # matchNames: + # - postgres-operator + + podMetricsEndpoints: + - port: otel-metrics + interval: 15s + scrapeTimeout: 15s + relabelings: + # Keep exporter port and drop all others + - sourceLabels: [__meta_kubernetes_pod_container_port_number] + action: keep + regex: "9187" + # Set label for namespace + - sourceLabels: [__meta_kubernetes_namespace] + targetLabel: kubernetes_namespace + # Set label for pod name + - sourceLabels: [__meta_kubernetes_pod_name] + targetLabel: pod + # Convert namespace and cluster name to pg_cluster=namespace:cluster + - sourceLabels: [__meta_kubernetes_namespace,__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_cluster] + targetLabel: pg_cluster + separator: ":" + replacement: '$1$2' + # Convert kubernetes pod ip to ip + - sourceLabels: [__meta_kubernetes_pod_ip] + targetLabel: ip + # Convert postgres-operator.crunchydata.com/instance to deployment + - sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_instance] + targetLabel: deployment + # Convert postgres-operator.crunchydata.com/role to role + - sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_role] + targetLabel: role + # The following relabels should make it easier to use pgMonitor dashboards. + # Note: The following was added for the pgBouncer dashboard and what labels it requires. + # For pgBouncer, `exp_type` should be equal to role. + - sourceLabels: [__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_role] + targetLabel: exp_type + # `cluster_name` is equivalent to `pg_cluster` + - sourceLabels: [__meta_kubernetes_namespace,__meta_kubernetes_pod_label_postgres_operator_crunchydata_com_cluster] + targetLabel: cluster_name + separator: ":" + replacement: '$1$2' +--- +apiVersion: monitoring.coreos.com/v1 +kind: PodMonitor +metadata: + name: pgo-metrics +spec: + selector: + matchExpressions: + - key: postgres-operator.crunchydata.com/control-plane + operator: Exists + + # Uncomment to monitor a single namespace only + # namespaceSelector: + # matchNames: + # - postgres-operator + + podMetricsEndpoints: + - port: metrics + interval: 15s + scrapeTimeout: 15s + # If you are running CPK v5.7 or earlier, you will need to change the scheme to 'http' + # and add a metrics port to the postgres-operator deployment that exposes port 8080. + scheme: https + authorization: + type: Bearer + credentials: + name: prometheus-pgo + key: token + tlsConfig: + # By default, the operator's metrics server automatically creates self-signed certs + # which cannot be verified, so `insecure_skip_verify` is set to `true`. See the + # documentation for providing your own signed certificates. + insecureSkipVerify: true diff --git a/kustomize/monitoring/operator/prometheus/rbac.yaml b/kustomize/monitoring/operator/prometheus/rbac.yaml new file mode 100644 index 00000000..24dc6599 --- /dev/null +++ b/kustomize/monitoring/operator/prometheus/rbac.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: prometheus-pgo +--- +apiVersion: v1 +kind: Secret +type: kubernetes.io/service-account-token +metadata: + name: prometheus-pgo + annotations: + kubernetes.io/service-account.name: prometheus-pgo +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus-pgo +rules: +- nonResourceURLs: + - /metrics + verbs: + - get +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus-pgo +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus-pgo +subjects: +- kind: ServiceAccount + name: prometheus-pgo + namespace: postgres-operator From 397165d28014b9c4676a122223c44683d5bfb015 Mon Sep 17 00:00:00 2001 From: crunchy-containers-bot Date: Tue, 28 Oct 2025 17:50:36 +0000 Subject: [PATCH 08/10] patching Kustomize monitoring installer --- .../crunchy_grafana_dashboards.yml | 0 .../grafana/dashboards/kustomization.yaml | 11 +- .../grafana/dashboards/pgbackrest.json | 970 +++++---- .../grafana/dashboards/pgbouncer_direct.json | 1062 +++++----- .../grafana/dashboards/pod_details.json | 1808 ++++++++++------- .../dashboards/postgresql_details.json | 1409 +++++++------ .../dashboards/postgresql_overview.json | 85 +- .../dashboards/postgresql_service_health.json | 714 ++++--- .../grafana/dashboards/prometheus_alerts.json | 338 ++- .../grafana/dashboards/query_statistics.json | 667 ++++-- kustomize/monitoring/grafana/deployment.yaml | 8 +- .../monitoring/grafana/kustomization.yaml | 4 - 12 files changed, 4219 insertions(+), 2857 deletions(-) rename kustomize/monitoring/grafana/{config => dashboards}/crunchy_grafana_dashboards.yml (100%) diff --git a/kustomize/monitoring/grafana/config/crunchy_grafana_dashboards.yml b/kustomize/monitoring/grafana/dashboards/crunchy_grafana_dashboards.yml similarity index 100% rename from kustomize/monitoring/grafana/config/crunchy_grafana_dashboards.yml rename to kustomize/monitoring/grafana/dashboards/crunchy_grafana_dashboards.yml diff --git a/kustomize/monitoring/grafana/dashboards/kustomization.yaml b/kustomize/monitoring/grafana/dashboards/kustomization.yaml index 5764a226..1f627154 100644 --- a/kustomize/monitoring/grafana/dashboards/kustomization.yaml +++ b/kustomize/monitoring/grafana/dashboards/kustomization.yaml @@ -1,17 +1,22 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +# We must break the files up into two ConfigMaps as the total size +# is too large for one ConfigMap configMapGenerator: -- name: grafana-dashboards +- name: grafana-dashboards-1 files: - pgbackrest.json + - pgbouncer_direct.json - pod_details.json - - postgresql_overview.json - postgresql_details.json + - postgresql_overview.json - postgresql_service_health.json - prometheus_alerts.json +- name: grafana-dashboards-2 + files: + - crunchy_grafana_dashboards.yml - query_statistics.json - - pgbouncer_direct.json generatorOptions: disableNameSuffixHash: true diff --git a/kustomize/monitoring/grafana/dashboards/pgbackrest.json b/kustomize/monitoring/grafana/dashboards/pgbackrest.json index d50f5c31..ac8bf81a 100644 --- a/kustomize/monitoring/grafana/dashboards/pgbackrest.json +++ b/kustomize/monitoring/grafana/dashboards/pgbackrest.json @@ -9,18 +9,13 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", @@ -33,13 +28,22 @@ "id": "stat", "name": "Stat", "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -49,10 +53,9 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625069660860, "links": [ { "asDropdown": false, @@ -68,13 +71,15 @@ ], "panels": [ { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -101,6 +106,7 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "last" @@ -108,14 +114,20 @@ "fields": "/^Value$/", "values": false }, + "showPercentChange": false, "text": { "valueSize": 45 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "time()-ccp_backrest_oldest_full_backup_time_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}", "format": "table", "instant": true, @@ -128,65 +140,184 @@ "type": "stat" }, { - "aliasColors": { - "Differential": "dark-blue", - "Differential Backup": "dark-blue", - "Full": "dark-green", - "Full Backup": "dark-green", - "Incremental": "light-blue", - "Incremental Backup": "light-blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "s" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Differential Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental Backup" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 3 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": false + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment,instance,ip,pod)", "format": "time_series", "instant": false, @@ -196,6 +327,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", @@ -203,6 +338,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", @@ -210,6 +349,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_archive_command_status_seconds_since_last_archive{pg_cluster=\"[[cluster]]\", role=\"master\"}) without(deployment, instance,ip,pod)", "hide": false, "interval": "", @@ -217,106 +360,143 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Time Since", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Differential": "dark-blue", - "Full": "dark-green", - "Incremental": "light-blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "s" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 3 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"incr\"}) without (deployment,instance,pod,ip)", "format": "time_series", "instant": false, @@ -326,6 +506,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", @@ -333,6 +517,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_backup_runtime_seconds{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", @@ -340,107 +528,144 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Backup Runtimes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Differential": "dark-blue", - "Full": "dark-green", - "Incremental": "light-blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 10 }, - "hiddenSeries": false, "id": 5, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"incr\"}) without (deployment, instance,pod,ip)", "format": "time_series", "instant": false, @@ -450,6 +675,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"diff\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", @@ -457,6 +686,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "min(ccp_backrest_last_info_repo_backup_size_bytes{pg_cluster=\"[[cluster]]\", role=\"master\", backup_type=\"full\"}) without (deployment,instance,pod,ip)", "hide": false, "interval": "", @@ -464,110 +697,190 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Backup Size", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Archive age": "blue", - "Archive count": "green", - "Differential": "dark-blue", - "Failed count": "red", - "Full": "dark-green", - "Incremental": "light-blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 30, + "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": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Archive age" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Archive count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Differential" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Failed count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Full" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Incremental" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 3, - "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 10 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(idelta(ccp_archive_command_status_failed_count{pg_cluster=\"[[cluster]]\", role=\"master\"}[1m])) without (instance,ip)", "format": "time_series", "instant": false, @@ -577,6 +890,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(idelta(ccp_archive_command_status_archived_count{pg_cluster=\"[[cluster]]\", role=\"master\"}[1m])) without (instance,pod, ip)", "hide": false, "interval": "", @@ -584,63 +901,24 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "WAL Stats", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(pg_cluster)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "cluster", @@ -656,7 +934,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -683,5 +960,6 @@ "timezone": "browser", "title": "pgBackRest", "uid": "2fcFZ6PGk", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json b/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json index a70694f5..2955a685 100644 --- a/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json +++ b/kustomize/monitoring/grafana/dashboards/pgbouncer_direct.json @@ -9,24 +9,25 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { @@ -43,7 +44,7 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [ @@ -53,7 +54,7 @@ "includeVars": true, "keepTime": true, "tags": [ - "vendor=crunchydata" + "vendor=crunchydata" ], "title": "", "type": "dashboards" @@ -61,544 +62,558 @@ ], "panels": [ { - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "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" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "short" }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ + "pluginVersion": "9.5.15", + "targets": [ { - "color": "green", - "value": null + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_client_active{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "client_active", + "range": true, + "refId": "A" }, { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 0, - "y": 0 - }, - "id": 2, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "9.5.15", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_pools_client_active{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "client_active", - "range": true, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_pools_client_waiting{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "client_waiting", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_pools_server_active{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "server_active", - "range": true, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_pools_server_idle{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "server_idle", - "range": true, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_pools_server_used{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "server_used", - "range": true, - "refId": "E" - } - ], - "title": "PGBouncer Total State Counts", - "type": "timeseries" - }, - { - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "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 + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_client_waiting{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "client_waiting", + "range": true, + "refId": "B" }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_active{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_active", + "range": true, + "refId": "C" }, - "thresholdsStyle": { - "mode": "off" - } - }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ { - "color": "green", - "value": null + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_idle{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_idle", + "range": true, + "refId": "D" }, { - "color": "red", - "value": 80 + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_pools_server_used{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"})", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "server_used", + "range": true, + "refId": "E" } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 4, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "title": "PGBouncer Total State Counts", + "type": "timeseries" }, - "pluginVersion": "9.5.15", - "targets": [ - { + { "datasource": { "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "ccp_pgbouncer_lists_item_count{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{list}}", - "range": true, - "refId": "A" - } - ], - "title": "PGBouncer Total Item Counts", - "type": "timeseries" - }, - { - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "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" + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "short" }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, + "pluginVersion": "9.5.15", + "targets": [ { - "color": "red", - "value": 80 + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "ccp_pgbouncer_lists_item_count{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{list}}", + "range": true, + "refId": "A" } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 8, - "x": 0, - "y": 10 - }, - "id": 6, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "title": "PGBouncer Total Item Counts", + "type": "timeseries" }, - "pluginVersion": "9.5.15", - "targets": [ - { + { "datasource": { "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "ccp_pgbouncer_databases_current_connections{cluster_name=~\"[[cluster_name]]\", pod=~\"[[pgbnode]]\", name=~\"[[pool]]\"} / ccp_pgbouncer_databases_pool_size{cluster_name=~\"[[cluster_name]]\", pod=~\"[[pgbnode]]\", name=~\"[[pool]]\"}", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "range": true, - "refId": "A" - } - ], - "title": "Connection % Used Per Pool ([[pool]])", - "type": "timeseries" - }, - { - "datasource": "PROMETHEUS", - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "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 + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 0, + "y": 10 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ + "pluginVersion": "9.5.15", + "targets": [ { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "ccp_pgbouncer_databases_current_connections{cluster_name=~\"[[cluster_name]]\", pod=~\"[[pgbnode]]\", name=~\"[[pool]]\"} / ccp_pgbouncer_databases_pool_size{cluster_name=~\"[[cluster_name]]\", pod=~\"[[pgbnode]]\", name=~\"[[pool]]\"}", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{name}}", + "range": true, + "refId": "A" } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 8, - "x": 8, - "y": 10 - }, - "id": 8, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "title": "Connection % Used Per Pool ([[pool]])", + "type": "timeseries" }, - "pluginVersion": "9.5.15", - "targets": [ - { + { "datasource": { "type": "prometheus", - "uid": "${ccp_datasource}" - }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_clients_wait_seconds{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (pool,state)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "{{pool}}", - "range": true, - "refId": "A" - } - ], - "title": "Client Connection State Counts Per Pool ([[pool]])", - "type": "timeseries" - }, - { - "datasource": "PROMETHEUS", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" + "uid": "PROMETHEUS" }, - "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" + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "short" }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 8, + "y": 10 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "thresholdsStyle": { - "mode": "off" + "tooltip": { + "mode": "multi", + "sort": "none" } }, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, + "pluginVersion": "9.5.15", + "targets": [ { - "color": "red", - "value": 80 + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_clients_wait_seconds{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (pool,state)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "{{pool}}", + "range": true, + "refId": "A" } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 8, - "x": 16, - "y": 10 - }, - "id": 10, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } + ], + "title": "Client Connection State Counts Per Pool ([[pool]])", + "type": "timeseries" }, - "pluginVersion": "9.5.15", - "targets": [ - { + { "datasource": { "type": "prometheus", - "uid": "${ccp_datasource}" + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 8, + "x": 16, + "y": 10 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "editorMode": "code", - "expr": "sum(ccp_pgbouncer_servers_close_needed{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (state)", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Server Connection State Counts Per Pool ([[pool]])", - "type": "timeseries" + "pluginVersion": "9.5.15", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pgbouncer_servers_close_needed{cluster_name=~\"[[cluster_name]]\",pod=~\"[[pgbnode]]\", database=~\"[[pool]]\"}) by (state)", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Server Connection State Counts Per Pool ([[pool]])", + "type": "timeseries" } ], "refresh": "5m", "schemaVersion": 39, - "style": "dark", "tags": [ "vendor=crunchydata" ], @@ -606,11 +621,13 @@ "list": [ { "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(up{exp_type='pgbouncer'},cluster_name)", "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "cluster_name", "options": [], @@ -630,16 +647,18 @@ }, { "current": {}, - "datasource": "PROMETHEUS", - "definition": "label_values(up{exp_type='pgbouncer'},pod)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "definition": "label_values(up{cluster_name=\"[[cluster_name]]\",exp_type='pgbouncer'},pod)", "hide": 0, "includeAll": true, - "label": null, "multi": false, "name": "pgbnode", "options": [], "query": { - "query": "label_values(up{exp_type='pgbouncer'},pod)", + "query": "label_values(up{cluster_name=\"[[cluster_name]]\",exp_type='pgbouncer'},pod)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, @@ -653,20 +672,14 @@ "useTags": false }, { - "current": { - "selected": true, - "text": [ - "All" - ], - "value": [ - "$__all" - ] + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "datasource": "PROMETHEUS", "definition": "label_values(ccp_pgbouncer_databases_pool_size{cluster_name=\"[[cluster_name]]\", pod=\"[[pgbnode]]\"},name)", "hide": 0, "includeAll": true, - "label": null, "multi": false, "name": "pool", "options": [], @@ -692,19 +705,20 @@ }, "timepicker": { "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" ] }, "timezone": "browser", "title": "PGBouncer", "uid": "a7ff3775-37c9-4072-b0bc-1292f5c5841b", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/pod_details.json b/kustomize/monitoring/grafana/dashboards/pod_details.json index dd704806..6435175a 100644 --- a/kustomize/monitoring/grafana/dashboards/pod_details.json +++ b/kustomize/monitoring/grafana/dashboards/pod_details.json @@ -9,31 +9,41 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -43,10 +53,9 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625069717503, "links": [ { "icon": "external link", @@ -60,7 +69,10 @@ ], "panels": [ { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { @@ -70,18 +82,31 @@ "mappings": [ { "options": { - "2": { - "index": 2, - "text": "Primary" - }, "1": { "index": 1, "text": "Replica" + }, + "2": { + "index": 2, + "text": "Primary" } }, "type": "value" } - ] + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } }, "overrides": [] }, @@ -97,6 +122,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "last" @@ -104,15 +130,20 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": { "valueSize": 30 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.2.20", + "pluginVersion": "11.1.13", "targets": [ { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "editorMode": "code", "exemplar": false, "expr": "ccp_is_in_recovery_status{pod=\"[[pod]]\", pg_cluster=\"[[cluster]]\"}", @@ -127,70 +158,162 @@ "type": "stat" }, { - "aliasColors": { - "% Throttled": "yellow", - "% Used": "blue", - "Limit": "red", - "Process count": "blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Percent", + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [] }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "% Throttled" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "% Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 0, - "y": 0 + "y": 2 }, - "hiddenSeries": false, "id": 11, - "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 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg((idelta(ccp_nodemx_cpuacct_usage{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])/1000000000)/idelta(ccp_nodemx_cpuacct_usage_ts{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])*100) without(instance,ip,role)", "format": "time_series", "hide": false, @@ -200,6 +323,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg((ccp_nodemx_cpucfs_quota_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}*100/ccp_nodemx_cpucfs_period_us{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"})) without (instance,ip,role)", "format": "time_series", "hide": false, @@ -209,117 +336,182 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "Percent", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "Process count", - "logBase": 1, - "max": null, - "min": "0", - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "% Throttled": "yellow", - "% Used": "blue", - "Limit": "red", - "Process count": "blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "color": {}, - "custom": {}, + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, "thresholds": { "mode": "absolute", "steps": [] }, "unit": "short" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "% Throttled" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "% Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Process count" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Process count" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 8, - "y": 0 + "y": 2 }, - "hiddenSeries": false, "id": 15, - "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.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "Process count", - "yaxis": 2 + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_process_count{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "hide": false, @@ -329,6 +521,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg((idelta(ccp_nodemx_cpustat_throttled_time{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])/1000000000)/idelta(ccp_nodemx_cpustat_snap_ts{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[30s])*100) without (instance,ip,role)", "format": "time_series", "hide": false, @@ -338,112 +534,193 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "CPU Throttle", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "Process count", - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Inactive anon": "super-light-purple", - "Limit": "red", - "Mem free": "green", - "Request": "blue" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Inactive anon" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Mem free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 16, - "y": 0 + "y": 2 }, - "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.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "Limit", - "dashes": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "Request", - "dashes": true + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -452,6 +729,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -460,6 +741,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -468,6 +753,10 @@ "refId": "J" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(clamp_min((ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"} - ccp_nodemx_mem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}),0)) without (instance,ip,role)", "format": "time_series", "hide": false, @@ -477,102 +766,109 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Memory", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "Bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/tx bytes/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 0, - "y": 6 + "y": 8 }, - "hiddenSeries": false, "id": 8, - "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 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/tx bytes/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(rate(ccp_nodemx_network_rx_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", "format": "time_series", "interval": "", @@ -581,6 +877,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(rate(ccp_nodemx_network_tx_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\", interface!=\"tunl0\"}[1m])) without(instance,ip,role)", "format": "time_series", "interval": "", @@ -589,97 +889,98 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Network", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 8, - "y": 6 + "y": 8 }, - "hiddenSeries": false, "id": 10, - "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 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg((ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_available_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -688,6 +989,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg((ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}-ccp_nodemx_data_disk_free_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/ccp_nodemx_data_disk_total_file_nodes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) without(instance,ip,role)", "format": "time_series", "interval": "", @@ -696,102 +1001,109 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "Bps" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Reads/" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 8, "x": 16, - "y": 6 + "y": 8 }, - "hiddenSeries": false, "id": 12, - "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 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Reads/", - "transform": "negative-Y" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_read{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*512) without(instance,ip,role)", "format": "time_series", "interval": "", @@ -800,6 +1112,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(rate(ccp_nodemx_disk_activity_sectors_written{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}[1m])*512) without(instance,ip,role)", "format": "time_series", "interval": "", @@ -808,104 +1124,143 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Disk Activity", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Inactive anon": "super-light-purple", - "Limit": "red", - "Request": "green" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Inactive anon" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "super-light-purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, - "y": 12 + "y": 14 }, - "hiddenSeries": false, "id": 14, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_cache{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -914,6 +1269,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_dirty{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -922,6 +1281,10 @@ "refId": "D" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_shmem{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -930,6 +1293,10 @@ "refId": "E" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_rss{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -938,6 +1305,10 @@ "refId": "F" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_mapped_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -946,6 +1317,10 @@ "refId": "G" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_kmem_usage_in_bytes{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -954,6 +1329,10 @@ "refId": "H" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_inactive_anon{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -962,6 +1341,10 @@ "refId": "I" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_active_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -970,6 +1353,10 @@ "refId": "J" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_inactive_file{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -978,111 +1365,198 @@ "refId": "K" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Memory Breakdown", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "CPU limit": "red", - "CPU request": "blue", - "Memory limit": "dark-red", - "Memory request": "dark-green" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Memory", + "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": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CPU limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory request" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU request" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "CPU (millicores)" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU limit" + }, + "properties": [ + { + "id": "unit", + "value": "short" + }, + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "CPU (millicores)" + } + ] + } + ] }, - "fill": 0, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, - "y": 12 + "y": 14 }, - "hiddenSeries": false, "id": 13, - "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.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "CPU request", - "yaxis": 2 + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "alias": "CPU limit", - "yaxis": 2 + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_cpu_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -1091,6 +1565,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_cpu_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -1099,6 +1577,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_limit{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -1107,6 +1589,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "avg(ccp_nodemx_mem_request{pg_cluster=\"[[cluster]]\",pod=\"[[pod]]\"}) without (instance,ip,role)", "format": "time_series", "interval": "", @@ -1115,63 +1601,24 @@ "refId": "D" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Container resources", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "bytes", - "label": "Memory", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": "CPU (millicores)", - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5s", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(pg_cluster)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "cluster", @@ -1187,18 +1634,17 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values({pg_cluster=\"[[cluster]]\", exp_type!=\"pgbouncer\"},pod)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "pod", @@ -1214,7 +1660,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1241,5 +1686,6 @@ "timezone": "browser", "title": "Pod Details", "uid": "4auP6Mk7k", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_details.json b/kustomize/monitoring/grafana/dashboards/postgresql_details.json index d38cf826..9bc8f54b 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_details.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_details.json @@ -9,6 +9,7 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "panel", @@ -20,13 +21,7 @@ "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", @@ -39,13 +34,22 @@ "id": "stat", "name": "Stat", "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -55,10 +59,9 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625069813048, "links": [ { "asDropdown": false, @@ -74,14 +77,15 @@ ], "panels": [ { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [ { "title": "pgBackrest", @@ -90,11 +94,13 @@ ], "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -125,7 +131,6 @@ "y": 0 }, "id": 27, - "interval": null, "links": [ { "title": "pgBackRest", @@ -138,6 +143,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "min" @@ -145,13 +151,19 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "min(ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} or ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"}) ", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "min((ccp_backrest_last_incr_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)) or (ccp_backrest_last_diff_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)) or (ccp_backrest_last_full_backup_time_since_completion_seconds{pg_cluster=\"[[cluster]]\"} + on(job,instance) group_left() (ccp_is_in_recovery_status == 2)))", "format": "time_series", "interval": "", "intervalFactor": 1, @@ -159,27 +171,28 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, "title": "[[cluster]] : Backup Status", "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -212,10 +225,10 @@ "y": 2 }, "id": 8, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -226,11 +239,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\", state=\"active\"})*100 /sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\", state=\"active\"})*100 /sum(ccp_connection_stats_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "hide": false, @@ -247,21 +265,24 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -294,10 +315,10 @@ "y": 2 }, "id": 2, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -308,11 +329,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})/sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})/sum(ccp_connection_stats_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "instant": true, @@ -326,22 +352,25 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 1200, @@ -374,10 +403,10 @@ "y": 2 }, "id": 34, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -388,11 +417,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(abs(ccp_connection_stats_max_idle_in_txn_time{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}))", "format": "time_series", "instant": true, @@ -406,21 +440,24 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -453,10 +490,10 @@ "y": 2 }, "id": 3, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -467,11 +504,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})*100/sum(pg_settings_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})*100/sum(ccp_connection_stats_max_connections{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "instant": true, @@ -487,21 +529,24 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -534,10 +579,10 @@ "y": 2 }, "id": 32, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -548,11 +593,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_transaction_wraparound_percent_towards_wraparound{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "instant": true, @@ -568,22 +618,25 @@ "type": "gauge" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "max": 100, @@ -616,10 +669,10 @@ "y": 2 }, "id": 33, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { + "minVizHeight": 75, + "minVizWidth": 75, "orientation": "horizontal", "reduceOptions": { "calcs": [ @@ -630,11 +683,16 @@ }, "showThresholdLabels": false, "showThresholdMarkers": true, + "sizing": "auto", "text": {} }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})*100/sum(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}+ccp_stat_database_blks_read{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "instant": true, @@ -650,57 +708,94 @@ "type": "gauge" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 24, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m])) + sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -712,6 +807,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -723,99 +822,98 @@ "step": 2 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Activity - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 26, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"}) or sum by (state) (ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle\"})", "format": "time_series", "hide": false, @@ -827,6 +925,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"}) or sum by (state) (ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"idle in transaction\"})", "format": "time_series", "interval": "", @@ -835,6 +937,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (state) (pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"active\"}) or sum by (state) (ccp_pg_stat_activity_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",datname=~\"[[datname]]\",state=\"active\"})", "format": "time_series", "intervalFactor": 1, @@ -842,100 +948,98 @@ "refId": "C" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Connections - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": { + "log": 2, + "type": "log" + }, + "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": "decmbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 13 }, - "hiddenSeries": false, "id": 12, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})/(1024*1024)", "format": "time_series", "hide": false, @@ -944,6 +1048,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ccp_database_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}/(1024*1024)", "format": "time_series", "intervalFactor": 2, @@ -951,111 +1059,144 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "database size - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decmbytes", - "label": null, - "logBase": 2, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": { - "Max: ccp_monitoring(postgres)": "red" + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", "description": "", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] - }, - "overrides": [] + "color": { + "mode": "palette-classic" + }, + "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": "ms" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max: ccp_monitoring(postgres)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Max:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#FF9830", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Avg:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#5794F2", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 13 }, - "hiddenSeries": false, "id": 31, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Max:/", - "color": "#FF9830" - }, - { - "alias": "/Avg:/", - "color": "#5794F2" - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname=~\"[[datname]]\"}) without (instance,ip)", "format": "time_series", "hide": false, @@ -1067,6 +1208,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}) without (instance,ip,query,queryid)", "format": "time_series", "hide": false, @@ -1078,100 +1223,100 @@ "step": 2 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Query Duration - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": { + "log": 2, + "type": "log" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 19 }, - "hiddenSeries": false, "id": 11, "interval": "", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_tup_fetched{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1183,6 +1328,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_tup_inserted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1193,6 +1342,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_tup_updated{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1203,6 +1356,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_tup_deleted{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -1212,6 +1369,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_tup_returned{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "interval": "", @@ -1222,100 +1383,97 @@ "step": 2 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Row activity - [[pod]]-[[datname]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 2, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "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": "decmbytes" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 19 }, - "hiddenSeries": false, "id": 30, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ccp_wal_activity_total_size_bytes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}/(1024*1024)", "format": "time_series", "hide": false, @@ -1324,53 +1482,19 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "WAL size MB - [[cluster]]-[[pod]]", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "decmbytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": {}, @@ -1402,7 +1526,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1435,6 +1558,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(rate(ccp_stat_database_deadlocks{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1445,6 +1572,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(rate(ccp_stat_database_conflicts{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "intervalFactor": 2, @@ -1454,6 +1585,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1465,6 +1600,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\"}[5m]))", "format": "time_series", "hide": false, @@ -1477,52 +1616,46 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Key Counters - [[pod]] - [[datname]]", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { @@ -1557,7 +1690,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1578,6 +1710,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "exemplar": false, "expr": "ccp_replication_lag_size_bytes{pg_cluster=\"[[cluster]]\", role!=\"replica\"}", "format": "time_series", @@ -1589,6 +1725,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ccp_replication_lag_replay_time{pg_cluster=\"[[cluster]]\", role=\"replica\"}", "format": "time_series", "hide": false, @@ -1599,20 +1739,16 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Replication Lag - [[cluster]]", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, @@ -1621,7 +1757,6 @@ "format": "short", "label": "Lag bytes", "logBase": 1, - "max": null, "min": 0, "show": true }, @@ -1629,22 +1764,24 @@ "format": "dtdhms", "label": "Lag time (hh:mm:ss)", "logBase": 1, - "max": null, "min": 0, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": {}, @@ -1676,7 +1813,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1692,6 +1828,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_bgwriter_buffers_alloc{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, @@ -1701,6 +1841,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_io_bgwriter_writes{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_backend{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, @@ -1710,6 +1854,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_io_bgwriter_fsyncs{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_backend_fsync{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, @@ -1719,6 +1867,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_checkpointer_buffers_written{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"}) or sum(ccp_stat_bgwriter_buffers_checkpoint{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, @@ -1728,6 +1880,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_stat_bgwriter_buffers_clean{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"})", "format": "time_series", "intervalFactor": 2, @@ -1738,52 +1894,46 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Buffers - [[pod]]", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": true } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": {}, @@ -1815,7 +1965,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1831,6 +1980,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"accessexclusivelock\"})", "format": "time_series", "hide": false, @@ -1841,6 +1994,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"exclusivelock\"})", "format": "time_series", "hide": false, @@ -1850,6 +2007,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"rowexclusivelock\"})", "format": "time_series", "hide": false, @@ -1859,6 +2020,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"sharerowexclusivelock\"})", "format": "time_series", "hide": false, @@ -1868,6 +2033,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"shareupdateexclusivelock\"})", "format": "time_series", "hide": false, @@ -1877,6 +2046,10 @@ "step": 2 }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum by (mode) (ccp_locks_count{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname=~\"[[datname]]\",mode=\"accesssharelock\"})", "format": "time_series", "intervalFactor": 1, @@ -1885,52 +2058,46 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Locks - [[pod]]-[[datname]]", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { "format": "short", - "label": null, "logBase": 1, - "max": null, "min": "0", "show": true }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } }, { "aliasColors": {}, + "autoMigrateFrom": "graph", "bars": false, "dashLength": 10, "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": {}, @@ -1962,7 +2129,6 @@ }, "lines": true, "linewidth": 1, - "links": [], "nullPointMode": "null", "options": { "alertThreshold": true @@ -1978,6 +2144,10 @@ "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname!~\"template0\", dbname!~\"template1\"}*100/(ccp_stat_database_blks_hit{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\", dbname!~\"template0\", dbname!~\"template1\"} + ccp_stat_database_blks_read{pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\",dbname!~\"template0\", dbname!~\"template1\"})", "format": "time_series", "hide": false, @@ -1988,28 +2158,22 @@ } ], "thresholds": [], - "timeFrom": null, "timeRegions": [], - "timeShift": null, "title": "Cache Hit Ratio - [[pod]]-[[datname]]", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, - "type": "graph", + "type": "timeseries", "xaxis": { - "buckets": null, "mode": "time", - "name": null, "show": true, "values": [] }, "yaxes": [ { - "decimals": null, "format": "percent", - "label": null, "logBase": 1, "max": "100", "min": "0", @@ -2017,22 +2181,17 @@ }, { "format": "short", - "label": null, "logBase": 1, - "max": null, - "min": null, "show": false } ], "yaxis": { - "align": false, - "alignLevel": null + "align": false } } ], "refresh": "5s", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], @@ -2040,12 +2199,12 @@ "list": [ { "allFormat": "glob", - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "cluster", @@ -2061,7 +2220,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -2070,10 +2228,11 @@ "allFormat": "glob", "allValue": ".*", "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values({pg_cluster=\"[[cluster]]\", exp_type!=\"pgbouncer\"},pod)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "pod", @@ -2089,7 +2248,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -2098,10 +2256,11 @@ "allFormat": "glob", "allValue": ".*", "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values({pg_cluster=\"[[cluster]]\",pod=~\"[[pod]]\"},dbname)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "Database", @@ -2117,7 +2276,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -2144,5 +2302,6 @@ "timezone": "browser", "title": "PostgreSQLDetails", "uid": "fMip0cuMk", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json index f9bf2e94..79ee545e 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_overview.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_overview.json @@ -9,12 +9,13 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" + "version": "11.1.13" }, { "type": "datasource", @@ -33,7 +34,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -43,21 +47,21 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625069480601, "links": [], "panels": [ { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "links": [ { "targetBlank": true, @@ -87,25 +91,34 @@ ], "mappings": [ { - "from": "0", - "id": 0, - "text": "DOWN", - "to": "99", - "type": 2 + "options": { + "from": 0, + "result": { + "text": "DOWN" + }, + "to": 99 + }, + "type": "range" }, { - "from": "100", - "id": 1, - "text": "Standalone Cluster", - "to": "199", - "type": 2 + "options": { + "from": 100, + "result": { + "text": "Standalone Cluster" + }, + "to": 199 + }, + "type": "range" }, { - "from": "200", - "id": 2, - "text": "HA CLUSTER", - "to": "1000", - "type": 2 + "options": { + "from": 200, + "result": { + "text": "HA CLUSTER" + }, + "to": 1000 + }, + "type": "range" } ], "thresholds": { @@ -136,8 +149,6 @@ "y": 0 }, "id": 1, - "interval": null, - "links": [], "maxDataPoints": 100, "maxPerRow": 2, "options": { @@ -145,6 +156,7 @@ "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "lastNotNull" @@ -152,17 +164,23 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": { "valueSize": 30 }, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "repeat": "cluster", "repeatDirection": "h", "targets": [ { "$hashKey": "object:243", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(pg_up{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"}) or sum(patroni_postgres_running{pg_cluster=~\"$cluster\"})*100+sum(ccp_is_in_recovery_status{pg_cluster=~\"$cluster\"})", "format": "time_series", "interval": "", @@ -178,19 +196,18 @@ } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { "allFormat": "glob", - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(pg_cluster)", - "description": null, - "error": null, "hide": 1, "includeAll": true, "label": "cluster", @@ -206,7 +223,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -233,5 +249,6 @@ "timezone": "browser", "title": "PostgreSQL Overview", "uid": "D2X39SlGk", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json b/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json index de4f7fa1..8e5f6989 100644 --- a/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json +++ b/kustomize/monitoring/grafana/dashboards/postgresql_service_health.json @@ -9,31 +9,35 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -43,10 +47,9 @@ ] }, "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625069909806, "links": [ { "asDropdown": false, @@ -62,58 +65,95 @@ ], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "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": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ccp_connection_stats_total{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip) / sum(ccp_connection_stats_max_connections{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", "format": "time_series", "instant": false, @@ -123,6 +163,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "100 - 100 * avg(ccp_nodemx_data_disk_available_bytes{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip) / avg(ccp_nodemx_data_disk_total_bytes{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", "format": "time_series", "interval": "", @@ -131,102 +175,98 @@ "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Saturation (pct used)", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "percent", - "label": null, - "logBase": 1, - "max": "100", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "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": [], + "min": 0.001, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 0 }, - "hiddenSeries": false, "id": 18, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "exemplar": false, "expr": " sum(irate(ccp_stat_database_xact_commit{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) \n+ sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]))", "format": "time_series", @@ -236,6 +276,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_connection_stats_active{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip,dbname)", "format": "time_series", "interval": "", @@ -244,6 +288,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]))", "format": "time_series", "hide": false, @@ -253,101 +301,99 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Traffic", - "tooltip": { - "shared": true, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "", - "logBase": 1, - "max": null, - "min": "0.001", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "Errors", "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 50, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 5, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_xact_rollback{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m]) without(pod,instance,ip))", "format": "time_series", "hide": true, @@ -357,6 +403,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_deadlocks{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, @@ -366,6 +416,10 @@ "refId": "D" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(irate(ccp_stat_database_conflicts{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}[1m])) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, @@ -375,6 +429,10 @@ "refId": "B" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(pg_exporter_last_scrape_error{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without(pod,instance,ip,dbname)", "format": "time_series", "hide": false, @@ -384,6 +442,10 @@ "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(clamp_max(ccp_archive_command_status_seconds_since_last_fail{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"},1)) without (instance,pod,ip)", "format": "time_series", "hide": false, @@ -393,111 +455,130 @@ "refId": "E" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Errors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "short", - "label": "", - "logBase": 2, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "/Max:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E02F44", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "/Avg:/" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#8AB8FF", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 1, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 10, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 150, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "/Max:/", - "color": "#E02F44", - "nullPointMode": "null as zero" + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "width": 150 }, - { - "alias": "/Avg:/", - "color": "#8AB8FF" + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "7.4.5", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip)", "format": "time_series", "hide": false, @@ -508,6 +589,10 @@ "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\",role=\"[[role]]\"}) without (pod,instance,ip,query,queryid)", "format": "time_series", "hide": false, @@ -518,67 +603,26 @@ "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Query Duration", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "ms", - "label": null, - "logBase": 2, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "5m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(pg_cluster)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "cluster", "options": [], @@ -591,21 +635,19 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values({pg_cluster=\"[[cluster]]\", exp_type!=\"pgbouncer\"},role)", - "description": null, - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "role", "options": [], @@ -618,7 +660,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -645,5 +686,6 @@ "timezone": "browser", "title": "PostgreSQL Service Health", "uid": "dhG1wgsMz", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json index e0090cf8..b81e4292 100644 --- a/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json +++ b/kustomize/monitoring/grafana/dashboards/prometheus_alerts.json @@ -9,12 +9,13 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" + "version": "11.1.13" }, { "type": "datasource", @@ -39,7 +40,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -50,6 +54,7 @@ }, "description": "Show current firing and pending alerts, and severity alert counts.", "editable": false, + "fiscalYearStartMonth": 0, "gnetId": 4181, "graphTooltip": 0, "id": null, @@ -65,7 +70,10 @@ "panels": [ { "collapsed": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "gridPos": { "h": 1, "w": 24, @@ -74,27 +82,38 @@ }, "id": 10, "panels": [], - "repeat": null, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "refId": "A" + } + ], "title": "Environment Summary", "type": "row" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -117,26 +136,31 @@ "y": 1 }, "id": 6, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(count by (kubernetes_namespace) (pg_up{pg_cluster!=''})) + sum(count by (kubernetes_namespace) (patroni_postgres_running{pg_cluster!=''}))", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "count(group by (kubernetes_namespace)(pg_up{pg_cluster!=''}) or group by (kubernetes_namespace)(patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, "interval": "", @@ -149,22 +173,25 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -187,14 +214,13 @@ "y": 1 }, "id": 13, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -202,13 +228,19 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(count by (pg_cluster) (pg_up{pg_cluster!=''})) + sum(count by (pg_cluster) (patroni_postgres_running{pg_cluster!=''}))", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "sum(group by (pg_cluster)(pg_up{pg_cluster!=''}) or group by (pg_cluster)(patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, "interval": "", @@ -221,22 +253,25 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -259,14 +294,13 @@ "y": 1 }, "id": 14, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -274,12 +308,18 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(count(pg_up{pg_cluster!=''})) + sum(count(patroni_postgres_running{pg_cluster!=''}))", "format": "time_series", "instant": true, @@ -294,7 +334,10 @@ }, { "collapsed": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "gridPos": { "h": 1, "w": 24, @@ -303,26 +346,37 @@ }, "id": 11, "panels": [], - "repeat": null, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "refId": "A" + } + ], "title": "Alert Summary", "type": "row" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -352,14 +406,13 @@ "y": 4 }, "id": 2, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -367,10 +420,12 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { "bucketAggs": [ @@ -384,6 +439,10 @@ "type": "date_histogram" } ], + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "dsType": "elasticsearch", "expr": "sum(ALERTS{alertstate=\"firing\",severity=\"critical\"} > 0) OR on() vector(0)", "format": "time_series", @@ -405,21 +464,24 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -442,25 +504,30 @@ "y": 4 }, "id": 5, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ALERTS{alertstate=\"firing\",severity=\"warning\"} > 0) OR on() vector(0)", "format": "time_series", "instant": true, @@ -474,21 +541,24 @@ "type": "stat" }, { - "cacheTimeout": null, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, - "custom": {}, "mappings": [ { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" } ], "thresholds": { @@ -511,14 +581,13 @@ "y": 4 }, "id": 9, - "interval": null, - "links": [], "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ "mean" @@ -526,12 +595,18 @@ "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "auto" + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "sum(ALERTS{alertstate=\"firing\",severity=\"info\"} > 0) OR on() vector(0)", "format": "time_series", "interval": "", @@ -545,7 +620,10 @@ }, { "collapsed": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "gridPos": { "h": 1, "w": 24, @@ -554,32 +632,45 @@ }, "id": 12, "panels": [], - "repeat": null, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "refId": "A" + } + ], "title": "Alerts", "type": "row" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, - "displayMode": "auto", - "filterable": true + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "decimals": 2, "displayName": "", "mappings": [ { - "from": "", - "id": 1, - "text": "", - "to": "", - "type": 1, - "value": "" + "options": { + "": { + "text": "" + } + }, + "type": "value" } ], "thresholds": { @@ -613,8 +704,11 @@ }, "properties": [ { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "custom.width", @@ -679,14 +773,26 @@ "y": 7 }, "id": 1, - "links": [], "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ALERTS{alertstate='firing'} > 0", "format": "table", "instant": true, @@ -753,15 +859,21 @@ "type": "table" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { - "align": null, - "filterable": true + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "decimals": 2, "displayName": "", @@ -797,8 +909,7 @@ "value": 2 }, { - "id": "custom.align", - "value": null + "id": "custom.align" } ] }, @@ -809,8 +920,7 @@ }, "properties": [ { - "id": "custom.width", - "value": null + "id": "custom.width" } ] }, @@ -871,14 +981,26 @@ "y": 12 }, "id": 3, - "links": [], "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ALERTS{alertstate=\"pending\"}", "format": "table", "instant": false, @@ -929,8 +1051,7 @@ } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], @@ -957,5 +1078,6 @@ "timezone": "browser", "title": "Prometheus Alerts", "uid": "lwxXsZsMk", - "version": 1 + "version": 1, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/dashboards/query_statistics.json b/kustomize/monitoring/grafana/dashboards/query_statistics.json index 72f67122..48f445fc 100644 --- a/kustomize/monitoring/grafana/dashboards/query_statistics.json +++ b/kustomize/monitoring/grafana/dashboards/query_statistics.json @@ -9,18 +9,13 @@ "pluginName": "Prometheus" } ], + "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", - "version": "7.4.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" + "version": "11.1.13" }, { "type": "datasource", @@ -39,13 +34,22 @@ "id": "table", "name": "Table", "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" } ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -56,10 +60,9 @@ }, "description": "", "editable": false, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, - "iteration": 1625070004605, "links": [ { "icon": "external link", @@ -71,10 +74,12 @@ ], "panels": [ { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -101,34 +106,46 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { - "calcs": [], + "calcs": [ + "max" + ], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", + "instant": true, "interval": "", "legendFormat": "", + "range": false, "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Queries Executed", + "title": "Total Queries Executed (Lifetime)", "type": "stat" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -155,35 +172,45 @@ "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { - "calcs": [], + "calcs": [ + "max" + ], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pg_stat_statements_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", "format": "time_series", - "instant": false, + "instant": true, "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Query Runtime ", + "title": "Total Query Runtime (Lifetime)", "type": "stat" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -194,7 +221,7 @@ } ] }, - "unit": "ms" + "unit": "none" }, "overrides": [] }, @@ -204,43 +231,50 @@ "x": 11, "y": 0 }, - "id": 10, + "id": 11, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ - "mean" + "max" ], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "avg(sum_over_time(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod,dbname,exported_role)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_pg_stat_statements_total_row_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", "format": "time_series", - "instant": false, + "instant": true, "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Query Mean Runtime", + "title": "Total Rows Retrieved or Affected (Lifetime)", "type": "stat" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {}, "mappings": [], "thresholds": { "mode": "absolute", @@ -251,7 +285,7 @@ } ] }, - "unit": "none" + "unit": "ms" }, "overrides": [] }, @@ -261,145 +295,347 @@ "x": 17, "y": 0 }, - "id": 11, + "id": 10, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", + "percentChangeColorMode": "standard", "reduceOptions": { "calcs": [ - "mean" + "max" ], "fields": "", "values": false }, + "showPercentChange": false, "text": {}, - "textMode": "value" + "textMode": "value", + "wideLayout": true }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(sum_over_time(ccp_pg_stat_statements_total_row_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment, pod,dbname,exported_role)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_pg_stat_statements_total_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", "format": "time_series", - "instant": false, + "instant": true, "interval": "", "legendFormat": "", "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Rows Retrieved or Affected", + "title": "Query Mean Runtime (Lifetime)", "type": "stat" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { - "custom": {} + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 7, - "w": 23, + "h": 3, + "w": 5, "x": 0, "y": 3 }, - "hiddenSeries": false, - "id": 2, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": null, - "total": false, - "values": false + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "diff" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true + }, + "pluginVersion": "11.1.13", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", + "instant": false, + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Total Queries Executed (Time Range Est.)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 5, + "y": 3 + }, + "id": 14, "options": { - "alertThreshold": true + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "diff" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true }, - "percentage": false, - "pluginVersion": "7.4.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "11.1.13", "targets": [ { - "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment, pod)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pg_stat_statements_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", + "format": "time_series", "instant": false, "interval": "", - "legendFormat": "db: {{dbname}}, user: {{exported_role}}", + "legendFormat": "", + "range": true, "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Query Executions", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" + "title": "Total Query Runtime (Time Range Est.)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "gridPos": { + "h": 3, + "w": 6, + "x": 11, + "y": 3 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "diff" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": {}, + "textMode": "value", + "wideLayout": true }, - "yaxes": [ + "pluginVersion": "11.1.13", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "editorMode": "code", + "expr": "sum(ccp_pg_stat_statements_total_row_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance,ip,deployment,pod,dbname,exported_role)", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "", + "range": true, + "refId": "A" + } + ], + "title": "Total Rows Retrieved or Affected (Time Range Est.)", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "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" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 23, + "x": 0, + "y": 6 + }, + "id": 2, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": true }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "7.4.5", + "targets": [ { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "sum(irate(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance,ip,deployment,pod)", + "instant": false, + "interval": "", + "legendFormat": "db: {{dbname}}, user: {{exported_role}}", + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Query Executions", + "type": "timeseries" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "auto", - "filterable": false + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "mappings": [], "thresholds": { @@ -428,8 +664,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -507,10 +746,19 @@ "h": 8, "w": 23, "x": 0, - "y": 10 + "y": 13 }, "id": 4, "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -519,10 +767,14 @@ } ] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "avg(avg_over_time(ccp_pg_stat_statements_top_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "avg(ccp_pg_stat_statements_top_mean_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance, ip, deployment,pod)", "format": "table", "hide": false, "instant": true, @@ -531,9 +783,7 @@ "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "Query Mean Runtime (Top N)", + "title": "Query Mean Runtime (Top N Lifetime)", "transformations": [ { "id": "organize", @@ -569,13 +819,18 @@ "type": "table" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": { - "align": null, - "displayMode": "auto", - "filterable": false + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false }, "mappings": [], "thresholds": { @@ -604,8 +859,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -683,10 +941,19 @@ "h": 8, "w": 23, "x": 0, - "y": 18 + "y": 21 }, "id": 6, "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, "showHeader": true, "sortBy": [ { @@ -695,10 +962,14 @@ } ] }, - "pluginVersion": "7.4.5", + "pluginVersion": "11.1.13", "targets": [ { - "expr": "max(max_over_time(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "max(ccp_pg_stat_statements_top_max_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance, ip, deployment,pod)", "format": "table", "hide": false, "instant": true, @@ -707,9 +978,7 @@ "refId": "B" } ], - "timeFrom": null, - "timeShift": null, - "title": "Query Max Runtime (Top N)", + "title": "Query Max Runtime (Top N Lifetime)", "transformations": [ { "id": "organize", @@ -745,11 +1014,13 @@ "type": "table" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": { - "align": null, "filterable": false }, "mappings": [], @@ -757,8 +1028,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -779,8 +1049,11 @@ "value": "ms" }, { - "id": "custom.displayMode", - "value": "color-background" + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "color-background" + } }, { "id": "thresholds", @@ -788,8 +1061,7 @@ "mode": "percentage", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -858,7 +1130,7 @@ "h": 8, "w": 23, "x": 0, - "y": 26 + "y": 29 }, "id": 5, "options": { @@ -873,7 +1145,11 @@ "pluginVersion": "7.4.5", "targets": [ { - "expr": "sum(irate(ccp_pg_stat_statements_top_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}[$__range])) without(instance, ip, deployment,pod)", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, + "expr": "sum(ccp_pg_stat_statements_top_total_exec_time_ms{pg_cluster=\"[[cluster]]\", role=\"[[role]]\",dbname=~\"[[dbname]]\",exported_role=~\"[[dbuser]]\"}) without(instance, ip, deployment,pod)", "format": "table", "instant": true, "interval": "", @@ -881,9 +1157,7 @@ "refId": "A" } ], - "timeFrom": null, - "timeShift": null, - "title": "Query Total Runtime (Top N)", + "title": "Query Total Runtime (Top N Lifetime)", "transformations": [ { "id": "organize", @@ -919,11 +1193,16 @@ "type": "table" }, { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "fieldConfig": { "defaults": { "custom": { - "displayMode": "auto", + "cellOptions": { + "type": "auto" + }, "filterable": false, "inspect": false }, @@ -932,8 +1211,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -954,8 +1232,10 @@ "value": "bytes" }, { - "id": "custom.displayMode", - "value": "auto" + "id": "custom.cellOptions", + "value": { + "type": "auto" + } } ] } @@ -965,7 +1245,7 @@ "h": 8, "w": 23, "x": 0, - "y": 34 + "y": 37 }, "id": 12, "options": { @@ -987,7 +1267,10 @@ "pluginVersion": "8.5.15", "targets": [ { - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "expr": "ccp_pg_stat_statements_top_wal_bytes{pg_cluster=\"[[cluster]]\", dbname=~\"[[dbname]]\", role=\"[[role]]\"}", "format": "table", "instant": true, @@ -996,7 +1279,7 @@ "refId": "A" } ], - "title": "Query Total WAL Generated (Bytes)", + "title": "Query Total WAL Generated (Bytes Lifetime)", "transformations": [ { "id": "organize", @@ -1030,20 +1313,19 @@ } ], "refresh": "15m", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [ "vendor=crunchydata" ], "templating": { "list": [ { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(pg_cluster)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "cluster", @@ -1059,18 +1341,17 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values({pg_cluster=\"[[cluster]]\", exp_type!=\"pgbouncer\"},role)", - "description": null, - "error": null, "hide": 0, "includeAll": false, "label": "service", @@ -1086,18 +1367,17 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(ccp_database_size_bytes{pg_cluster=\"[[cluster]]\"},dbname)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "dbname", @@ -1113,18 +1393,17 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": {}, - "datasource": "PROMETHEUS", + "datasource": { + "type": "prometheus", + "uid": "PROMETHEUS" + }, "definition": "label_values(ccp_pg_stat_statements_total_calls_count{pg_cluster=\"[[cluster]]\", dbname=~\"[[dbname]]\"},exported_role)", - "description": null, - "error": null, "hide": 0, "includeAll": true, "label": "dbuser", @@ -1140,7 +1419,6 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1167,5 +1445,6 @@ "timezone": "browser", "title": "Query Statistics", "uid": "ZKoTOHDGk", - "version": 1 + "version": 3, + "weekStart": "" } diff --git a/kustomize/monitoring/grafana/deployment.yaml b/kustomize/monitoring/grafana/deployment.yaml index 67d60d8b..3a5e1cff 100644 --- a/kustomize/monitoring/grafana/deployment.yaml +++ b/kustomize/monitoring/grafana/deployment.yaml @@ -59,6 +59,10 @@ spec: defaultMode: 420 name: grafana-datasources - name: grafana-dashboards - configMap: + projected: defaultMode: 420 - name: grafana-dashboards + sources: + - configMap: + name: grafana-dashboards-1 + - configMap: + name: grafana-dashboards-2 diff --git a/kustomize/monitoring/grafana/kustomization.yaml b/kustomize/monitoring/grafana/kustomization.yaml index 0d15af42..cb8c2e01 100644 --- a/kustomize/monitoring/grafana/kustomization.yaml +++ b/kustomize/monitoring/grafana/kustomization.yaml @@ -17,10 +17,6 @@ configMapGenerator: - name: grafana-datasources files: - config/crunchy_grafana_datasource.yml -- name: grafana-dashboards - behavior: merge - files: - - config/crunchy_grafana_dashboards.yml secretGenerator: - name: grafana-admin From 680cea715951ef37e50620314b172aa1594e927f Mon Sep 17 00:00:00 2001 From: ValClarkson Date: Thu, 23 Oct 2025 12:23:25 -0400 Subject: [PATCH 09/10] updated for Oct release PGO-2708 --- helm/install/Chart.yaml | 4 +- helm/install/LICENSE.txt | 43 ------------------- ...crunchydata.com_crunchybridgeclusters.yaml | 4 +- ...res-operator.crunchydata.com_pgadmins.yaml | 7 +-- ...s-operator.crunchydata.com_pgupgrades.yaml | 8 ++-- ...ator.crunchydata.com_postgresclusters.yaml | 6 +-- helm/install/templates/manager.yaml | 2 +- helm/install/values.yaml | 32 ++++++++------ kustomize/install/LICENSE.txt | 43 ------------------- .../images-by-tag/kustomization.yaml | 39 +++++++++++------ ...crunchydata.com_crunchybridgeclusters.yaml | 4 +- ...res-operator.crunchydata.com_pgadmins.yaml | 7 +-- ...s-operator.crunchydata.com_pgupgrades.yaml | 8 ++-- ...ator.crunchydata.com_postgresclusters.yaml | 6 +-- kustomize/install/default/kustomization.yaml | 2 +- kustomize/install/manager/manager.yaml | 6 +++ .../singlenamespace/kustomization.yaml | 2 +- 17 files changed, 77 insertions(+), 146 deletions(-) delete mode 100644 helm/install/LICENSE.txt delete mode 100644 kustomize/install/LICENSE.txt diff --git a/helm/install/Chart.yaml b/helm/install/Chart.yaml index 42207888..04369d9c 100644 --- a/helm/install/Chart.yaml +++ b/helm/install/Chart.yaml @@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D type: application # The version below should match the version on the PostgresCluster CRD -version: 5.8.3 -appVersion: 5.8.3 +version: 5.8.4 +appVersion: 5.8.4 diff --git a/helm/install/LICENSE.txt b/helm/install/LICENSE.txt deleted file mode 100644 index e552b550..00000000 --- a/helm/install/LICENSE.txt +++ /dev/null @@ -1,43 +0,0 @@ - Crunchy Data - - Crunchy PostgreSQL for Kubernetes Terms of Use - -Crunchy Data Solutions, Inc. (Crunchy Data) has integrated the Crunchy Data -distribution of PostgreSQL and the PostgreSQL Operator as the commercial product, -Crunchy PostgreSQL for Kubernetes. This Crunchy PostgreSQL for Kubernetes Terms -of Use establishes a framework that will enable Crunchy Data to provide Crunchy -Data packaged open source software, made available as a series of containers (the -"Crunchy Data Software"), to users, subject to applicable terms and conditions. - -By using or accessing the Crunchy Data Software, the using or accessing party -agrees to applicable terms and conditions and agrees that the applicable terms as -set forth in this Crunchy PostgreSQL for Kubernetes Terms of Use will govern the -use of the Crunchy Data Software unless otherwise agreed to in writing by Crunchy -Data and the using or accessing party. If at any time the applicable terms are -no longer acceptable to the using or accessing party, the using or accessing -party should immediately cease all use of the Crunchy Data Software. - -For users with a valid Crunchy Data subscription agreement, unless otherwise -agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, including the -use of each of the containers included therein, by users with a valid Crunchy -Data subscription agreement, for both development and production purposes, is -subject to the Crunchy Data Terms of Use (the "Crunchy Data Terms of Use") -located at: - - * https://access.crunchydata.com/EULA - -Crunchy PostgreSQL for Kubernetes constitutes Crunchy Data Software under the -Crunchy Data Terms of Use and its use is not intended to prohibit the rights -under any open source license. - -For users without a valid Crunchy Data subscription agreement, the Crunchy Data -Software is provided for use under the Crunchy Data Developer Program. Unless -otherwise agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, -including the use of each of the containers included therein, is subject to the -Crunchy Data Developer Program Terms of Use (the "Developer Terms of Use"): - - * https://www.crunchydata.com/developers/terms-of-use - -Crunchy PostgreSQL for Kubernetes constitutes Crunchy Developer Software under -the Crunchy Data Developer Program Terms of Use and its use is not intended to -prohibit the rights under any open source license. diff --git a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index 794d8248..2a6b699d 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml index 0124eb15..41d936bc 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgadmins.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -2577,6 +2575,9 @@ spec: majorVersion: description: MajorVersion represents the major version of the running pgAdmin. type: integer + minorVersion: + description: MinorVersion represents the minor version of the running pgAdmin. + type: string observedGeneration: description: observedGeneration represents the .metadata.generation on which the status was based. format: int64 diff --git a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml index 476b1ef1..8fc136bc 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -926,7 +924,7 @@ spec: fromPostgresVersion: description: The major version of PostgreSQL before the upgrade. format: int32 - maximum: 17 + maximum: 18 minimum: 11 type: integer image: @@ -1056,7 +1054,7 @@ spec: toPostgresVersion: description: The major version of PostgreSQL to be upgraded to. format: int32 - maximum: 17 + maximum: 18 minimum: 11 type: integer tolerations: diff --git a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml index fd078c2a..7e734259 100644 --- a/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -12173,7 +12171,7 @@ spec: type: string postgresVersion: description: The major version of PostgreSQL installed in the PostgreSQL image - maximum: 17 + maximum: 18 minimum: 11 type: integer proxy: diff --git a/helm/install/templates/manager.yaml b/helm/install/templates/manager.yaml index 7e7066fc..fa04aa40 100644 --- a/helm/install/templates/manager.yaml +++ b/helm/install/templates/manager.yaml @@ -71,4 +71,4 @@ spec: {{- if .Values.affinity }} affinity: {{- toYaml .Values.affinity | nindent 8 }} - {{- end }} + {{- end }} \ No newline at end of file diff --git a/helm/install/values.yaml b/helm/install/values.yaml index 9018ccbd..5059c9ba 100644 --- a/helm/install/values.yaml +++ b/helm/install/values.yaml @@ -2,34 +2,40 @@ # controllerImages are used to run the operator's controllers. # The cluster image defined below runs the PostgresCluster and PGUpgrade controllers. controllerImages: - cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.3-0 + cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.4-0 # relatedImages are used when an image is omitted from PostgresCluster, PGAdmin or PGUpgrade specs. relatedImages: + postgres_18: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-18.0-2542 + postgres_18_gis_3.6: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-18.0-3.6-2542 postgres_17: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.6-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-17.6-2542 + postgres_17_gis_3.6: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.6-2542 postgres_17_gis_3.5: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.5-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.5-2542 postgres_17_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.4-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-17.6-3.4-2542 postgres_16: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.10-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi9-16.10-2542 postgres_16_gis_3.4: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.4-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.4-2542 postgres_16_gis_3.3: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.3-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi9-16.10-3.3-2542 pgbackrest: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi9-2.56.0-2542 pgbouncer: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi9-1.24-2542 pgexporter: - image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi9-0.17.1-2542 pgupgrade: - image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-17.6-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi9-18.0-2542 standalone_pgadmin: - image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.2-2534 + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi9-9.8-2542 collector: - image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.3-0 + image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi9-5.8.4-0 # singleNamespace controls where PGO watches for PostgresClusters. When false, # PGO watches for and responds to PostgresClusters in all namespaces. When true, diff --git a/kustomize/install/LICENSE.txt b/kustomize/install/LICENSE.txt deleted file mode 100644 index e552b550..00000000 --- a/kustomize/install/LICENSE.txt +++ /dev/null @@ -1,43 +0,0 @@ - Crunchy Data - - Crunchy PostgreSQL for Kubernetes Terms of Use - -Crunchy Data Solutions, Inc. (Crunchy Data) has integrated the Crunchy Data -distribution of PostgreSQL and the PostgreSQL Operator as the commercial product, -Crunchy PostgreSQL for Kubernetes. This Crunchy PostgreSQL for Kubernetes Terms -of Use establishes a framework that will enable Crunchy Data to provide Crunchy -Data packaged open source software, made available as a series of containers (the -"Crunchy Data Software"), to users, subject to applicable terms and conditions. - -By using or accessing the Crunchy Data Software, the using or accessing party -agrees to applicable terms and conditions and agrees that the applicable terms as -set forth in this Crunchy PostgreSQL for Kubernetes Terms of Use will govern the -use of the Crunchy Data Software unless otherwise agreed to in writing by Crunchy -Data and the using or accessing party. If at any time the applicable terms are -no longer acceptable to the using or accessing party, the using or accessing -party should immediately cease all use of the Crunchy Data Software. - -For users with a valid Crunchy Data subscription agreement, unless otherwise -agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, including the -use of each of the containers included therein, by users with a valid Crunchy -Data subscription agreement, for both development and production purposes, is -subject to the Crunchy Data Terms of Use (the "Crunchy Data Terms of Use") -located at: - - * https://access.crunchydata.com/EULA - -Crunchy PostgreSQL for Kubernetes constitutes Crunchy Data Software under the -Crunchy Data Terms of Use and its use is not intended to prohibit the rights -under any open source license. - -For users without a valid Crunchy Data subscription agreement, the Crunchy Data -Software is provided for use under the Crunchy Data Developer Program. Unless -otherwise agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, -including the use of each of the containers included therein, is subject to the -Crunchy Data Developer Program Terms of Use (the "Developer Terms of Use"): - - * https://www.crunchydata.com/developers/terms-of-use - -Crunchy PostgreSQL for Kubernetes constitutes Crunchy Developer Software under -the Crunchy Data Developer Program Terms of Use and its use is not intended to -prohibit the rights under any open source license. diff --git a/kustomize/install/components/images-by-tag/kustomization.yaml b/kustomize/install/components/images-by-tag/kustomization.yaml index 327ec16f..3b5f3194 100644 --- a/kustomize/install/components/images-by-tag/kustomization.yaml +++ b/kustomize/install/components/images-by-tag/kustomization.yaml @@ -2,37 +2,52 @@ kind: Component images: - name: image-pgadmin newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4 - newTag: ubi9-9.2-2534 + newTag: ubi9-9.8-2542 - name: image-pgbackrest newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest - newTag: ubi9-2.56.0-2534 + newTag: ubi9-2.56.0-2542 - name: image-pgbouncer newName: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer - newTag: ubi9-1.24-2534 + newTag: ubi9-1.24-2542 - name: image-postgres-exporter newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter - newTag: ubi9-0.17.1-2534 + newTag: ubi9-0.17.1-2542 - name: image-postgres-operator-5.8 newName: registry.developers.crunchydata.com/crunchydata/postgres-operator - newTag: ubi9-5.8.3-0 + newTag: ubi9-5.8.4-0 +- name: image-crunchy-postgres-15 + newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres + newTag: ubi9-15.14-2542 - name: image-crunchy-postgres-16 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-16.10-2534 + newTag: ubi9-16.10-2542 - name: image-crunchy-postgres-17 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres - newTag: ubi9-17.6-2534 + newTag: ubi9-17.6-2542 +- name: image-crunchy-postgres-18 + newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres + newTag: ubi9-18.0-2542 - name: image-crunchy-upgrade newName: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade - newTag: ubi9-17.6-2534 + newTag: ubi9-18.0-2542 +- name: image-crunchy-postgres-15-gis-3.3 + newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis + newTag: ubi9-15.14-3.3-2542 - name: image-crunchy-postgres-16-gis-3.3 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.10-3.3-2534 + newTag: ubi9-16.10-3.3-2542 - name: image-crunchy-postgres-16-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-16.10-3.4-2534 + newTag: ubi9-16.10-3.4-2542 - name: image-crunchy-postgres-17-gis-3.4 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.6-3.4-2534 + newTag: ubi9-17.6-3.4-2542 - name: image-crunchy-postgres-17-gis-3.5 newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis - newTag: ubi9-17.6-3.5-2534 + newTag: ubi9-17.6-3.5-2542 +- name: image-crunchy-postgres-17-gis-3.6 + newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis + newTag: ubi9-17.6-3.6-2542 +- name: image-crunchy-postgres-18-gis-3.6 + newName: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis + newTag: ubi9-18.0-3.6-2542 diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml index 794d8248..2a6b699d 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: crunchybridgeclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml index 0124eb15..41d936bc 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: pgadmins.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -2577,6 +2575,9 @@ spec: majorVersion: description: MajorVersion represents the major version of the running pgAdmin. type: integer + minorVersion: + description: MinorVersion represents the minor version of the running pgAdmin. + type: string observedGeneration: description: observedGeneration represents the .metadata.generation on which the status was based. format: int64 diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml index 476b1ef1..8fc136bc 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: pgupgrades.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -926,7 +924,7 @@ spec: fromPostgresVersion: description: The major version of PostgreSQL before the upgrade. format: int32 - maximum: 17 + maximum: 18 minimum: 11 type: integer image: @@ -1056,7 +1054,7 @@ spec: toPostgresVersion: description: The major version of PostgreSQL to be upgraded to. format: int32 - maximum: 17 + maximum: 18 minimum: 11 type: integer tolerations: diff --git a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml index fd078c2a..7e734259 100644 --- a/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml +++ b/kustomize/install/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml @@ -1,11 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.17.2 name: postgresclusters.postgres-operator.crunchydata.com labels: - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 spec: group: postgres-operator.crunchydata.com names: @@ -12173,7 +12171,7 @@ spec: type: string postgresVersion: description: The major version of PostgreSQL installed in the PostgreSQL image - maximum: 17 + maximum: 18 minimum: 11 type: integer proxy: diff --git a/kustomize/install/default/kustomization.yaml b/kustomize/install/default/kustomization.yaml index e7a0ea52..8bf48894 100644 --- a/kustomize/install/default/kustomization.yaml +++ b/kustomize/install/default/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 - includeSelectors: true includeTemplates: true pairs: diff --git a/kustomize/install/manager/manager.yaml b/kustomize/install/manager/manager.yaml index 1828e059..d0318739 100644 --- a/kustomize/install/manager/manager.yaml +++ b/kustomize/install/manager/manager.yaml @@ -35,6 +35,12 @@ spec: value: image-crunchy-postgres-17-gis-3.4 - name: RELATED_IMAGE_POSTGRES_17_GIS_3.5 value: image-crunchy-postgres-17-gis-3.5 + - name: RELATED_IMAGE_POSTGRES_17_GIS_3.6 + value: image-crunchy-postgres-17-gis-3.6 + - name: RELATED_IMAGE_POSTGRES_18 + value: image-crunchy-postgres-18 + - name: RELATED_IMAGE_POSTGRES_18_GIS_3.6 + value: image-crunchy-postgres-18-gis-3.6 - name: RELATED_IMAGE_PGBACKREST value: image-pgbackrest - name: RELATED_IMAGE_PGBOUNCER diff --git a/kustomize/install/singlenamespace/kustomization.yaml b/kustomize/install/singlenamespace/kustomization.yaml index 73f990c0..d88f6c17 100644 --- a/kustomize/install/singlenamespace/kustomization.yaml +++ b/kustomize/install/singlenamespace/kustomization.yaml @@ -7,7 +7,7 @@ labels: includeTemplates: true pairs: app.kubernetes.io/name: pgo - app.kubernetes.io/version: 5.8.3 + app.kubernetes.io/version: 5.8.4 - includeSelectors: true includeTemplates: true pairs: From 81bdf8b7000149422d2b12dd8c85cef7ae93093f Mon Sep 17 00:00:00 2001 From: ValClarkson Date: Fri, 24 Oct 2025 14:29:33 -0400 Subject: [PATCH 10/10] revert delete file --- helm/install/LICENSE.txt | 43 +++++++++++++++++++++++++++++++++++ kustomize/install/LICENSE.txt | 43 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 helm/install/LICENSE.txt create mode 100644 kustomize/install/LICENSE.txt diff --git a/helm/install/LICENSE.txt b/helm/install/LICENSE.txt new file mode 100644 index 00000000..e552b550 --- /dev/null +++ b/helm/install/LICENSE.txt @@ -0,0 +1,43 @@ + Crunchy Data + + Crunchy PostgreSQL for Kubernetes Terms of Use + +Crunchy Data Solutions, Inc. (Crunchy Data) has integrated the Crunchy Data +distribution of PostgreSQL and the PostgreSQL Operator as the commercial product, +Crunchy PostgreSQL for Kubernetes. This Crunchy PostgreSQL for Kubernetes Terms +of Use establishes a framework that will enable Crunchy Data to provide Crunchy +Data packaged open source software, made available as a series of containers (the +"Crunchy Data Software"), to users, subject to applicable terms and conditions. + +By using or accessing the Crunchy Data Software, the using or accessing party +agrees to applicable terms and conditions and agrees that the applicable terms as +set forth in this Crunchy PostgreSQL for Kubernetes Terms of Use will govern the +use of the Crunchy Data Software unless otherwise agreed to in writing by Crunchy +Data and the using or accessing party. If at any time the applicable terms are +no longer acceptable to the using or accessing party, the using or accessing +party should immediately cease all use of the Crunchy Data Software. + +For users with a valid Crunchy Data subscription agreement, unless otherwise +agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, including the +use of each of the containers included therein, by users with a valid Crunchy +Data subscription agreement, for both development and production purposes, is +subject to the Crunchy Data Terms of Use (the "Crunchy Data Terms of Use") +located at: + + * https://access.crunchydata.com/EULA + +Crunchy PostgreSQL for Kubernetes constitutes Crunchy Data Software under the +Crunchy Data Terms of Use and its use is not intended to prohibit the rights +under any open source license. + +For users without a valid Crunchy Data subscription agreement, the Crunchy Data +Software is provided for use under the Crunchy Data Developer Program. Unless +otherwise agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, +including the use of each of the containers included therein, is subject to the +Crunchy Data Developer Program Terms of Use (the "Developer Terms of Use"): + + * https://www.crunchydata.com/developers/terms-of-use + +Crunchy PostgreSQL for Kubernetes constitutes Crunchy Developer Software under +the Crunchy Data Developer Program Terms of Use and its use is not intended to +prohibit the rights under any open source license. diff --git a/kustomize/install/LICENSE.txt b/kustomize/install/LICENSE.txt new file mode 100644 index 00000000..e552b550 --- /dev/null +++ b/kustomize/install/LICENSE.txt @@ -0,0 +1,43 @@ + Crunchy Data + + Crunchy PostgreSQL for Kubernetes Terms of Use + +Crunchy Data Solutions, Inc. (Crunchy Data) has integrated the Crunchy Data +distribution of PostgreSQL and the PostgreSQL Operator as the commercial product, +Crunchy PostgreSQL for Kubernetes. This Crunchy PostgreSQL for Kubernetes Terms +of Use establishes a framework that will enable Crunchy Data to provide Crunchy +Data packaged open source software, made available as a series of containers (the +"Crunchy Data Software"), to users, subject to applicable terms and conditions. + +By using or accessing the Crunchy Data Software, the using or accessing party +agrees to applicable terms and conditions and agrees that the applicable terms as +set forth in this Crunchy PostgreSQL for Kubernetes Terms of Use will govern the +use of the Crunchy Data Software unless otherwise agreed to in writing by Crunchy +Data and the using or accessing party. If at any time the applicable terms are +no longer acceptable to the using or accessing party, the using or accessing +party should immediately cease all use of the Crunchy Data Software. + +For users with a valid Crunchy Data subscription agreement, unless otherwise +agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, including the +use of each of the containers included therein, by users with a valid Crunchy +Data subscription agreement, for both development and production purposes, is +subject to the Crunchy Data Terms of Use (the "Crunchy Data Terms of Use") +located at: + + * https://access.crunchydata.com/EULA + +Crunchy PostgreSQL for Kubernetes constitutes Crunchy Data Software under the +Crunchy Data Terms of Use and its use is not intended to prohibit the rights +under any open source license. + +For users without a valid Crunchy Data subscription agreement, the Crunchy Data +Software is provided for use under the Crunchy Data Developer Program. Unless +otherwise agreed to in writing, the use of Crunchy PostgreSQL for Kubernetes, +including the use of each of the containers included therein, is subject to the +Crunchy Data Developer Program Terms of Use (the "Developer Terms of Use"): + + * https://www.crunchydata.com/developers/terms-of-use + +Crunchy PostgreSQL for Kubernetes constitutes Crunchy Developer Software under +the Crunchy Data Developer Program Terms of Use and its use is not intended to +prohibit the rights under any open source license.