Skip to content

Update mixin to latest changes from grafana/postgres_exporter #1179

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

cristiangreco
Copy link
Contributor

Copy link

@gaantunes gaantunes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems correct to me, will let @v-zhuravlev take a peek as he is much fresher with our latest mixin standards.

Copy link

@v-zhuravlev v-zhuravlev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1,5 +1,5 @@
{
grafanaDashboards+:: {
'postgres-overview.json': (import 'postgres-overview.json'),
'postgresql-overview.json': (import 'postgresql-overview.json'),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might cause some issues to existing users, best if we keep it as is if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the above, I can keep the dashboard name unchanged but consider that this is what we use in cloud-onboarding: it means that when we import the mixin from this repo, we'll need to change the dashboard name there.

Copy link

@v-zhuravlev v-zhuravlev Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can be changed there

@sysadmind
Copy link
Contributor

sysadmind commented Jul 15, 2025

Looks like the DCO will need to be cleaned up. What is the plan with the Grafana fork? Is it intended to be a long term fork or are there other Grafana specific reasons for it? This PR shows intent to upstream some changes so I'm just curious.

We don't necessarily have mixin standards in this project so I'm open to suggestions, however I did start to refactor the mixin in #911

@cristiangreco
Copy link
Contributor Author

Looks like the DCO will need to be cleaned up. What is the plan with the Grafana fork? Is it intended to be a long term fork or are there other Grafana specific reasons for it? This PR shows intent to upstream some changes so I'm just curious.

We don't necessarily have mixin standards in this project so I'm open to suggestions, however I did start to refactor the mixin in #911

Hi Joe!

I will squash commits (if @gaantunes and @v-zhuravlev are fine with that) and fix the DCO once the changes are in a good shape, if that's ok. We'd ideally avoid keeping the fork around, but we need some changes to embed it into Alloy. My intention is to start submitting some of the changes here so we can narrow the gap and at least make the fork easier to maintain.

What is your plan with #911? I'm wondering if any improvement there can be applied on top of the changes we have here?

@sysadmind
Copy link
Contributor

I'm not set on #911 but I do want to make the mixin easier to maintain. I think that splitting queries, dashboards, alerts, and other types into separate files is helpful in that regard.

@cristiangreco
Copy link
Contributor Author

I'm not set on #911 but I do want to make the mixin easier to maintain. I think that splitting queries, dashboards, alerts, and other types into separate files is helpful in that regard.

Would you still be ok with getting this change in, then building on top of it?

Porting a bunch of PRs accumulated over time in grafana/postgres_exporter:

- grafana#11 (@v-zhuravlev)
- grafana#12 (@gaantunes)
- grafana#13 (@gaantunes)
- grafana#14 (@gaantunes)
- grafana#15 (@gaantunes)
- grafana#16 (@gaantunes)
- grafana#17 (@gaantunes)
- grafana#20 (@gaantunes)
- grafana#21 (@mshahzeb)
- grafana#22 (@mshahzeb)

Signed-off-by: Cristian Greco <cristian@regolo.cc>
@cristiangreco cristiangreco force-pushed the cristian/update-mixin branch from 8023132 to e3c548d Compare July 17, 2025 20:04
@cristiangreco cristiangreco marked this pull request as ready for review July 17, 2025 20:08
@cristiangreco
Copy link
Contributor Author

Applied changes as per comments above, squashed commits, signed DCO, marked as ready for review.

@v-zhuravlev @gaantunes would be good to have your stamp as well as original authors

@@ -1,5 +1,9 @@
{
_config+:: {
postgresExporterSelector: '',
dbNameFilter: 'datname!~"template.*"',
postgresExporterSelector: 'job="integrations/postgres_exporter"',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meaningful for the community? This smells like a Grafana specific selector based on the integrations prefix.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this should be renamed based on the dashboards/dashboards.libsonnet file.

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.

4 participants