Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22868

zabbix-agent2 upgrade breaks postgresql plugin monitoring

XMLWordPrintable

    • Sprint 101 (Jun 2023)
    • 1

      Starting scenario:

      • postgresql instance on debian10
      • zabbix-agent2 1:6.0.17-1+debian11 with same version psql plugin installed
      • created zbx_monitor role on pgsql db with proper permissions
      • configured {$PG.PASSWORD} e {$PG.USER} on zabbix server (v.1:6.0.13-1+debian11) accordingly to previous point
      • no configuration done in /etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf
      • everything working fine...

      Steps to reproduce:

      1. upgrade zabbix-agent2 (and its plugins) from 1:6.0.17-1+debian11 to 1:6.0.18-1+debian11 with usual apt upgrade command

      Result:

      It seems monitoring user is not taken from macros anymore... it fails back to default zabbix user and it fails authentication

      Console output:
      {{}}

      Setting up zabbix-agent2-plugin-postgresql (6.0.18-1+debian11) ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf ...
      Setting up zabbix-agent2-plugin-mongodb (6.0.18-1+debian11) ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf ...
      Setting up zabbix-agent2 (1:6.0.18-1+debian11) ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/ceph.conf ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/memcached.conf ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/mysql.conf ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/oracle.conf ...
      Installing new version of config file /etc/zabbix/zabbix_agent2.d/plugins.d/redis.conf ...

       

      Postgresql log

       

      2023-05-30 10:20:33.722 UTC [17672] zabbix@user=zbx_monitor FATAL:  password authentication failed for user "zabbix"
      2023-05-30 10:20:33.722 UTC [17672] zabbix@user=zbx_monitor DETAIL:  Role "zabbix" does not exist.
              Connection matched pg_hba.conf line 92: "host    all             all             127.0.0.1/32            md5"
      [... keeps repeating ...]
       
      zabbix-agent2 log
      2023/05/30 12:20:31.382440 Zabbix Agent 2 stopped. (6.0.17)
      2023/05/30 12:20:31.473446 Starting Zabbix Agent 2 (6.0.18)
      2023/05/30 12:20:31.474151 OpenSSL library (OpenSSL 1.1.1n  15 Mar 2022) initialized
      2023/05/30 12:20:31.474233 using configuration file: /etc/zabbix/zabbix_agent2.custom.conf
      2023/05/30 12:20:31.474349 using plugin 'Agent' (built-in) providing following interfaces: exporter
      [...]
      2023/05/30 12:20:31.476317 using plugin 'Modbus' (built-in) providing following interfaces: exporter, configurator
      2023/05/30 12:20:31.476338 using plugin 'MongoDB' (/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb) providing following interfaces: exporter, runner, configurator
      2023/05/30 12:20:31.476352 using plugin 'Mysql' (built-in) providing following interfaces: exporter, runner, configurator
      2023/05/30 12:20:31.476363 using plugin 'NetIf' (built-in) providing following interfaces: exporter
      2023/05/30 12:20:31.476372 using plugin 'Oracle' (built-in) providing following interfaces: exporter, runner, configurator
      2023/05/30 12:20:31.476389 using plugin 'PostgreSQL' (/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql) providing following interfaces: exporter, runner, configurator
      [...]
      2023/05/30 12:20:31.476601 using plugin 'ZabbixStats' (built-in) providing following interfaces: exporter, configurator
      2023/05/30 12:20:31.476608 lowering the plugin ZabbixSync capacity to 1 as the configured capacity 100 exceeds limits
      2023/05/30 12:20:31.476615 using plugin 'ZabbixSync' (built-in) providing following interfaces: exporter
      2023/05/30 12:20:31.478990 Plugin communication protocol version is 6.0.13
      2023/05/30 12:20:32.020985 Zabbix Agent2 hostname: [node004.xxxxxxxxx.net]
      2023/05/30 12:20:33.722582 [PostgreSQL] Connection failed: failed to connect to `host=localhost user=zabbix database=user=zbx_monitor`: server error (FATAL: password authentication failed for user "zabbix" (SQLSTATE 28P01)).
      [... last line keeps repeating ...]
      

       

      Expected:
      No change.

        1. ZBX-22868.log
          4 kB
          Sandro Bordacchini

            esneiders Eriks Sneiders
            sandro1976 Sandro Bordacchini
            Team INT
            Votes:
            30 Vote for this issue
            Watchers:
            43 Start watching this issue

              Created:
              Updated:
              Resolved: