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

Agent2 wmi.get does not respect case of returned data, if answer is True/False

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Critical Critical
    • 7.0.0alpha2, 7.0 (plan)
    • 6.0.13
    • Agent (G)
    • None
    • agent2 on windows. Mixed versions of windows, 2016, 2019
    • Sprint 99 (Apr 2023), Sprint 100 (May 2023)
    • 1

      Steps to reproduce:

      1. Run query, for example "wmi.get["root\microsoft\windows\defender","select RealTimeProtectionEnabled from MSFT_MpComputerStatus"]" towards classic agent (in my case it was 4.4.10) No matter if you use zabbix_get or create an item. 
      2. Run same query towards agent2 on same host (in my case it was version 6.0.13)
      3. I guess you can use any other wmi query where answer is either True or False

      Result:

      from classic agent you will get "True", from agent2, you will get "true". Note the case...

      Running query in host in powershell, gives you "True".

      Running any other query, which returns for example "Disabled" or "N/A" or "Unknown" works without any issues, no modifications to returned value.

      Expected:

      I would expect query to return values with same case. This has no connection to windows version. In my case both 2016 and 2019 behaved same way. 

      We discovered this during upgrading our environment from classic to agent2, when after agent change several triggers, which used "find(/host/item/.."like", "True")<>1", suddenly fired. Workaround was implemented, "like" replaced with "iregexp". But still, it would be nice to get answers from agent without any case changes. 

        1. wmi.getall_agent2_current_behavior.json
          3 kB
          Mihails Prihodko
        2. wmi.getall_agent2_proposed_behavior.json
          3 kB
          Mihails Prihodko
        3. wmi.getall_agentd_current_behavior.json
          3 kB
          Mihails Prihodko
        4. ZBX-22593-release-6.0.patch
          3 kB
          Mihails Prihodko

            mprihodko Mihails Prihodko
            lauri.rood Lauri Rood
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: