Ad Widget

Collapse

"Value should be a JSON object." but verified as valid JSON

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dukejustice
    Junior Member
    • Dec 2015
    • 11

    #1

    "Value should be a JSON object." but verified as valid JSON

    Hello.

    I have a situation with a low level discovery that gives error "Value should be a JSON object." while the output is verified correct JSON with http://jsonlint.com/

    Running Zabbix 3.0.2. The agent is 3.0.5. Both under RHEL 7.

    Here is the JSON:
    Code:
    {
            "data":[
    
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170207.002"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170206.002"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170208.001"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170207.001"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170209.001"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170209.002"},
            {"{#LOGFILENAME}":"/logs/HSDEVCENTRAL/20170208.002"},
            {"{#LOGFILENAME}":"/altlogs/HSDEVCENTRAL/20150819.001"}
            ]
    }
    I have other discoveries that work just fine whit the same output, with values changed.

    I also have created a text item with file file's content. And what zabbix picks up is still jsonlint.com verified...

    Can anyone point me into a solution?

    Thank you very much.

    Marc.
    Last edited by dukejustice; 09-02-2017, 19:21.
  • nobodysu
    Member
    • Sep 2016
    • 84

    #2
    Think slashes are the issue:


    UPD:
    You must escape them (bottom of the page):
    Last edited by nobodysu; 10-02-2017, 17:00.

    Comment

    Working...