Is this possible to generate a new Zabbix event from a Ruby script? I was suggested to use zabbix_sender script, but I couldn't find any example.
Also, I couldn't find any API related to the events creation.
First of all create some item of type zabbix trapper and then you can send some values to its name by zabbix_sender. You can send one value, or more collected data with timestamps. Here are docs.
Alternatively you can write own zabbix trap sender. Protocol is quite easy. I done the same in Python... no external commands.