Discovery Rule Failing with "Value should be a JSON object."

XMLWordPrintable

    • Type: Problem report
    • Resolution: Won't fix
    • Priority: Trivial
    • None
    • Affects Version/s: 3.4.6
    • Component/s: None
    • None
    • Environment:
      Server and Proxy: Debian 8 x64
      Client: Windows Server 2016

      I have a PowerShell script that I use to query Microsoft Failover Cluster's for a list of virtual machines running on all hypervisor nodes in the cluster, and returns the result set in JSON format. It has worked for about the past 1.5 years. As of a recent update to 3.4.x (exact version where problem started is not known), the Zabbix Server has started to reject the JSON object returned by the script with error "Value should be a JSON object."

      I have attached the script to this issue (Discover-ClusterVM.ps1).

      Key for the discovery rule:
      system.run[powershell.exe -NoProfile -File \\path\to\Discover-ClusterVM.ps1]

      Sample output:

      {"data":[{"{#VMNAME}":"VM1","{#NODE}":"HOST1"},{"{#VMNAME}":"VM2","{#NODE}":"HOST2"},{"{#VMNAME}":"VM3","{#NODE}":"HOST1"}]}
      

      This issue is possibly related to ZBX-13186.

            Assignee:
            Unassigned
            Reporter:
            Brett Anspach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: