Update of ZabbixWriter for latest zabbix

4 views
Skip to first unread message

Jirka Novak

unread,
Aug 16, 2021, 7:42:22 AM8/16/21
to jmxtrans
Hi,

I found jmxtrans useful and I want to pass information to our zabbix server. I found ZabbixWriter, but it do not work with latest versions as current protocol requires binary header on every message.
I spent some time on updating current code, but I found issue below.
Is there any from developers who can point me in right direction?

My understanding of whole output framework is, that it is based on Writer class. Writer class expects encoded strings (e.g. UTF-8, etc). It makes sense for text based protocols but current zabbix protocol requires binary header (see https://www.zabbix.com/documentation/5.0/manual/appendix/protocols/header_datalen) and then JSON data.
The issue is that I found no way how to write binary header to Writer correctly. Every try I did translates some bytes to characters. As consequence header is incorrect and is refused by zabbix.
I can try to change whole output framework to be based on OutputStream, but it is a lot of work and I can break things.
So my question is whether there is any way how to use OutputStream in output framework?

Best regards,

Jirka Novak

Reply all
Reply to author
Forward
0 new messages