check_postgres
check_postgres copied to clipboard
--dbpass can't contain a comma
The password will be cut where the comma is. Still looking for a way to escape it.
Thanks
Hi @couilllard45682, I assume at the very least you should be able to use a .pgpass file to provide any password. Otherwise I think we'd have to change the logic to look for an escaped comma in the general arg split functionality.
It's running in a Cygwin enviroment with 'noacl' disk flag. So I can't chmod 600 on the .pgpass file and pg won't use it. :-(
I really think the logic changes are required. Passwords can contain comma.
I am running this on Icinga and found that due to the checks running as user icinga, and the postgres server being remote, placing a .pgpass in /home/icinga is not read. What determines where the .pgpass file is read?
Hi @mdeguzis — the .pgpass would be for the user which is running the script in question; basically at the time of the DBI->connect() call. If the icinga daemon is running the command remotely (say), it would have to be stored on the server where the script is actually running.
Am 19. Februar 2018 16:46:06 MEZ schrieb David Christensen [email protected]:
Hi @mdeguzis — the
.pgpasswould be for the user which is running the script in question; basically at the time of theDBI->connect()call. If the icinga daemon is running the command remotely (say), it would have to be stored on the server where the script is actually running.-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/bucardo/check_postgres/issues/133#issuecomment-366730774
Iirc the file would be silently ignored if it had the wrong permissions.