Janusz

Results 33 comments of Janusz

It should not matter. It gave me a clue, so I added to each command user parameter: `-u postgres`. Unfortunatelly result is the same > NRPE: Unable to read output...

`-h` is option for help `-H` is for host, but no host is resolved to UNIX Socket and is equivalent to `psql` without host. I don't want to open access...

yes, just tried it again and it works. I mean direct execution of check_postgres action as nrpe user does work ``` # sudo -u nrpe -- /usr/lib64/nagios/plugins/check_postgres_connection --db=postgres POSTGRES_CONNECTION OK:...

My `pg_hba.conf` line allows any local user to access any db user. It is bit risky but not that much. I'm afraid user nrpe on Postgres will need to have...

I thought SELinux was a good clue, so I've checked files contexts in `/usr/lib64/nagios/plugins`. Plugins installed with yum had context system_u:object_r:nagios_unconfined_plugin_exec_t:s0 where check_postgres.pl and it's symlinks had context `unconfined_u:object_r:lib_t:s0`. Unfortunatelly...

I'm back on it after weekend. Unfortunatelly I've found nothing related to nrpe, nagios or postgres in `/var/log/audit/audit.log`.

I don't use sudo for NRPE execution. I've used sudo for debugging check_postgres if it would run properly under user nrpe permissions. NRPE process runs as nrpe user. I've found...

About first hint I've enabled logging connections and disconnections in postgresql. I got effective connection when running `check_postgres.pl --action connection` directly but not when trying to run it over NRPE....

I'm not keen to do so, but tried switching selinux on DB machine into permissive mode ``` # sestatus SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded...

Long story short I'm kind of an idiot. So somewhere along way SELinux was a problem due to invalid file context. Whatever I've done I couldn't keep proper file context...