-
Problem report
-
Resolution: Fixed
-
Major
-
None
-
5.0.28
-
Linux Centos 7
Steps to reproduce:
- Installed zabbix-agent2 5.0.28 from zabbix repository
- zabbix_agent2.conf has no active parameter related to PostgreSQL
- On zabbix-server, the host is associated to the DB PotgreSQL Agent 2 template
- The host has also the following macros set:
- $PG.HOST = localhost
- $PG.URI = postgresql://localhost:5433
- $PG.USER = zbx_monitor
- $PG.PORT = 5433
Yes, my PostgreSQL is running on the non-default port 5433.
Result:
The discovery rule Database discovery fails with the following error:
Connection failed: failed to connect to `host=localhost user=postgres database=postgres`: dial error (dial tcp 127.0.0.1:5432: connect: connection refused).
The same message shows up on the zabbix-agent log.
Additional Info:
On the zabbix-server console, I can run:
zabbix_get -s XXX.XXX.XXX.XXX -k 'pgsql.db.discovery[postgresql://localhost:5433,zbx_monitor,,postgres]'
This command returns the correct discovery value. The zabbix_get command bellow:
zabbix_get -s 10.1.1.10 -k 'pgsql.db.discovery[]'
Gives me the same error above.
I have other hosts running PostgreSQL and zabbix-agent2 version 5.0.1. On those hosts, the monitoring is working fine.