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

Zabbix agent 2 pgsql.custom.query Cannot fetch data: expected 1 arguments, got 6.

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 5.0.22
    • None
    • None
    • CentOS 7

      Steps to reproduce:

      After upgrading Zabbix Agent 2 to 5.0.22 (5.0.22-1.el7)

      item.key: pgsql.custom.query["\{$PG.SESSIONNAME}",,,,"postgresql_db_size",,,,,,"postgres"]

      preprocess:

      script:
      postgresql_db_size.sql
      ##content
      SELECT pg_database_size(datname::text) FROM pg_catalog.pg_database WHERE datistemplate = false AND datname = $1;

      ##

      Item is active agent item.

      NB! if item is passive agent item, then there is no problems.

      Result:
      2022/04/05 15:51:36.001584 [Postgres] Cannot fetch data: expected 1 arguments, got 6.
      2022/04/05 15:51:36.001624 check 'pgsql.custom.query["POSTGRESQL",,,,"postgresql_db_size",,,,,,"postgres"]' is not supported: Cannot fetch data: expected 1 arguments, got 6.
      2022/04/05 15:51:37.001176 [Postgres] Cannot fetch data: expected 1 arguments, got 6.

      Expected:
      Get value in as expected.

            zit Zabbix Integration Team
            taurijaanus Tauri Jaanus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: