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

Multi target and 5xx #917

Open
linuxmanju opened this issue Sep 18, 2023 · 1 comment
Open

Multi target and 5xx #917

linuxmanju opened this issue Sep 18, 2023 · 1 comment

Comments

@linuxmanju
Copy link

What did you do?

Configured latest stable release of postgres_exporter, Created an auth module.

auth_modules:
  foo1: # Set this to any name you want
    type: userpass
    userpass:
      username: 'USN'
      password: 'pass@123'
    options:
      # options become key=value parameters of the DSN
      sslmode: disable

Promtheus scrape job

 - job_name: 'postgres-gcp-sd'
    static_configs:
      - targets:
        - 10.180.56.18:5432
          #gce_sd_configs:
          # - project: josh-prod-392409
          # zone: asia-south1-b
          # port: 5432
    metrics_path: /probe
    params:
        auth_module: [foo1]
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 10.180.191.203:6262

What did you expect to see?

Scrape to happen successfully with metrics being available in prometheus.

What did you see instead? Under which circumstances?

server returned HTTP status 500 Internal Server Error

Environment

prod

  • System information:

Linux 5.10.0-23-cloud-amd64 x86_64

  • postgres_exporter version:

    postgres_exporter, version 0.13.2 (branch: HEAD, revision: 8c3604b)
    build user: root@2ea2be721819
    build date: 20230724-00:08:19
    go version: go1.20.6
    platform: linux/amd64
    tags: netgo static_build

  • postgres_exporter flags:

 postgres_exporter  --config.file=/tmp/pg.conf  --log.level=debug --web.listen-address=:6262
  • PostgreSQL version:

14.0

  • Logs:
postgres_exporter  --config.file=/tmp/pg.conf  --log.level=debug --web.listen-address=:6262
ts=2023-09-18T08:12:21.675Z caller=proc.go:250 msg="Excluded databases" databases=[]
ts=2023-09-18T08:12:21.675Z caller=main.go:142 level=warn msg="Failed to create PostgresCollector" err="empty dsn"
ts=2023-09-18T08:12:21.676Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:6262
ts=2023-09-18T08:12:21.676Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:6262


@sysadmind
Copy link
Contributor

The only scenario that should throw a 500 on the /probe endpoint is if we fail to create the collector. In that case, the error should be in the response body. Can you query the probe URL and see what the output is?

I opened #918 to also log this error.

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

No branches or pull requests

2 participants