ZABBIX BUGS AND ISSUES

server-side json parser does not handle whitespace properly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.4rc1
  • Fix Version/s: 1.8.5
  • Component/s: Server (S)
  • Labels:
    None
  • Zabbix ID:
    NA

Description

Consider the following JSON for file system discovery:

 {
    "vfs.fs.type.discovery":[
    
    { "{#FSNAME}":"\/", "{#FSTYPE}":"rootfs" },
    { "{#FSNAME}":"\/sys", "{#FSTYPE}":"sysfs" },
    { "{#FSNAME}":"\/proc", "{#FSTYPE}":"proc" },
    { "{#FSNAME}":"\/dev", "{#FSTYPE}":"devtmpfs" },
    { "{#FSNAME}":"\/dev\/pts", "{#FSTYPE}":"devpts" },
    { "{#FSNAME}":"\/", "{#FSTYPE}":"ext3" },
    { "{#FSNAME}":"\/lib\/init\/rw", "{#FSTYPE}":"tmpfs" },
    { "{#FSNAME}":"\/dev\/shm", "{#FSTYPE}":"tmpfs" },
    { "{#FSNAME}":"\/home", "{#FSTYPE}":"ext3" },
    { "{#FSNAME}":"\/tmp", "{#FSTYPE}":"ext3" },
    { "{#FSNAME}":"\/usr", "{#FSTYPE}":"ext3" },
    { "{#FSNAME}":"\/var", "{#FSTYPE}":"ext3" },
    { "{#FSNAME}":"\/sys\/fs\/fuse\/connections", "{#FSTYPE}":"fusectl" }
    
    ]
  }

Our JSON parser requires that there is no whitespace around the colon. If there is whitespace, server says "Wrong data in JSON.", which is not a very helpful error message.

We should improve our JSON parser so that we are more helpful to users wishing to implement their own discoveries in 2.0.

Activity

Hide
Aleksandrs Saveljevs added a comment -

See http://www.json.org/ for more information on JSON.

Show
Aleksandrs Saveljevs added a comment - See http://www.json.org/ for more information on JSON.
Aleksandrs Saveljevs made changes -
Field Original Value New Value
Assignee Aleksandrs Saveljevs [ asaveljevs ]
Aleksandrs Saveljevs made changes -
Status Open [ 1 ] In Progress [ 3 ]
Hide
Aleksandrs Saveljevs added a comment -

Made our JSON parser ignore whitespace better. Development branch: svn://svn.zabbix.com/branches/dev/ZBX-3173.

Show
Aleksandrs Saveljevs added a comment - Made our JSON parser ignore whitespace better. Development branch: svn://svn.zabbix.com/branches/dev/ZBX-3173.
Aleksandrs Saveljevs made changes -
Status In Progress [ 3 ] Resolved [ 5 ]
Assignee Aleksandrs Saveljevs [ asaveljevs ] Alexander Vladishev [ sasha ]
Fix Version/s 1.8.5 [ 10095 ]
Resolution Fixed [ 1 ]
Alexander Vladishev made changes -
Status Resolved [ 5 ] Tested [ 10002 ]
Assignee Alexander Vladishev [ sasha ] Aleksandrs Saveljevs [ asaveljevs ]
Hide
Aleksandrs Saveljevs added a comment -

Available in pre-1.8.5 in r16964.

Show
Aleksandrs Saveljevs added a comment - Available in pre-1.8.5 in r16964.
Aleksandrs Saveljevs made changes -
Status Tested [ 10002 ] Closed [ 6 ]
Aleksandrs Saveljevs made changes -
Resolution Fixed [ 1 ]
Status Closed [ 6 ] Reopened [ 4 ]
Aleksandrs Saveljevs made changes -
Status Reopened [ 4 ] Resolved [ 5 ]
Assignee Aleksandrs Saveljevs [ asaveljevs ] Alexander Vladishev [ sasha ]
Resolution Fixed [ 1 ]
Alexander Vladishev made changes -
Assignee Alexander Vladishev [ sasha ] Aleksandrs Saveljevs [ asaveljevs ]
Aleksandrs Saveljevs made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: