PostgreSQL Docker Container Monitoring

Hi,

Is it possible to monitor PostgreSQL running within a Docker container.

I keep on getting following error,
[Error]: The provided database name is not accessible with the provided username and password and port.

When trying to connect on localhost:5432
Following is Docker Compose config:
postgres:
image: postgres
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: xxxxxx
volumes:
- postgresdb:/var/lib/postgresql/data

Manual install status check shows no error but I do not see any data on portal
level=info msg=“Integration health check finished with success” instance=postgres integration=com.newrelic.p

Thank You.

Hi, @karkar_jay: Try using 127.0.0.1 instead of localhost (including when you add the user to the database).

Thanks Phil,

I did that before posting here. It didn’t help either.

Postgres Hostname (default: localhost): 127.0.0.1
Postgres Port (default: 5432): 5432
Postgres Username: newrelic
Postgres Password:
Postgres Database (default: postgres): postgres

[Error]: The provided database name is not accessible with the provided username and password and port.

Hi @karkar_jay

did you ever solve this?

('cause I’m stuck in that same s***) :smiley:

I tried - in a separate console - to entering into one of the databases with

  1. dokku postgres:enter hermes_staging and then at that prompt do
  2. psql -U postgres and then at that prompt do
  3. the SQL commands volunteered by the postgres-open-source-integration script and then
  4. let the script have that same info

but to no avail I’m afraid

I’m also using postgresql in a container with docker compose. How can I install the integration?