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

server-side json parser does not handle whitespace properly

    Details

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

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              asaveljevs Aleksandrs Saveljevs
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: