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

Agent2 wmi.get works different from agent (1)

XMLWordPrintable

    • Team C
    • Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020)
    • 0.25

      Steps to reproduce:

      Have an agent running agent2.

      The standard windows template contains an item Template Module Windows CPU by Zabbix agent active: Number of cores - key wmi.get[root/cimv2,"Select NumberOfLogicalProcessors from Win32_ComputerSystem"]

      Result:

      item "hostname:wmi.get[root/cimv2,"Select NumberOfLogicalProcessors from Win32_ComputerSystem"]" became not supported: Value of type "string" is not suitable for value type "Numeric (unsigned)". Value "HOSTNAME"

      Expected:
      The item should work. In my particular example it shows 2 with the traditional agent.

       

      Hint:

      Playing with zabbix_get and slightly modifying the query seems to show that agent2 actually gets more properties than asked for and that might cause confusion.

      1. zabbix_get -s hostname -k 'wmi.getall[root/cimv2,Select NumberOfLogicalProcessors from Win32_ComputerSystem]'
        [\{"Name":"HOSTNAME","NumberOfLogicalProcessors":2}]

      Doing the same with a traditional agent yielded (only the requested property):

      1. zabbix_get -s hostname -k 'wmi.getall[root/cimv2,Select NumberOfLogicalProcessors from Win32_ComputerSystem]'
        [\{"NumberOfLogicalProcessors":2}]

        1. no_timeout.png
          no_timeout.png
          121 kB
        2. seelct.png
          seelct.png
          88 kB

            arimdjonoks Artjoms Rimdjonoks
            d00mst Michael Stockman
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: