Closed hetzbh closed 8 years ago
Is there a way that vmbix can show the data on the vm's (disk, network etc) as well as graphs? Of course. Did you test vmbix with zabbix_get as stated in the README ? You can query VmBix like a Zabbix agent using the zabbix_get tool :
# zabbix_get -s 127.x.y.z -p 12050 -k about[*]
VMware vCenter Server 5.1.0 build-1364037
# zabbix_get -s 127.x.y.z -p 12050 -k esx.status[esx01.domain.local]
1
# zabbix_get -s 127.x.y.z -p 12050 -k vm.guest.os[MYVM01]
CentOS 4/5/6 (64 bits)
# zabbix_get -s 127.x.y.z -p 12050 -k esx.discovery[*]
{"data":[{"{#ESXHOST}":"esx01.domain.local"},{"{#ESXHOST}":"esx02.domain.local"}]}
# zabbix_get -s 127.x.y.z -p 12050 -k vm.counter[MYVM01,virtualDisk.totalReadLatency.average,scsi0:1,300]
2
If I use the module (I don't at the moment), will I need to install Zabbix agent on each vm in order to get the data? No, as stated in the README "The vmbix.so loadable module must be installed on your server/proxy.". So you don't need to install an agent on each VM.
Problem is that with ESXI 5.5 and above and VCenter/VCSA 6 - everything goes by UUID, so for example:
zabbix_get -s 127.x.y.z -p 12050 -k esx.status[esx01.domain.local] will give you: 4 (not 1) abbix_get -s 127.x.y.z -p 12050 -k vm.guest.os[MYVM01] Will give you some error (i'm not near the machine right now) as it expects a UUID.
No, VmBix translates the name or the UUID to the corresponding object. Set useuuid=true in the configuration. Then restart vmbixd and issue the following commands :
zabbix_get -s 127.0.0.1 -p 12050 -k esx.discovery[*]
zabbix_get -s 127.0.0.1 -p 12050 -k vm.discovery[*]
Please post the results.
[root@zabbix ~]# zabbixget -s 192.168.0.126 -p 12050 -k about[] VMware vCenter Server 6.0.0 build-3634794 [root@zabbix ~]# zabbixget -s 192.168.0.126 -p 12050 -k esx.discovery[] {"data":[{"{#ESXHOST}":"esxi1.hetztest.net","{#UUID}":"03000200-0400-0500-0006-000700080009","{#CLUSTER}":"esxi1.hetztest.net"}]} [root@zabbix ~]# zabbix_get -s 192.168.0.126 -p 12050 -k vm.discovery[*] {"data":[{"{#VIRTUALMACHINE}":"vmbix-proxy","{#UUID}":"4203fa35-b0d2-a10e-94ad-680d993df5d6"},{"{#VIRTUALMACHINE}":"Zabbix","{#UUID}":"420c93c7-2b51-3404-7ead-3ae8370c240d"},{"{#VIRTUALMACHINE}":"ovirt-engine","{#UUID}":"420c02a8-159a-f360-4cbf-b91271a7fba7"},{"{#VIRTUALMACHINE}":"windows 8.1 enterprise","{#UUID}":"42361bf2-a7ec-18d7-9f6b-4288d91cb2eb"},{"{#VIRTUALMACHINE}":"win7-backups","{#UUID}":"564d2464-8bed-e870-14e8-ee95f40c3b09"},{"{#VIRTUALMACHINE}":"VCSA 6","{#UUID}":"564d2626-e5ba-f9c9-55b7-976cd80d3338"},{"{#VIRTUALMACHINE}":"vcenter","{#UUID}":"564d0ae0-3f9a-c0db-8006-97d706717c4c"},{"{#VIRTUALMACHINE}":"DNS Master","{#UUID}":"423625ce-8239-20a3-f773-44aed9c0d619"},{"{#VIRTUALMACHINE}":"Fedora Downloader VM","{#UUID}":"564d6a59-6617-ad16-76d6-79e53e3f7aba"},{"{#VIRTUALMACHINE}":"Main DC","{#UUID}":"4236836d-cf18-079c-8889-d84736f4f092"},{"{#VIRTUALMACHINE}":"mail-server","{#UUID}":"42369ff3-5a2a-5a81-d813-82c45632fd9f"}]}
That's with UUID as true, but again, zabbix complains that the host 'esxi1.hetztest.net' not found (although it is) and it's showing it not-connected/not-found with a "problem" flag (as shown on my first comment)
If you set useuuid=true, you must reference all the objects by their UUID in the queries. So these queries should work :
# zabbix_get -s 192.168.0.126 -p 12050 -k "esx.status[03000200-0400-0500-0006-000700080009]"
# zabbix_get -s 192.168.0.126 -p 12050 -k "vm.guest.os[42361bf2-a7ec-18d7-9f6b-4288d91cb2eb]"
Does it work ?
The templates here are provided as an example. If you use the UUID to reference the machines, the ESX hosts and the VM hosts created in the host prototype rules must have the name set to {#UUID} and the visible name set to {#VIRTUALMACHINE} or {#ESXHOST}. I'll update the documentation if it's not clear.
Yes, this does work. BTW, since ESXI 5.5 and up (and vCenter 5.x and up) running by default with UUID as default, why not changing the default to UUID with the templates?
2 more things:
I started to update the documentation and the Zabbix templates. Please use these ones if you have Zabbix 3.0. You'll have to install the loadable module before. The necessary value mappings should be created when you import the templates. If not, you will find them in the value mappings directory. The python script is necessary if you don't want to use LLD host prototypes to create the hosts, and programmatically create regular hosts instead in Zabbix.
I went back to Zabbix 2.4 (tons of external templates from the net don't work on Zabbix 3). Do You plan to release for 2.4 as well?
And thanks a lot for the kind help ;)
Well, I think that if you change the version to 2.4 in the template XML files, if will work. You will just have to create the value mappings manually before importing the templates. I have started to upgrade to Zabbix 3.0, so I don't have a working 2.4 setup with VmBix anymore.
I've installed the module and templates (and "fixed" them so they would look as 2.0) and I'm testing it on out VCSA 6. One problem on the logs keeps appearing though, for example:
1360:20160627:153244.494 item "564d809d-2657-51d7-708c-d5435cb3a831:vm.cpu.ready.pct[{HOST.HOST}]" became supported
1360:20160627:153244.494 item "564d2fd5-014d-6e88-156c-d8fa928b5298:vm.cpu.load[{HOST.HOST},pused]" became not supported: Cannot evaluate function "last()".
1360:20160627:153244.494 item "564d2fd5-014d-6e88-156c-d8fa928b5298:vm.cpu.ready.pct[{HOST.HOST}]" became not supported: Cannot evaluate function "last()".
Hi, This is normal.These are calculated functions relying on other items, so they will be evaluated after a moment. Wait for a couple of hours and check if these items now have values.
Hi,
I just downloaded and install vmbix. (CentOS 7.1, zabbix 3.0 latest). I didn't set the enable UUID at the beginning and I see the vm's but those vm's have no data in them in zabbix, I don't see any graphs for vm's, and no latest data or anything.
I tried to enable UUID on vmbix but then I'm getting errors that my esxi machine is not found (I'm monitoring the vcenter, not the specific esxi host). Zabbix show's the esxi as 'not connected' although it clearly is. Example:
So I have 2 questions:
Thanks