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

    Details

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

      Description

      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}]

        Attachments

        1. no_timeout.png
          121 kB
          Artjoms Rimdjonoks
        2. seelct.png
          88 kB
          Natalja Romancaka

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: