Skip to content

feat: add cloudnative-pg-mixin #1469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arikgrahl
Copy link
Contributor

As already described in the README.md:

A monitoring mixin for CloudNativePG, providing Grafana dashboards and Prometheus alerting rules for PostgreSQL clusters running on Kubernetes.

Dashboards

This mixin bundles the Grafana dashboard provided by CloudNativePG.

CloudNativePG Dashboard

Prometheus Alerts

This mixin bundles the sample Prometheus Alert rules provided by CloudNativePG.

  • LongRunningTransaction: A query is taking longer than 5 minutes.
  • BackendsWaiting: If a backend is waiting for longer than 5 minutes
  • PGDatabase: Number of transactions from the frozen XID to the current one
  • PGReplication: The standby is lagging behind the primary
  • LastFailedArchiveTime: Checks the last time archiving failed. Will be < 0 when it has not failed.
  • DatabaseDeadlockConflicts: Checks the number of database conflicts
  • ReplicaFailingReplication: Checks if the replica is failing to replicate

@arikgrahl arikgrahl requested a review from a team as a code owner August 1, 2025 12:37
@arikgrahl arikgrahl marked this pull request as draft August 1, 2025 12:51
@arikgrahl arikgrahl force-pushed the cloudnative-pg-mixin branch from 5052974 to 8bd7aa7 Compare August 5, 2025 13:13
@arikgrahl arikgrahl marked this pull request as ready for review August 5, 2025 13:15
@v-zhuravlev
Copy link
Contributor

Hi! Thanks for contributing. It this a copy cloudnative dashboards and alerts? Would it be more practical to repack their alerts/dashboard as mixin in cloudnative repo instead? So contributors and users can more easily discover it?

@arikgrahl
Copy link
Contributor Author

Generally speaking, this approach makes sense.
I could try submitting a repackaging of the resources as a mixin in the repository, which is where the dashboards and alerts originate.

However, I'm not very optimistic that such a contribution would be accepted, as the repository appears to be limited to Helm charts:

This repository contains the Grafana Dashboards distributed as Helm Charts so they can packaged as a dependency to other projects.

Additionally, I’ve noticed that several mixins within this project have counterparts in their respective upstream repositories.
For example: github.com/ceph/ceph/…/ceph-cluster.json vs. github.com/grafana/jsonnet-libs/…/ceph-cluster.json

For this reason, I thought it might make sense to include the mixins here.
However, there may be subtle differences that I am not currently aware of.

@Dasomeone
Copy link
Member

Hi @arikgrahl
Generally speaking we'd prefer to keep them together just for consistency as changes are made, but as you rightly pointed out that's not always the case, and we can (and will) absolutely accept the contribution if they turn it down!

Let's give it a shot and see what they say, otherwise happy to add it here for everyone. Perhaps even if they turn down the contribution a compromise can be reached with linking between the two?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants