Code Monkey home page Code Monkey logo

Comments (3)

gbartolini avatar gbartolini commented on May 23, 2024

This is missing. Consider that at the moment our "replica cluster" story is not yet complete. In this specific case, we should monitor if the WAL receiver is up. Our recommendation is to always use the WAL archive as a fallback mechanism.

"Cluster is healthy" is referred to the local replica cluster. It means that all replicas are up and so the designated primary.

from cloudnative-pg.

gbartolini avatar gbartolini commented on May 23, 2024

I checked and we already monitor this: https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-WAL-RECEIVER-VIEW

Look at the pg_replication metric in the Prometheus exporter.

See: https://github.com/cloudnative-pg/cloudnative-pg/blob/main/config/manager/default-monitoring.yaml#L109

from cloudnative-pg.

cdtzabra avatar cdtzabra commented on May 23, 2024

Hi @gbartolini

Thanks for your feedback

I looked at the content of the "pg_stat_wal_receiver" view and I have the impression that the data in pg_stat_wal_receiver only concerns the primary pod and the replica pods within the same cluster.

I've checked the primary and replica clusters, both of which only contain data for their replica pods. The hosts correspond only to their replica pods.

So I'm afraid the pg_replication metric is only valid within the same cluster.
cnpg_pg_replication_streaming_replicas value (2) matchs only the clusters replica pods
And only replica pods name and addr are present in metrics labels .... no information to Replica cluster and its pods

I'll also have a look at wal archiving

from cloudnative-pg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.