Skip to content
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

[postgres-exporter] Lack of server label - Multi-Target Support #3714

Open
rafal-skurka opened this issue Aug 23, 2023 · 4 comments
Open

[postgres-exporter] Lack of server label - Multi-Target Support #3714

rafal-skurka opened this issue Aug 23, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@rafal-skurka
Copy link

rafal-skurka commented Aug 23, 2023

Describe the bug a clear and concise description of what the bug is.

I have a problem with lack of "server" label in multi-target. Some of the metrics have this label but not all, it's quite problematic because we can't distinguish database servers. I have reported this issue on postgres_exporter repository but they reply it's an issue on Prometheus relabeling, not in the postgres exporter application - prometheus-community/postgres_exporter#888

Could you help how to configure this relabeling to obtain "server" label on all metrics?

What's your helm version?

3.8.2

What's your kubectl version?

1.27

Which chart?

prometheus-postgres-exporter

What's the chart version?

5.0.0

What happened?

No response

What you expected to happen?

All metrics will have "server" label

How to reproduce it?

For example this metrics doesn't have "server" label:
pg_database_size_bytes

This example have "server" label:
pg_settings_autovacuum

Enter the changed values of values.yaml?

  config:
    extraArgs: [ "--collector.stat_statements" ]
    datasourceSecret:
      name: postgres-exporter-datasources
      key: datasources

  serviceMonitor:
    enabled: true
    labels:
      monitoring: "prometheus"
    relabelings:
      - sourceLabels: [ __address__ ]
        targetLabel: __param_target
      - sourceLabels: [ __param_target ]
        targetLabel: instance
      - targetLabel: __address__
        replacement: prometheus-postgres-exporter:80

Enter the command that you execute and failing/misfunctioning.

helm install postgres-exporter prometheus-community/prometheus-postgres-exporter -f postgres-values.yaml --namespace monitoring

Anything else we need to know?

No response

@rafal-skurka rafal-skurka added the bug Something isn't working label Aug 23, 2023
@rafal-skurka
Copy link
Author

bump

1 similar comment
@rafal-skurka
Copy link
Author

bump

@KulykDmytro
Copy link

KulykDmytro commented May 8, 2024

Hi
at 0.15 running for of RDS instance (in kubernetes) we observing following behaviour.
On default settings + queries.yaml
These collectors provides server label, other not:

  • all metrics passed over queries.yaml
  • pg_settings
  • pg_stat_activity
  • pg_stat_archiver
  • pg_stat_database (only for conflicts_confl section)
  • pg_static

@KulykDmytro
Copy link

KulykDmytro commented May 8, 2024

created issue in app repo - suppose this one is about collector issue not chart itself
prometheus-community/postgres_exporter#1030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants