VMware Cloud Community
ihryamzik
Contributor
Contributor

VmBix: monitor vSphere with Zabbix

Let me share my experience in vsphere monitoring. We have a pretty large environment and have to monitor some VMs and ESX hosts. For some reason we've decided to use Zabbix for monitoring.

Installing zabbix agents is not acceptable: we are not permitted to install anything on ESXs and VMs we have to monitor run some specific OS.

So the first thing I've done was a number of external checks involving VMWare perl SDK. Every check took forever to complete so the next step was to write a TCP server, connect it to vCenter on startup and save some time. This did speedup checks but resulted in some CPU load and huge data gaps. At that time we had about 500 checks per minute. I guess this way could work for about 20 check per minute, depending on vsphere response time, of course. "No problem, let's use threads!" – was my next idea. And it didn't work, I got my scripts crashing on thread.join() call. What next? Replace threads with processes?

At this point I've had a look on java SDK. The one provided by VMWare seems to be awful, but there's a vijava sdk written by Steve Jin. I believe he works at VMWare. 😃

So this resulted in a small java project that does all the checks I needed. Here's the list of currently supported ones:
status[hostname]
esx.cpu.load[hostname,used]
esx.cpu.load[hostname,total]
esx.cpu.load[hostname,cores]
esx.memory[hostname,used]
esx.memory[hostname,total]
vm.cpu.load[vmname,used]
vm.cpu.load[vmname,total]
datastore.size[datastorename,free]
datastore.size[datastorename,total]

I've also create zabbix templates, they include calculated items to find out CPU, memory and datastore usage in %.

Init scripts to run this tool as daemon are also provided. All the stuff is tested on rhel 6 only. Feel free to ask for new checks, other feature requests and to report bugs at the VmBix google code page.

PS: I'm not sure if it's a correct section for this thread, all the monitoring sollution threads I've seen here were in product-specific sections, this tool is not limited to product versions though (I believe so 😃 ).

Reply
0 Kudos
1 Reply
CRMT
Contributor
Contributor

This scripts are good, I use them on my VMware environment. There are some functions that i would like to monitor also, like disk latency and network transmission, can anyone help me with those scripts?

Reply
0 Kudos