Zabbix Documentation 3.4

2.23.04.0 (current)In development:4.2 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

manual:appendix:items:trapper

4 Trapper items

Overview

Zabbix server uses a JSON- based communication protocol for receiving data from Zabbix sender with the help of trapper item.

For definition of header and data length please refer to protocol details section.

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

Alternatively Zabbix sender can send request with a timestamp

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

Zabbix server response

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