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

Problem with vmware.vm.property / vmware.dvswitch.fetchports.get

XMLWordPrintable

    • S24-W36/37
    • 0.4

      We have VMware monitoring, specifically more custom queries, such as for custom properties (e.g., "vmware.vm.property[\{$VMWARE.URL},\{$VMWARE.VM.UUID},config.version]" - the VM hardware version) or VLAN information on a specific port (we retrieve the port ID information on a distributed switch and then fetch detailed information using the key "vmware.dvswitch.fetchports.get[{$VMWARE.URL},{#IFDVSWITCH.UUID},"inside
      ,portKey:{#IFDVSWITCH.PORT}",state]"). During testing (particularly checking JSON content using the "Execute now" button), the values were correctly collected, and everything worked as expected. For the purposes of this ticket, here's part of the log from such tests:

       

       30192:20240814:143150.347 In zbx_vmware_service_get_cust_query() type:VmwareDistributedVirtualSwitch id:dvs-51 query_type:1 key:inside:true,portKey:350
       30192:20240814:143150.347 End of zbx_vmware_service_get_cust_query() cust_query:0x7f00cbad5b78
       30192:20240814:143150.347 End of check_vcenter_dvswitch_fetchports_get():SYSINFO_SUCCEED

       

      However, we noticed that the keys "vmware.vm.property" and "vmware.dvswitch.fetchports.get" do not refresh after being added in Zabbix as "production." We then checked the logs and observed the following:

      30190:20240814:143801.506 In zbx_vmware_service_get_cust_query() type:VmwareDistributedVirtualSwitch id:dvs-51 query_type:1 key:inside:true,portKey:72
      30190:20240814:143801.506 End of zbx_vmware_service_get_cust_query() cust_query:(nil)
      30190:20240814:143801.506 In zbx_vmware_service_add_cust_query() soap_type:VmwareDistributedVirtualSwitch id:dvs-51 query_type:1 key:inside:true,portKey:72
      30190:20240814:143801.506 End of zbx_vmware_service_add_cust_query():FAIL
      30190:20240814:143801.506 End of check_vcenter_dvswitch_fetchports_get():SYSINFO_SUCCEED

      From what we looked into the "vmware.c" code, the function zbx_vmware_service_get_cust_query() is responsible for checking if a given custom_query already exists - we get "nil" - meaning it wasn't found. So, the function zbx_vmware_service_add_cust_query() should add it to the list of custom queries to check - but here we get a FAIL (as if the entry already exists). As a result, these values are never fetched, and we always get an empty return.

            MVekslers Michael Veksler
            aprzybylski Albert Przybylski
            Team B
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4h Original Estimate - 4h
                4h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 14h
                14h