Ad Widget

Collapse

Discovery reports "Value should be a JSON object" for proper JSON

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nick0909
    Member
    • Apr 2013
    • 73

    #1

    Discovery reports "Value should be a JSON object" for proper JSON

    I have an issue where running a discovery on our HP hardware and it now is failing. This has been working for years. When looking at the host configuration > discovery there is the red "!" and it says "Value should be a JSON object." Every server, new or old, is now failing where it used to work. Our script or agent config hasn't changed.

    I figured there might be a problem with the script on the server and it was returning errors or something incorrect, so I ran zabbix_get to see what was being returned from the discovery, and it is in fact good JSON. I used an online validation tool to verify, as well as compared it to other servers that still appear to be working (but have been running longer, so their discovery has already completed once).

    Any thoughts of what else to check, or is this some bug in the JSON parser? Running Zabbix 3.2.4 with Zabbix Proxies also 3.2.4, all on Ubuntu 16.10 with PHP7.

    This is an example of the discovery that shows as failed:

    Code:
    zabbix_get -s server1 -k hp.discovery[fans]
    {
            "data":
            [
                    {
                            "{#FANNO}":"1_2",
                            "{#FANNAME}":"System board 1",
                            "{#FANTYPE}":"System board",
                            "{#FANVARSPEED}":"True"
                    },
                    {
                            "{#FANNO}":"3_2",
                            "{#FANNAME}":"System board 2",
                            "{#FANTYPE}":"System board",
                            "{#FANVARSPEED}":"True"
                    },
                    {
                            "{#FANNO}":"4_2",
                            "{#FANNAME}":"System board 3",
                            "{#FANTYPE}":"System board",
                            "{#FANVARSPEED}":"True"
                    }
            ]
    }
    Last edited by nick0909; 18-04-2017, 19:41.
  • nick0909
    Member
    • Apr 2013
    • 73

    #2
    Updated - I have one proxy (out of 7 total) that is still on 3.0.4 and discovery is working at that site still. This seems to be a new issue that came up since I upgraded the other proxies from 3.0.4 to 3.2.4. I'll see if I can open a bug report unless someone else has any ideas.

    edit: bug created
    Last edited by nick0909; 19-04-2017, 20:35.

    Comment

    • Semiadmin
      Senior Member
      • Oct 2014
      • 1625

      #3
      Hi, nick0909.
      I suggest what LLD for some reason recieves error message instead of JSON via Zabbix proxy.
      Try to create a text item which'd receive data from the same script and see what kind of data it'd obtain - valid JSON or error message. If it'd be an error message - you'd read it.

      Comment

      • sqweez
        Junior Member
        • Mar 2013
        • 1

        #4
        Originally posted by Semiadmin
        Hi, nick0909.
        I suggest what LLD for some reason recieves error message instead of JSON via Zabbix proxy.
        Try to create a text item which'd receive data from the same script and see what kind of data it'd obtain - valid JSON or error message. If it'd be an error message - you'd read it.
        Thank you for the tips !

        Comment

        Working...