prometheus-community / prometheus-community/postgres_exporter

Info log level too noisy in multitarget mode

Open
#981 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3.6k
Forks
835
Avg merge
2d 4h
Merged PRs (30d)
10

Description

What did you do?

I've set up Postgres Exporter to run in multitarget mode with a pgpass file for authentication

What did you expect to see?

Log messages at start time but not for every scrape

What did you see instead? Under which circumstances?

Three info log messages on every scrape

Environment

  • System information:

    Linux 5.10.198-187.748.amzn2.aarch64 aarch64

  • postgres_exporter version:

postgres_exporter, version 0.15.0 (branch: HEAD, revision: 68c176b8833b7580bf847cecf60f8e0ad5923f9a)
  build user:       root@7c5a76bc737a
  build date:       20231027-14:38:04
  go version:       go1.21.3
  platform:         linux/arm64
  tags:             unknown
  • postgres_exporter flags:
    Args:
      --config.file=/etc/postgres_exporter.yml
      --web.listen-address=:9187
      --no-collector.database
      --no-collector.wal
    Environment:
      DATA_SOURCE_USER:  foo
      PGPASSFILE:        /postgres/.pgpass
  • PostgreSQL version:

    13.12.0

  • Logs:

postgres-exporter-64449bfc56-vcng4 prometheus-postgres-exporter ts=2023-12-05T18:23:18.938Z caller=probe.go:41 level=info msg="no auth_module specified, using default"
postgres-exporter-64449bfc56-vcng4 prometheus-postgres-exporter ts=2023-12-05T18:23:18.938Z caller=server.go:74 level=info msg="Established new database connection" fingerprint=foo.rds.amazonaws.com:5432
postgres-exporter-64449bfc56-vcng4 prometheus-postgres-exporter ts=2023-12-05T18:23:18.970Z caller=postgres_exporter.go:613 level=info msg="Semantic version changed" server=foo.rds.amazonaws.com:5432 from=0.0.0 to=13.12.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the repeated log messages in probe.go, server.go, and postgres_exporter.go while reproducing a multitarget scrape with the reported pgpass configuration. Done means startup information remains visible but the three info messages are not emitted on every scrape.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.