Re: Monitor Postgres database status on Docker

From: Olivier Gautherot <ogautherot(at)gautherot(dot)net>
To: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
Cc: Fan Liu <fan(dot)liu(at)ericsson(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Monitor Postgres database status on Docker
Date: 2019-09-27 12:36:13
Message-ID: CAJ7S9TVupf_8nuRdHk3KM4fTJX-_XVwU--qpNMPKgf-mK9U1+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

Hi Daulat,

El mar., 24 de septiembre de 2019 07:05, Daulat Ram <
Daulat(dot)Ram(at)exponential(dot)com> escribió:

> Thanks but how we can use it for docker container.
>

You have basically 2 ways:

1) Publish the port 5432 on the container and access it from the host, or

2) Use "docker exec" to run the commands natively inside the container.

> Regards,
>
> Daulat
>
>
>
> *From:* Fan Liu <fan(dot)liu(at)ericsson(dot)com>
> *Sent:* Tuesday, September 24, 2019 3:02 PM
> *To:* Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>;
> pgsql-general(at)lists(dot)postgresql(dot)org
> *Subject:* RE: Monitor Postgres database status on Docker
>
>
>
> Hi,
>
>
>
> I am not from PostgreSQL team.
>
> Just let you know that when we run PostgreSQL in Kubernetes, we use below
> command for liveness check.
>
>
>
> pg_isready --host localhost -p $PG_PORT -U $PATRONI_SUPERUSER_USERNAME
>
>
>
>
>
> BRs,
>
> Fan Liu
>
>
>
>
>
> *From:* Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
> *Sent:* Tuesday, September 24, 2019 5:18 PM
> *To:* pgsql-general(at)lists(dot)postgresql(dot)org
> *Subject:* Monitor Postgres database status on Docker
>
>
>
> Hi team,
>
>
>
> We want to check the postgres database status on docker container just
> like we monitor Postgres (up / down) via /etc/init.d/postgresql status
>
>
>
> But I am not sure how we can do that with docker.
>
>
>
> Thanks,
>
> Daulat
>
>
>
>
>
>
>
>
>
>
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2019-09-27 12:36:58 Re: pgq is one of the most underrated pg related stuff
Previous Message Daniel Verite 2019-09-27 11:34:30 Re: "Failed to connect to Postgres database"

Browse pgsql-performance by date

  From Date Subject
Next Message Edilmar Alves 2019-09-27 14:25:24 Re: Slow pg_publication_tables with many schemas and tables
Previous Message Vik Fearing 2019-09-27 10:41:05 Re: Analyze on slave promoted.