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

Valid json format not accepted by server

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 3.2.4
    • Server (S)
    • Agent 3.2 running on Windows 8
      Server 3.2.4 running on Debian 8

      If a LLD rule outputs

      {"data":{"{#DBNAME}":"TOTO"}}
      

      which is a valid json, Zabbix server accepts the json without doing anything and without error.

      The server expects such json

      {"data":["{#DBNAME}":"TOTO"]}
      

      to populate items from proto item.

      Both are valid json, the first one is simply ignored. See logs below.

      I didn't find any details in the documentation about expected json format. I would expect : either server accepts both json formats or a Warning in the documentation (not all json formats are accepted).

      Sorry if this issue has been already raised, I didn't find it.

      Thanks Alain

      Agent log:

        2264:20170313:165949.684 for key [databasesname.discovery] received value [{"data":{"{#DBNAME}":"TOTO"}}]
        2264:20170313:165949.684 In process_value() key:'frdb081.eame.global.titi.com:databasesname.discovery' value:'{"data":{"{#DBNAME}":"TOTO"}}'
        2264:20170313:165949.684 In send_buffer() host:'zabbix.fr.titi.net' port:10051 entries:0/100
        2264:20170313:165949.684 End of send_buffer():SUCCEED
      

      Server log:

       15087:20170314:161509.007 trapper got '{"request":"agent data","data":[{"host":"frdb081.eame.global.titi.com","key":"databasesname.discovery","value":"{\"data\":{\"{#DBNAME}\":\"TOTO\"}}","clock":1489504508,"ns":545233408}],"clock":1489504508,"ns":557393408}'
       15087:20170314:161509.007 In recv_agenthistory()
       15087:20170314:161509.007 In process_hist_data()
       15087:20170314:161509.007 In process_mass_data()
       15087:20170314:161509.007 In lld_process_discovery_rule() itemid:175844
      .............................
       15087:20170314:161509.009 End of lld_item_prototypes_get():1 prototypes
       ..............................
       15087:20170314:161509.010 End of lld_applications_get():0 applications
       15087:20170314:161509.010 In lld_applications_make()
       15087:20170314:161509.010 End of lld_applications_make():0 applications
       ...................................
       15087:20170314:161509.012 In lld_items_make()
       15087:20170314:161509.012 End of lld_items_make():0 items
      

            Unassigned Unassigned
            alain ganuchaud Alain Ganuchaud (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: