I've added configuration file support so that users can more easily update the postgres script on their local systems without worrying about whether doing so will overwrite any custom settings (such as the DBuser). The configuration file is completely optional for backwards-compatibility.
I've also added the ability to specify the hostname for check_postgres.pl to connect to, since connecting to the Unix socket in my case results in authentication failures (the .pgpass file is completely ignored). Specifying the hostname as "localhost" rectifies this issue. The default of connecting to the Unix socket is not changed, however.
I've added configuration file support so that users can more easily update the postgres script on their local systems without worrying about whether doing so will overwrite any custom settings (such as the DBuser). The configuration file is completely optional for backwards-compatibility.
I've also added the ability to specify the hostname for check_postgres.pl to connect to, since connecting to the Unix socket in my case results in authentication failures (the .pgpass file is completely ignored). Specifying the hostname as "localhost" rectifies this issue. The default of connecting to the Unix socket is not changed, however.
Documentation update PR submitted here: https://github.com/librenms/librenms/pull/14627