Closed boyemillar closed 5 years ago
Another vote for update!
on zabbix version 4.x vmbix[ping] is not returning data something to do with missing headers here is a sample output
[root@zabbix ~]# zabbix_agentd -t vmbix[ping] zabbix_agentd [13999]: VmBix module version 1.1 zabbix_agentd [13999]: Loading VmBix module configuration file /etc/zabbix/vmbix_module.conf zabbix_agentd [13999]: Warning: Message from 127.0.0.1 is missing header. Message ignored. vmbix[ping] [root@zabbix ~]#
One more!
Also voting, but is project alive ?
I think it's dead.
It looks like there are two issues, both involving the changes in the zabbix message header. From a packet capture of a zabbix 3.4 zabbix_get
, the requests end in 0x0a (a line feed), and vmbix handles this with a buffered read of the line. In 4.0, there's no new line character, so vmbix keeps waiting for one.
I played around with it today, and changed it to read a byte array based on the lenght defined in the header. That led to the second problem of the response not using the new header. As written VmBix uses PrintWriter to output the line. Unfortunately, that converts the data (along with the header) to string. Changing this to use OutputStream works. Unfortunately, this is passed to each individual method, so it's a fair amount of individual refactoring to implement. I've currently got this working with the about
method, and it should only be a matter of time to refactor the rest of it.
While I will no-doubt do this for myself, I'd like some feedback prior to submitting a PR. First, I'm not sure how backwards compatible this will be. It looks like about
works against 3.4, but I'm not certain. Is backwards comparability a hard requirement? If so, does it need to be dynamic, or can it be set in configuration?
Also, I'm not a java developer. If this product is still maintained, we're in good shape, but if not, my code is ugly, it would be good to get some style input. Additionally, I'm only hacking against VmBix.java and then rebuilding with maven currently. I'm not sure what should be done to properly package this, etc. More to come.
whosgonna: Better ugly but working than nothing in my case. Have tried other solutions to monitor VMware on zbx4 but nothing comes close to vmbix unfortunately. Backward compatibility is not required at all in my opinion as the current and older versions are freely available if someone needs them. VMbix is the only reason I havent switched to zbx4. Many thanks in advance.
Hi,
Sorry, I've been busy since I started a new position and I haven't been able to dive into the 4.0 compatibility issues. Especially as we didn't upgrade to Zabbix 4 yet.
. I've currently got this working with the
about
method, and it should only be a matter of time to refactor the rest of it.
Thank you for your work.
While I will no-doubt do this for myself, I'd like some feedback prior to submitting a PR. First, I'm not sure how backwards compatible this will be. It looks like
about
works against 3.4, but I'm not certain. Is backwards comparability a hard requirement? If so, does it need to be dynamic, or can it be set in configuration?
@whosgonna , could you make a PR or send your code, I'll have a look at it and fix VMBix for Zabbix 4.0 ? I'll try to make it backward compatible if it's not too difficult.
I have a small test lab, two ESX 6.7 servers with two VMs and a vCenter 6.7 with Zabbix version 4 I can run tests if you want
@y0nza , when I say 'ugly', I don't mean only ugly from a stylistic standpoint. I'm not a java programmer, so I have very little idea of how to properly implement exception handling. There's a good chance my code would crash frequently due to this ;)
@dav3860 , I've forked the project and created a new branch called zabbix4. I've added a notes section to the README for the branch describing what I'm thinking, and I've attempted to clearly document this in the code as well. My comments are marked with WHOSGONNA: for easy identification. These can be deleted prior to any actual merge to master.
Additionally, I've already sent a PR for the vmbix loadable module. It's a fairly small patch. I'm working on FreeBSD, so I'm not able to provide compiled Linux binaries (sorry guys), but these should be trivial for someone else to build.
Finally, I have released a proof of concept vmbix.jar in my repo. Do not use this in production, as right now it will only return the VMware about
no matter what key is used.
@whosgonna , thank you very much. I'm currently reviewing your work. I'll keep you informed.
Thanks for reworking this @whosgonna + @dav3860 we have missed vmbix since we upgraded to v4.0 in October. Cant wait to spin our vmbix proxy up again.
I've quickly refactored the code based on @whosgonna's work. It is backward compatible. Compiled binaries (v2.8-beta) are available here. Please feel free to test it and give us a feedback.
You can also try the version 1.3 of the vmbix loadable module. It now supports Zabbix 4.0. I'll merge it into the master branch after further testing.
where download the version 1.3 of the VmBix? thanks
Using it for several days on 5 clusters - no problems so far. Many thanks dav3860 & whosgonna!
ToughLama: https://bintray.com/dav3860/generic/vmbix-zabbix-module/view#files
@ToughLama, if you mean the VMBix loadable module for Zabbix 4.0, you can find it here.
I've published a v2.8 version.
@dav3860 , Thank you so much
Thanks @dav3860 and @whosgonna... All good now.. I've got 3 vmbix proxies up and running now on Zabbix v4.0.5 monitoring 3 out of our 5 VCenters going to add the other 2 VCenters in a few weeks time.
I have now carried out some initial testing with VMBix on Zabbix v4.2.0 on Centos 7 and it is working fine.
.
Will you be updating VMBIX to work with Zabbix v4