Ad Widget

Collapse

Template DB PostgreSQL Agent 2 has 'Unsupported item key' or 'no data'.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • flotsky
    Junior Member
    • Oct 2020
    • 2

    #1

    Template DB PostgreSQL Agent 2 has 'Unsupported item key' or 'no data'.

    Hello.

    Just installed Zabbix server on debian 10.

    Added template "Template DB PostgreSQL Agent 2" to my zabbix server host.

    Used this instruction:
    1. create postgres user
    2. configure pg_hba
    3. link template to host
    4. set server URI, login and password in host macros
    Wait about an hour to get something, but

    Code:
    item "Zabbix server:pgsql.dbstat["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.oldest.xid["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.ping["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.replication.count["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.replication.lag.sec["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.replication.recovery_role["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.replication.status["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.uptime["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.autovacuum.count["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.archive["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.locks["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.bgwriter["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.replication.lag.b["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.connections["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.dbstat.sum["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.cache.hit["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    item "Zabbix server:pgsql.wal.stat["{$PG.URI}","{$PG.USER}","{$PG.PASSWORD}"]" became not supported: Unsupported item key.
    And other items get "no data"

    When i trying zabbix_get parameters with "no_data" i also get "unsupported item key", but default items like "cpu.switches" work.
    Code:
    root@zabbix:~# zabbix_get -s localhost -k pgsql.connections.total
    ZBX_NOTSUPPORTED: Unsupported item key.
    root@zabbix:~# zabbix_get -s localhost -k system.cpu.switches
    11768750
    What am i missing?

    Code:
    root@zabbix:~# zabbix_server --version
    zabbix_server (Zabbix) 5.0.4
    Revision 69c0ad3686 28 September 2020, compilation time: Sep 28 2020 07:00:00
    
    Copyright (C) 2020 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.
    
    This product includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit (http://www.openssl.org/).
    
    Compiled with OpenSSL 1.1.1c 28 May 2019
    Running with OpenSSL 1.1.1d 10 Sep 2019
    root@zabbix:~# zabbix_agentd --version
    zabbix_agentd (daemon) (Zabbix) 5.0.4
    Revision 69c0ad3686 28 September 2020, compilation time: Sep 28 2020 07:00:00
    
    Copyright (C) 2020 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.
    
    This product includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit (http://www.openssl.org/).
    
    Compiled with OpenSSL 1.1.1c 28 May 2019
    Running with OpenSSL 1.1.1d 10 Sep 2019
    root@zabbix:~# cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 10 (buster)"
    NAME="Debian GNU/Linux"
    VERSION_ID="10"
    VERSION="10 (buster)"
    VERSION_CODENAME=buster
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    root@zabbix:~#
  • eithor
    Member
    • May 2020
    • 50

    #2
    I seem to recall that there was an update to not accept user/passwords used in the key.
    For my mysql monitoring I solved it with "sessions", e.g. setting "Plugins.Mysql.Sessions.XXX.User/Password/Uri" etc in agent config and then use the session name instead of the DSN in the macro.
    Should be the same for postgresql. Alternatively you could create a .pgpass file for the zabbix user with the user/pass info.

    Comment

    • flotsky
      Junior Member
      • Oct 2020
      • 2

      #3
      I found out that:
      1. All "no data" items is depended on "not supported" items
      2. Not see any connect tryes to Posqtgresql
      3. Manual connection (# psql -h 127.0.0.1 -Uzbx_monitor -W postgres) works, i see it in sql logs
      I feel like with template Template DB PostgreSQL Agent 2 must be some "agent.d/pgsql.conf", but it says "No specific Zabbix configuration is required"

      Comment

      • mattheusr
        Junior Member
        • Nov 2020
        • 2

        #4
        Originally posted by flotsky
        I found out that:
        1. All "no data" items is depended on "not supported" items
        2. Not see any connect tryes to Posqtgresql
        3. Manual connection (# psql -h 127.0.0.1 -Uzbx_monitor -W postgres) works, i see it in sql logs
        I feel like with template Template DB PostgreSQL Agent 2 must be some "agent.d/pgsql.conf", but it says "No specific Zabbix configuration is required"
        Have you found a solution to this problem? I have the same issue. Followed the exact steps but during discovery, it says unsupported item and does not discover anything. I can also connect to the db locally as you described.

        Comment

        • mattheusr
          Junior Member
          • Nov 2020
          • 2

          #5
          I found my problem, maybe it will help someone else in the future. I was using the wrong agent. I was not running the zabbix_agent2.

          Comment

          • daslaner
            Junior Member
            • Dec 2020
            • 1

            #6
            Are there any solution about 'Unsupported item key'. I encountered the same error too. I installed Zabbix 5.2 server on Centos8 Linux.
            Added template "Template DB PostgreSQL Agent 2" to my zabbix server host. (postgresql DB version is 11)

            Comment

            • nktech1135
              Junior Member
              • May 2020
              • 7

              #7
              For any templates with agent2 in the name you need to install zabbix-agent2 instead of zabbix-agentd on the machine being monitored. more info here https://www.zabbix.com/documentation...oncepts/agent2


              Comment

              • Pedro Ourique
                Junior Member
                • Oct 2021
                • 12

                #8

                I have the same problem...

                Comment

                Working...