Now you know how the Zabbix protocol works, so it is time to see some code that implements this protocol. To keep things easy, we have described an example of the
zabbix_sender protocol—the simplest way to send data to Zabbix.
Zabbix uses JSON to describe the object contained in the data. There are a lot of efficient JSON libraries that can be used, but to make things easier here, those libraries will not be used.
Here, you will see a really simple implementation of the
zabbix_sender protocol that, as you know, is the easy way to send traps to Zabbix.
The piece of code that follows has been kept as simple as possible, and the scope is to provide an example from which you can ...