fix postgres check to work when postgres is running in docker container
With the current state of mk_postgres.py, we had warnings in checkmk that the database could not be found due it running in a docker container. As a workaround we had to add the host environment variable "PGHOST=127.0.0.1".
The proposed changes make it possible to add the PGHOST variable directly to the .env file that is parsed by the script and not having to set the environment variable globally anymore. It works similar to how the variables pg_version or pg_host get parsed and given over to the psql command as additional arguments: pg_host is set in the code with the "-h" flag, like e.g. pg_port is set with the "-p" flag.
These changes are only implemented and tested for Linux.
This PR is stale because it has been open for 14 days with no activity and the Github Actions are not passing.
This PR is stale because it has been open for 14 days with no activity and the Github Actions are not passing.
This PR was closed because it has been inactive for 14 days since being marked as stale.