Ad Widget

Collapse

agent2 и postgres

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dedy
    Senior Member
    • Sep 2018
    • 203

    #1

    agent2 и postgres

    Кто-то пробовал настраивать такое сочетание ?
    У меня почемуто не получается, инструкция https://git.zabbix.com/projects/ZBX/...tgresql_agent2



    пользователя создал, права дал, в pg_hba прописал, пробую с прокси заббикс гет делать или с веб заббикса получаю такое ключ pgsql.bgwriter["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]


    zabbix_get -s 192.168.50.3 -k pgsql.bgwriter["tcp://localhost:5432","postgres","pass"]
    ZBX_NOTSUPPORTED: Cannoe Etabilish Connection To Postgres Server: Failed To Connect To `Host=Localhost User=Postgres Database=`: Server Error (FATAL: No Pg_hba.Conf Entry For Host "::1", User "Postgres", Database "Postgres", SSL Off (SQLSTATE 28000)).


    zabbix_get -s 192.168.50.3 -k pgsql.bgwriter["tcp://localhost:5432","zbx_monitor","pass"]
    ZBX_NOTSUPPORTED: Cannoe Etabilish Connection To Postgres Server: Failed To Connect To `Host=Localhost User=Zbx_monitor Database=`: Server Error (FATAL: Database "Zbx_monitor" Does Not Exist (SQLSTATE 3D000)). -тут вообще не понятно чего оно хочет базу под именем Zbx_monitor



    pg_hba

    host all zbx_monitor 127.0.0.1/32 trust
    host all zbx_monitor 0.0.0.0/0 trust
    host all zbx_monitor ::0/0 trust
  • rohithmurthy
    Junior Member
    • Jan 2020
    • 2

    #2
    Hi All,

    I tried with same, but not worked instead of localhost i gave IP address of the server too but not worked as expected.

    Thanks
    Rohith

    Comment

    • crumit
      Junior Member
      • May 2023
      • 1

      #3
      download your version template from https://git.zabbix.com/projects/ZBX/...tgresql_agent2

      open template in notepad++ and replace all items:
      "{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"

      to:
      "{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}","{$P G.DA TABASE}"

      Next you need import modified template to zabbix. It's works for me.​

      Comment

      Working...