Ad Widget

Collapse

Zabbix agent2 and PostgreSQL plugin: Connection fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dewald V
    Junior Member
    • Dec 2022
    • 1

    #1

    Zabbix agent2 and PostgreSQL plugin: Connection fails

    Hi there

    Can someone please give some advice..

    Since upgrading from Zabbix 6.0.3 to 6.0.11, we were having problems with the agent2 monitoring of the Zabbix Postgres database.

    The error log keeps returning the following line:
    [PostgreSQL] Connection failed: failed to connect to `host=localhost user=zxxxxxx database=pxxxxxx`: hostname resolving error (lookup localhost: no such host).

    I can ping localhost on the database server itself. I also tried changing the {$PG.URI} macro setting to the db server hostname, but still the same.

    The agent2.conf is configured to point to the plugin binary
    The agent2 conf has Includes set for the plugin conf.

    The current frontend macro is set like this:
    {$PG.URI} - tcp://localhost:5432

    {$PG.USER} and {$PG.PASSWORD} is also set.

    Anything else I'm missing?

    ​Thanks,
    Dewald
Working...