Sending in the data
In some cases, there might be custom data sources where none of the previously discussed methods would work sufficiently well. A script could run for a very long time, or we could have a system without the Zabbix agent but with the capability to push data. Zabbix offers a way to send data to a special item type, Zabbix trapper, using a command-line utility, Zabbix sender. The easiest way to explain how it works might be to set up a working item like that:
- Navigate to
Configuration
|Hosts
, click onItems
next toA test host
, click onCreate item
, then fill in the following:
Name
:Amount of persons in the room
Type
:Zabbix trapper
Key
:room.persons
- When you're done, click on the
Add
button at the bottom.
We now have to determine how data can be passed into this item, and this is where zabbix_sender
comes in. On the Zabbix server, execute the following:
$ zabbix_sender --help
Note
If you've installed from a distribution, then zabbix_sender
needs to be installed first from the repository...