Ad Widget

Collapse

Problem with Virt VMware Hypervisor ESXi template

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bab
    Senior Member
    • Aug 2020
    • 176

    #1

    Problem with Virt VMware Hypervisor ESXi template

    I am using Virt VMware Hypervisor ESXi - Andre Bello after import template in the zabbix I did follow steps:



    1- added 3 macro

    {$USERNAME} ----> root

    {$PASSWORD} -----> password

    {$URL} -----> https://esxi1.com/sdk

    Also ad host with UUID

    but cannot discovery and show :


    Unknown hypervisor uuid.

    How can I solve this problem?
  • Answer selected by bab at 07-07-2022, 17:50.
    Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    This is a long shot but can you try with the UUID in lower case?

    In my case the same discovery key vmware.hv.datastore.discovery works and I have the UUID in lower case.

    I see the esxcfg-info command returns the same UUID as the vim-cmd does but it's upper case, vim-cmd returns it in lower case.

    Markku

    Comment

    • Markku
      Senior Member
      Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
      • Sep 2018
      • 1782

      #2
      Let's see that template, and take one item from it to see how it works:
      name: 'Cluster name'
      type: SIMPLE
      key: 'vmware.hv.cluster.name[{$URL},{HOST.HOST}]'
      delay: '600'
      trends: '0'
      value_type: CHAR
      username: '{$USERNAME}'
      password: '{$PASSWORD}'
      description: 'Cluster name of the guest VM.'
      So, it uses the ESXi URL and the Zabbix host name as parameters to vmware.hv.cluster.name. NOW, the documentation for it (https://www.zabbix.com/documentation...ks/vmware_keys) says the second parameter should be the UUID, actually it says "uuid - VMware hypervisor host name", which doesn't make any sense.

      IMO there is just something wrong with the template.

      What I have done in my ESXi template is I have defined the {$UUID} macro and used it instead of {HOST.HOST} in the items.

      UUID = get from the host with "vim-cmd hostsvc/hostsummary | grep uuid" (my own memo, hope it works)

      Markku

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1782

        #3
        (Alternatively, if you rename the ESXi host in Zabbix to use the UUID of the ESXi host, that should work as well.)

        Comment

        • bab
          Senior Member
          • Aug 2020
          • 176

          #4
          Originally posted by Markku
          (Alternatively, if you rename the ESXi host in Zabbix to use the UUID of the ESXi host, that should work as well.)
          According to attached pic I did above solution but another it shows that error (I attached all info)

          Attached Files

          Comment

          • Markku
            Senior Member
            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
            • Sep 2018
            • 1782

            #5
            The discovery interval is one day. Did you Unlink and clear the template from the host and then add it again? (= is the error new or old)

            Markku

            Comment

            • bab
              Senior Member
              • Aug 2020
              • 176

              #6
              Originally posted by Markku
              The discovery interval is one day. Did you Unlink and clear the template from the host and then add it again? (= is the error new or old)

              Markku
              Yes . Unlink that template from host and another attach it and then execute discovery manually . The error is old (Unnown hypervision uuid) I got my esxi uuid with follow command :
              esxcfg-info -u

              Comment

              • Markku
                Senior Member
                Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                • Sep 2018
                • 1782

                #7
                This is a long shot but can you try with the UUID in lower case?

                In my case the same discovery key vmware.hv.datastore.discovery works and I have the UUID in lower case.

                I see the esxcfg-info command returns the same UUID as the vim-cmd does but it's upper case, vim-cmd returns it in lower case.

                Markku

                Comment

                • bab
                  Senior Member
                  • Aug 2020
                  • 176

                  #8
                  Originally posted by Markku
                  This is a long shot but can you try with the UUID in lower case?

                  In my case the same discovery key vmware.hv.datastore.discovery works and I have the UUID in lower case.

                  I see the esxcfg-info command returns the same UUID as the vim-cmd does but it's upper case, vim-cmd returns it in lower case.

                  Markku
                  Thanks . It solved with lower case . Just one question
                  in latest data it cannot show datastore name and show "Average write latency of the datastore $3" actually for all of datastorename use $3
                  Last edited by bab; 05-07-2022, 21:54.

                  Comment

                  • Markku
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                    • Sep 2018
                    • 1782

                    #9
                    Originally posted by bab

                    Is that your mean my uuid is not correct ?I used this command to get uuid ;

                    vim-cmd hostsvc/hosthardware | grep uuid
                    uuid = "38393638-3435-4e43-3738-333930335939",
                    That's lower case, yes, but in your screenshot you have it in upper case.

                    Markku

                    Comment

                    • bab
                      Senior Member
                      • Aug 2020
                      • 176

                      #10
                      Originally posted by Markku

                      That's lower case, yes, but in your screenshot you have it in upper case.

                      Markku
                      Thanks . It solved with lower case . Just one question
                      in latest data it cannot show datastore name and show "Average write latency of the datastore $3" actually for all of datastorename use $3 . when I click on it ,shows correct datastore name in the key but it returns parameters in the Name field (please see attach pic)
                      Attached Files

                      Comment

                      • Markku
                        Senior Member
                        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                        • Sep 2018
                        • 1782

                        #11


                        You need to manually replace $3 with LUN-DR-Normal-1.

                        Markku

                        Comment

                        • bab
                          Senior Member
                          • Aug 2020
                          • 176

                          #12
                          Originally posted by Markku
                          https://www.zabbix.com/documentation...nger-supported

                          You need to manually replace $3 with LUN-DR-Normal-1.

                          Markku

                          I have many datastore and there are many items about datastore on this template such as datastore latency , datastore total space , datastore free space , ...

                          It shows all parameters for datastore$3 for example it show about 15 Datastore Free $3 , it shows about 15 Average write latency of the datastore $3 . How can define datastore name instead of $3 ?

                          Comment

                          • Markku
                            Senior Member
                            Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
                            • Sep 2018
                            • 1782

                            #13
                            See the item prototype and reconfigure it there.

                            Markku

                            Comment

                            • bab
                              Senior Member
                              • Aug 2020
                              • 176

                              #14
                              Originally posted by Markku
                              See the item prototype and reconfigure it there.

                              Markku
                              This is my item prototype name : Average write latency of the datastore $3
                              This is key : vmware.hv.datastore.write[{$URL},{HOST.HOST},{#DATASTORE},latency]

                              Do I have to use $DATASTORE instead of $3 ?

                              Comment


                              • Hamardaban
                                Hamardaban commented
                                Editing a comment
                                {#DATASTORE} , not {$DATASTORE}
                            Working...