psql: fe_sendauth: no password supplied

2018-09-30 Thread Daulat Ram
Hi team,

I need your help to resolve an issue psql: fe_sendauth: no password supplied 
which we are getting by nagios plugin , we are trying to monitor the disk space 
and via  .pgpass for an authentication.

[root@viicinga-02 ~]# 
/mnt/common/local/linux/local/bin/check_postgres/check_postgres_disk_space.sh 
-H vikbcn-db2.vpc.prod.scl1.us.tribalfusion.net -f 
/var/spool/icinga/.pgpass_stby -w '60' -c '70'
Connection to vikbcn-db2.vpc.prod.scl1.us.tribalfusion.net 5432 port 
[tcp/postgres] succeeded!
psql: fe_sendauth: no password supplied

Regards,
Daulat



Re: psql: fe_sendauth: no password supplied

2018-09-30 Thread Justin Pryzby
It's a question better directed to the -general list.

You'll either want to specify the DB name and DB user in check_postgres
invocation, or otherwise add an entry to pg_hba.conf, like:
hostts  nagios  192.168.122.1/32trust

https://bucardo.org/check_postgres/check_postgres.pl.html#database_connection_options

On Sun, Sep 30, 2018 at 6:37 PM Daulat Ram 
wrote:

> Hi team,
>
>
>
> I need your help to resolve an issue psql: fe_sendauth: no password
> supplied which we are getting by nagios plugin , we are trying to monitor
> the disk space and via  .pgpass for an authentication.
>
>
>
> [root@viicinga-02 ~]#
> /mnt/common/local/linux/local/bin/check_postgres/check_postgres_disk_space.sh
> -H vikbcn-db2.vpc.prod.scl1.us.tribalfusion.net -f 
> /var/spool/icinga/.pgpass_stby
> -w '60' -c '70'
> Connection to vikbcn-db2.vpc.prod.scl1.us.tribalfusion.net 5432
> port [tcp/postgres] succeeded!
> psql: fe_sendauth: no password supplied
>
>
>
> Regards,
>
> Daulat
>
>
>