lesovsky / zabbix-extensions

Zabbix additional monitoring modules
BSD 3-Clause "New" or "Revised" License
316 stars 230 forks source link

Error agent info #87

Open Dozentz opened 2 years ago

Dozentz commented 2 years ago

PostgreSQL 13 Zabbix 5.4

database zabbixdb user zbx_monitor

pointed out in pg_hba.conf host zabbixdb zbx_monitor 127.0.0.1/32 trust

Agent info Preprocessing failed for: Password zbx_monitor: .psql: error: fe_sendauth: no password supplied

  1. Failed: cannot extract value from json by path "$.deadlocks": cannot parse as a valid JSON object: invalid object format, expected opening character '{' or '[' at: 'password zbx_monitor: psql: error: fe_sendauth: no password supplied'

When entering a command, it asks for a password sudo -u zabbix psql -h 127.0.0.1 -p 5432 -U zbx_monitor -d zabbixdb -l

stephankn commented 2 years ago

you have to check your PostgreSQL setup to enable access for the agent. Please confirm that you are using IPv4 for connection. It might be that you are using a domain socket or IPv6 instead, so your setting won't work. Check postgres logs for further details. So either configure access without password prompt or provide a password.

Dozentz commented 2 years ago

Everything worked, thanks. The error was in the pg_hba.conf file, I indicated at the very end, which contradicts all the rules. Tell me where to put the .pgpass file for alternative authorization. And also tell me the output key the size of the base