[comment]: # translation:outdated

[comment]: # ({055a69af-df0deee4})
# 5 Protocollo Zabbix sender

[comment]: # ({/055a69af-df0deee4})

[comment]: # ({83ba3915-ea58f0b6})
#### Panoramica

Il server Zabbix e il proxy Zabbix utilizzano un protocollo di comunicazione basato su JSON per la ricezione di dati da Zabbix sender.
I dati possono essere ricevuti tramite un [elemento trapper](/manual/config/items/itemtypes/trapper), o un [elemento agente HTTP](/manual/config/items/itemtypes/http) con il trapping abilitato.

I messaggi di richiesta e risposta devono iniziare con [intestazione e lunghezza dati](/manual/appendix/protocols/header_datalen).

[comment]: # ({/83ba3915-ea58f0b6})

[comment]: # ({7afaeb19-51cd3761})
#### Richiesta Zabbix sender

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

[comment]: # ({/7afaeb19-51cd3761})

[comment]: # ({17f05fdd-c4e3e287})
#### Risposta del server Zabbix

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

[comment]: # ({/17f05fdd-c4e3e287})

[comment]: # ({1d84472a-64bfec01})
#### Richiesta di Zabbix sender con un timestamp

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

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

[comment]: # ({/1d84472a-64bfec01})

[comment]: # ({bd158420-c71e91fd})
#### Risposta del server Zabbix

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

[comment]: # ({/bd158420-c71e91fd})
