Skip to content

Crunchy monitoring issue with postgres 18 #4438

@marcello-lodi

Description

@marcello-lodi

Overview

Monitoring a postgrescluster that uses a postgres 18, displays NO DATA.

Environment

  • Platform: k3s
  • Platform Version: v1.34.4+k3s1
  • PGO Image Tag: postgres-operator:ubi9-6.0.0-0
  • Postgres Version 18
  • Storage: local-storage

Steps to Reproduce

REPRO

Create a postgresclusters with postgres version 18:

apiVersion: postgres-operator.crunchydata.com/v1
kind: PostgresCluster
metadata:
  name: hippo18
  annotations:
    postgres-operator.crunchydata.com/autoCreateUserSchema: "true"
spec:
  postgresVersion: 18
  users:
    - name: hippo
      options: 'CREATEDB CREATEROLE'
      databases:
        - hippo
  instances:
    - name: pgha1
      replicas: 2
      dataVolumeClaimSpec:
        storageClassName: pvc-local
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 10Gi
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo18
                  postgres-operator.crunchydata.com/instance-set: pgha1
  backups:
    pgbackrest:
      global:
        repo1-retention-full: "2"
        repo1-retention-full-type: count
      repos:
      - name: repo1
        schedules:
          full: "0 1 * * 0"
          differential: "0 1 * * 1-6"
          incremental: "0/10 * * * 1-6"
        volume:
          volumeClaimSpec:
            storageClassName: pvc-local
            accessModes:
            - "ReadWriteOnce"
            resources:
              requests:
                storage: 10Gi
  proxy:
    pgBouncer:
      replicas: 2
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo18
                  postgres-operator.crunchydata.com/role: pgbouncer

  patroni:
    dynamicConfiguration:
      postgresql:
        parameters:
          shared_preload_libraries: timescaledb

  config:
   parameters:
     max_parallel_workers: 8
     max_worker_processes: 16
     shared_buffers: 1GB

     work_mem: 2MB

  monitoring:
    pgmonitor:
      exporter: {}

  instrumentation: {}

Create a postgrescluster with postgres 17.

apiVersion: postgres-operator.crunchydata.com/v1
kind: PostgresCluster
metadata:
  name: hippo17
  annotations:
    postgres-operator.crunchydata.com/autoCreateUserSchema: "true"
spec:
  postgresVersion: 17
  users:
    - name: hippo
      options: 'CREATEDB CREATEROLE'
      databases:
        - hippo
  instances:
    - name: pgha1
      replicas: 2
      dataVolumeClaimSpec:
        storageClassName: pvc-local
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 10Gi
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo17
                  postgres-operator.crunchydata.com/instance-set: pgha1
  backups:
    pgbackrest:
      global:
        repo1-retention-full: "2"
        repo1-retention-full-type: count
      repos:
      - name: repo1
        schedules:
          full: "0 1 * * 0"
          differential: "0 1 * * 1-6"
          incremental: "0/10 * * * 1-6"
        volume:
          volumeClaimSpec:
            storageClassName: pvc-local
            accessModes:
            - "ReadWriteOnce"
            resources:
              requests:
                storage: 10Gi
  proxy:
    pgBouncer:
      replicas: 2
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 1
            podAffinityTerm:
              topologyKey: kubernetes.io/hostname
              labelSelector:
                matchLabels:
                  postgres-operator.crunchydata.com/cluster: hippo17
                  postgres-operator.crunchydata.com/role: pgbouncer

  patroni:
    dynamicConfiguration:
      postgresql:
        parameters:
          shared_preload_libraries: timescaledb

  config:
   parameters:
     max_parallel_workers: 8
     max_worker_processes: 16
     shared_buffers: 1GB

     work_mem: 2MB

  monitoring:
   pgmonitor:
    exporter: {}

  instrumentation: {}

Deploy the Crunchy monitoring as explained in the documentation:

helm install crunchy oci://registry.developers.crunchydata.com/crunchydata/crunchy-monitoring -n postgres-operator

No error are shown during the deployment.

EXPECTED

I expect to see the statistics from the Grafana Dashboards, relatives to all the PostgresCluster created so far.

ACTUAL

From the Grafana Dashboards, there is no way to see the data from the PostgresCluster (18).
Only the PostgresCluster using postgres 17 is actually showing the statistics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions