prometheus-community / prometheus-community/postgres_exporter

update quick start to not use host network

Open
#390 0 comments 0 reactions 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

The quick start uses below example to start pg exporter

# Start an example database
docker run --net=host -it --rm -e POSTGRES_PASSWORD=password postgres
# Connect to it
docker run --net=host -e DATA_SOURCE_NAME="postgresql://postgres:password@localhost:5432/postgres?sslmode=disable" wrouesnel/postgres_exporter

I assume the pg exporter used host network here to avoid using ipaddress in datasource while starting pg exporter.But this is confusing as at a first glance it looks like why does pg exporter need host network.
It would be better to update this with a more clear one or some one might expose host network unintended.

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

Locate the quick-start documentation containing the postgres_exporter Docker commands, then review how the database and exporter containers can connect without host networking. Update the example so its networking intent is clear and host networking is not used unintentionally; done means the documented commands still let the exporter connect to PostgreSQL.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, postgresql
Domain
databases, devops, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.