Ad Widget

Collapse

Unsupported item key - Website certificate by Zabbix agent 2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mzeman81
    Junior Member
    • Dec 2020
    • 27

    #1

    Unsupported item key - Website certificate by Zabbix agent 2

    Hi,

    please can you help me how to solve "Unsupported item key" in Latest data?

    I imported template "Website certificate by Zabbix agent 2" on Zabbix server put the hostname which I want to monitor valid certificate but I gt this issue.

    Many thanks for help.
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #2
    Have you followed the template instructions and set up your macros correctly?
    Also, check the Server and Agent logs.

    Comment

    • mzeman81
      Junior Member
      • Dec 2020
      • 27

      #3
      Yes, I followed the template instructions.

      If I run command "zabbix_get -s 127.0.0.1 -k web.certificate.get[webiste.com]" then I got error "ZBX_NOTSUPPORTED: Unsupported item key.".
      If I run command "zabbix_get -s 127.0.0.1 -p 10050 -k agent.version" then it works.

      What is the cause of zabbix_get -s 127.0.0.1 -p 10050 -k agent.version ?

      Thanks.

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        What is the detailed version of Zabbix agent you are using?

        Comment

        • mzeman81
          Junior Member
          • Dec 2020
          • 27

          #5
          The version of Zabbix agent is 6.0.6

          Comment

          • Ostad
            Junior Member
            • Jul 2022
            • 10

            #6
            Website certificate by Zabbix agent 2

            You will need to install zabbix agent2 for this template on your zabbix server or any Host, if you already have agent2 on machine.
            https://www.zabbix.com/documentation...oncepts/agent2

            just test with www.google.com

            {$CERT.WEBSITE.HOSTNAME} = www.google.com
            {$CERT.EXPIRY.WARN} = 30
            {$CERT.WEBSITE.PORT} = 443


            run this command on your zabbix server
            HTML Code:
            zabbix_get -s 127.0.0.1 -k web.certificate.get[www.google.com,443,]
            Last edited by Ostad; 22-09-2022, 08:58.

            Comment

            • mzeman81
              Junior Member
              • Dec 2020
              • 27

              #7
              Hi,
              ZBX_NOTSUPPORTED: Unsupported item key.

              I check the version but I am not sure if its version 2 agent.
              Here is result of command:

              zabbix_agentd (daemon) (Zabbix) 6.0.6
              Revision 3f7597e3ea3 27 June 2022, compilation time: Jun 27 2022 08:04:13​
              ​
              I have achieved almost same result with Monitoring SSL Certificate Expiry Using Zabbix - YouTube but I would like to know why this is not working.


              Thanks.​

              Comment

              • Ostad
                Junior Member
                • Jul 2022
                • 10

                #8
                you have zabbix agentd on your machine, so if you want to use Website certificate by Zabbix agent 2, You need to install zabbix agent2 instead of zabbix agent.


                ​

                Comment

                • mzeman81
                  Junior Member
                  • Dec 2020
                  • 27

                  #9
                  OK, do I have to uninstall zabbix agentd or I can leave it together with zabbix agent2 ?

                  Comment

                  • Ostad
                    Junior Member
                    • Jul 2022
                    • 10

                    #10
                    uninstall it, you do not need zabbix agentd if you want to install and configure zabbix agent2.
                    what is the OS of your Machine?

                    Comment

                    • andreamanca
                      Junior Member
                      • Aug 2024
                      • 2

                      #11
                      I fresh install of Zabbix 7.0 and i have installed zabbix-agent2 for do this work but I always get unsupported elements I found out it happens because I am behind a network proxy. How can a network proxy be configured to have openssl make the request correctly?

                      i tried this command:
                      zabbix_get -s 127.0.0.1 -k web.certificate.get[www.google.com]

                      result
                      ZBX_NOTSUPPORTED: Unsupported item key.

                      instead if i run this command:
                      openssl s_client -proxy proxy_ip:8080 -connect google.com:443
                      it worked perfectly

                      so how do I configure proxy_ip to make it check?
                      I need to tell zabbix to pass from proxy when perform check. I do this in web scenario there is a field for proxy and worked perfectly
                      Last edited by andreamanca; 17-10-2024, 17:56.

                      Comment

                      • posvik.jke
                        Junior Member
                        • Jul 2024
                        • 1

                        #12
                        Hi,
                        I have simillar problem.
                        I got errors like this
                        Code:
                        Invalid parameters: parse "https://{HOST.NAME}": invalid character "{" in host name.
                        I think it`s because zabbix want to get only clear url,but i have too much hosts to do this in that way,
                        Maybe someone have some ideas how to do this from macros or etc.

                        Comment

                        • Brambo
                          Senior Member
                          • Jul 2023
                          • 245

                          #13
                          With agent2 you can use this itemkey:
                          web.certificate.get[{$WEBSITE.HOSTNAME},{$WEBSITE.PORT},{$WEBSITE.IP}
                          Where all 3 macro's must be set on the host.
                          For myself i have "rebuild" the template to use agent2 active but i saw release notes of 7.2 that such version is now out of the box.
                          The website.hostname is without https as that protocol is always used for the ssl check.
                          edit:
                          I'm not sure if the last macro (IP) really is needed but we check a lot of internal sites and this way the check has no issue

                          Comment


                          • posvik.jke
                            posvik.jke commented
                            Editing a comment
                            Ty for answer.
                            I think IP macro it`s just an option between ip and dns, so it doesn`t matter.
                            With your itemkey i am still have the same issue. Web cert plugin always put https in the start of key and only solution put URL there.
                        • markfree
                          Senior Member
                          • Apr 2019
                          • 868

                          #14
                          Check out the documentation for the web.certificate.get key parameters.

                          Comment

                          Working...