Protocollo Zabbix sender

Zabbix server e Zabbix proxy utilizzano un protocollo di comunicazione basato su JSON per ricevere dati da Zabbix sender. I dati possono essere ricevuti con l'aiuto di un trapper item oppure di un HTTP agent item con il trapping abilitato.

I messaggi di richiesta e risposta devono iniziare con header and data length.

Richiesta di Zabbix sender

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

Risposta del server Zabbix

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

Richiesta di Zabbix sender con timestamp

In alternativa, Zabbix sender può inviare una richiesta con un timestamp e nanosecondi.

{
    "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
}

Risposta del server Zabbix

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