-
Problem report
-
Resolution: Won't fix
-
Trivial
-
None
-
None
-
None
-
None
Hello,
In the Template PostgreSQL by zabbix agent we deployed the template_db_postgresql.conf file on our zabbix agent.
In this file there is an entry for the the pg_isready "ping":
UserParameter=pgsql.ping[*], pg_isready -h "$1" -p "$2"
We saw on it that we only pass 2 parameters the hostname and the postgresql port.
Since our Zabbix agent is running under zabbix user this command is run towards the PostgreSQL server with the user zabbix and it is looking for the database zabbix which doesn't exist. By default it assume that the DB to use is the username.
The test is returning the right information:
localhost:5432 - accepting connections
even if the database doesn't exist, which is nice but since the database doesn't exist the postgresql.log is filled every minutes with: FATAL: database "zabbix" does not exist
The solution is then to change the template_db_postgresql.conf file as follow:
Change the items: Status: Ping
Key: pgsql.ping["\\{$PG.HOST}","\\{$PG.PORT}","\\{$PG.DB}"]
UserParameter=pgsql.ping[*], pg_isready -h "$1" -p "$2" -d "$3"
Can you please include this change in the next template release?