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

Zabbix always respond with protocol v1 to a pure JSON trapper message

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Workaround proposed
    • Icon: Minor Minor
    • None
    • 3.4.4
    • Server (S)
    • None
    • Linux Centos 7

      I am currently writing our own zabbix-agent like for our 20 year old c++ framework and noted an oddity in the protocol : Zabbix always answer my program with a message with the ZBXD header whatever the message I send it.

      Steps to reproduce:
      send a message to update a value through a trapper item in Zabbix

      The message is pure JSON :

      {"request":"sender data","data":[{"host":"myHost","key":"testalarm","value":"0"}]}
      

      Result:
      The response is still in version protocol v1:

      ZBXD Z{"response":"success","info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000536"}
      

      Expected:
      I would have expected the response in pure JSON, without the header

      I looked at the source code and noted that from the trapper there is the zbx_send_response which is redefined as zbx_send_response_ext which use the ZBX_TCP_PROTOCOL constant as parameter for the protocol, which is in the end compared to itself in the zbx_tcp_send_ext which in the end sends the response. So it is always in version 1.

            Unassigned Unassigned
            rleymard Rene-Louis Eymard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: