Se encuentra viendo la documentación de la versión en desarrollo, puede estar incompleta.
Únase a nuestro proyecto de traducción y ayude a traducir la documentación de Zabbix a su lengua materna.

5 Protocolo de remitente Zabbix

Consulte la página métricas de captura para más información.

Overview

Zabbix server and Zabbix proxy use a JSON-based communication protocol for receiving data from Zabbix sender. Data can be received with the help of a trapper item, or an HTTP agent item with trapping enabled.

Request and response messages must begin with header and data length.

Zabbix sender request

{
           "request": "sender data",
           "data": [
               {
                   "host": "<hostname>",
                   "key": "trap",
                   "value": "test value"
               }
           ]
       }

Zabbix server response

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

Zabbix sender request with a timestamp

Alternatively, Zabbix sender can send a request with a timestamp and nanoseconds.

{
           "request": "sender data",
           "data": [
               {
                   "host": "<hostname>",
                   "key": "trap",
                   "value": "test value",
                   "clock": 1516710794,
                   "ns": 592397170
               },
               {
                   "host": "<hostname>",
                   "key": "trap",
                   "value": "test value",
                   "clock": 1516710795,
                   "ns": 192399456
               }
           ],
           "clock": 1516712029,
           "ns": 873386094
       }

Zabbix server response

{
           "response": "success",
           "info": "processed: 2; failed: 0; total: 2; seconds spent: 0.060904"
       }