dav3860 / vmbix Goto Github PK
View Code? Open in Web Editor NEWFork of vmbix, a TCP proxy for querying a VMWare infrastucture with Zabbix
Fork of vmbix, a TCP proxy for querying a VMWare infrastucture with Zabbix
After upgrading to vSphere 6.0, I am unable to query datastores for information.
A manual discovery with zabbix_get returns no data for the datastores, but does return data for the other discovery options, so I assume it is not a matter of incorrect permissions on the vSphere cluster.
zabbix_get -s 127.0.0.1 -p 12050 -k datastore.discovery[*]
{"data":[]}
zabbix_get -s 127.0.0.1 -p 12050 -k esx.discovery {"data":[{"{#ESXHOST}":"esx1.testnet.local","{#UUID}":"32393735-3034-5a43-4a31-313030525046","{#CLUSTER}":"Testcluster"},{"{#ESXHOST}":"esx5.testnet.local","{#UUID}":"37333337-3333-5a43-4a35-303530333654","{#CLUSTER}":"Testcluster"},{"{#ESXHOST}":"esx6.testnet.local","{#UUID}":"37333337-3333-5a43-4a35-30353033364e","{#CLUSTER}":"Testcluster"},
----snip----
{"{#ESXHOST}":"esx2.testnet.local","{#UUID}":"32393735-3034-5a43-4a30-343130505650","{#CLUSTER}":"Testcluster"}]}
hi, i did try zabbix native vmware monitoring and Your vmbix alternative,
vmbix has a lot great checks but unfortunately using names (vs UUIDs) causing problems.
i have standard agent monitoring (from inside OSes) and combining that with vmbix checks causes name conflict between discovered VMs and existing agent-monitored hosts.
i cant modify host prototype because host.host is used as an argument for vmbix checks.
when discovery rule would return two values: UUID and NAME, I could easy set discovered VMs names as UUID (which would not conflict existing agent-monitored systems) and display name as NAME to make it look more human friendly.
did You ever consider switching to UUID in key syntax? is there a hope for me? :)
best regards
sosai-x
Hi, we have a problem using NAS Datastore in Virtual center, for resolve this issue i add this code into getDatastores method :
//Correction by Andrea for trap the NasDatastoreInfo
if (d.getInfo() instanceof NasDatastoreInfo)
{
NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostNasVolume naaName = dsInfo.getNas();
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", "N/A");
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName.getName());
jArray.add(jObject);
}
}
else
{
VmfsDatastoreInfo dsInfo = (VmfsDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostScsiDiskPartition[] naaName = dsInfo.getVmfs().extent;
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", dsInfo.getVmfs().getUuid());
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName[0].getDiskName());
jArray.add(jObject);
}
}
If is correct for you add this code into branch code.
Bye.
Andrea
Hey Guys.
I installed the latest vmbix - 2.6
I have vmware 6.5 and its connected and most commands work like about, discovery VM and so on.
However nothing with Esxi hosts is support ?
anyone facing the same issue ?
When will you be able to create a new release version for 1.2.3? I am having trouble compiling it on my own...
There is array extend method used instead of append in vmbix-object-sync script function get_hosts_by_group. If wrong setup of zabbix groups appears, this function gives wrong results.
Proper function to add another value to the list here is append.
My patch for this is included.
vmbix-object-sync.patch.txt
vmbixd is not working on discovery because it is handing off the UUID instead of the machine name to vmbixd. For example:
vmbixd: No vm named '500b8f2b-e3d4-02b2-07fe-c3682a91cdd7' found
This is using the provided templates and the wrapper script method. Can this be easily fixed?
Hello,
I have Zabbix 3.0.3 with VmBix 2.2 installed and configured to monitor vCenter 6 with two ESX hosts. There are 3 datastores connected over FC SAN switch.
Hosts and datastores are successfully discovered by using the VmBix vCenter Loadable Module template. VmBix is configured to use VMWare UUID to identify objects.
Is there a way to monitor latest IOPS value of datastore? I tried to use the ** datastore.datastoreReadIops.latest and datastore.datastoreWriteIops.latest ESX counters, but getting error Check access restrictions in Zabbix agent configuration
[root@zabbix ~]# zabbix_get -s 127.0.0.1 -p 12050 -k "esx.counter[50673472-be243ac8-98e8-2c768a52d4fd,datastore.datastoreReadIops.latest]"
zabbix_get [93941]: Check access restrictions in Zabbix agent configuration
50673472-be243ac8-98e8-2c768a52d4fd is UUID of one datastore.
I got same error when used UUID of ESX host:
[root@zabbix ~]# zabbix_get -s 127.0.0.1 -p 12050 -k "esx.counter[32333536-3030-5a43-3232-333430325350,datastore.datastoreReadIops.latest]"
zabbix_get [92429]: Check access restrictions in Zabbix agent configuration
32333536-3030-5a43-3232-333430325350 is UUID of one ESX host.
Please help, what I have missed?
Hello :-).
I'm new with vmbix and i try to use it with zabbix 3.0, i've two zabbix proxy (but i want use vmbix just with one) and one zabbix server, I will summarize what I have done :
Traceback (most recent call last):
File "./vmbix-discovery.py", line 46, in
zapi.login(ZBXUSER, ZBXPASSWORD)
File "/usr/local/lib/python2.7/dist-packages/zabbix_api.py", line 195, in login
result = self.do_request(obj)
File "/usr/local/lib/python2.7/dist-packages/zabbix_api.py", line 246, in do_request
raise e
urllib2.URLError:
Do you have idea ?
Thanks for your time
How about requesting (mailto:[email protected]) to add VmBix to?:
http://www.zabbix.com/third_party_tools.php
Hi.
vmbix was running good for ~1 month. Now are mostly Items unsupported & vmbix.log is full of NPE Errors:
Exception in thread "Thread-405" java.lang.NullPointerException
at net.dav3860.VmBix$Connection.getManagedEntityByUuid(VmBix.java:1204)
at net.dav3860.VmBix$Connection.getManagedEntity(VmBix.java:1113)
at net.dav3860.VmBix$Connection.getVmPerfCounterValue(VmBix.java:2360)
at net.dav3860.VmBix$Connection.checkAllPatterns(VmBix.java:1030)
at net.dav3860.VmBix$Connection.run(VmBix.java:3415)
There is allso a Problem with object script.
[2016-09-28 16:55:07,755] - INFO - Action for extra hosts : simulate
[2016-09-28 16:55:07,755] - INFO - Connecting to Zabbix server at http://zabbix-webpage.com
[2016-09-28 16:55:07,821] - INFO - [vsphere_object_vm] Importing objects of type [vsphere_object_vm] into Zabbix
[2016-09-28 16:55:14,347] - INFO - [vsphere_object_vm] Number of objects to be checked: 223
[2016-09-28 16:55:14,348] - DEBUG - [vsphere_object_vm] Processing host 'Server1' [1/223]
[2016-09-28 16:55:14,348] - DEBUG - [vsphere_object_vm] Checking inclusion rules for host 'Server2'
[2016-09-28 16:55:14,348] - DEBUG - [vsphere_object_vm] Checking exclusion rules for host 'Server3'
Then i have to break a script because nothing is happening.
Do you have any idea, where i have to look?
Thank you!
Regards!
Zabbix-server 3.4.6
Vmbix 2.6.0.172
I update Zabbix-server 3.4.5 to 3.4.6 and many items in "Template VmBix VM Loadable Module" don't return any value and wait in Zabbix-server queue after this update.
Items who don't return value:
Discovery rule CPU
Discovery rule vDisk
Network Rx (bits/s)
Network Tx (bits/s)
Other items in the template work correctly.
In Vmbix log only this appear:
vm.guest.tools.status[VM]' not supported
The command: zabbix_get -s 127.0.0.1 -p 12050 -k "vmbix.version" work !
I restart services and hosts but nothing change.
Any ideas for this issue ?
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:
2016-06-21 01:42:28,048 INFO [Thread-52] [VmBix.java:3390] thread closed, collecting data in 0 threads
2016-06-21 01:42:31,021 INFO [Thread-53] [VmBix.java:3347] thread created, collecting data in 1 threads
2016-06-21 01:42:31,069 WARN [Thread-53] [VmBix.java:1365] No host named 'esxi1.xxx.com' found
2016-06-21 01:42:33,097 INFO [Thread-53] [VmBix.java:3390] thread closed, collecting data in 0 threads
So I have 2 questions:
Thanks
zabbix_get -s 127.0.0.1 -p 12053 -k 'datastore.discovery'
Exception in thread "Thread-3" java.lang.ClassCastException: com.vmware.vim25.NasDatastoreInfo cannot be cast to com.vmware.vim25.VmfsDatastoreInfo
at net.djarvur.vmbix.VmBix$Connection.getDatastores(Unknown Source)
at net.djarvur.vmbix.VmBix$Connection.checkAllPatterns(Unknown Source)
at net.djarvur.vmbix.VmBix$Connection.run(Unknown Source)
Using vSphere Perl SDK I can see that a Datastore Object has a Property 'summary' of type 'DatastoreSummary'. It has a field named 'type' which can have a value which is not 'VMFS'.
In my case it is 'NFS'. Maybe this can help you.
This doesn't return the memory usage of a cluster. It results the amount of memory used by cluster services etc. (effective memory usage) . Effective memory is the amount of memory available for virtual machines.
Effective Memory = Aggregate host machine memory - (VMkernel memory + Service Console memory + other service memory)
Cluster memory usage should be calculated like this:
Cluster: memory usage = memory consumed + memory overhead ÷ effectivemem
as it's explained in https://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/memory_counters.html
Could this be retrieved for cluster from root resource pool?
https://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.ResourcePool.html
And for last but not least thanks to dav for this great tool!
When I try to exexute:
vmbix -P 12050 -u username -p password -s https://vcenter.mycompany.com/sdk
I get the following exception:
Exception in thread "main" java.lang.NullPointerException
at net.djarvur.vmbix.VmBix.main(Unknown Source)
Shutting down
Error disconnecting: null
Shutted down
I already imported rui.crt vom VCenter system into /etc/ssl/certs. Any pointers for my problem ? Thanks !
Zabbix Appliance
VMware
VmBix
VmBix 2.6.0.157
Load Module 1.0.16 (Zabbix 3.2.1)
Installed VmBix via the .deb files in the repository for both the VmBix Core and the Load Module. Made the adjusments to the config files as described in the installation and configuration steps.
The current issue I'm facing and trying to solve is data not being received via the Zabbix Agent. The agent is running on the same Zabbix Server and getting info from the agent is working as can be seen below.
appliance@oct-zabbix:~$ zabbix_get -s 127.0.01 -p 10050 -k agent.version
3.2.2
But when I try to get info from the Zabbix Agent in conjunction with VmBix I get an error
appliance@oct-zabbix:~$ sudo zabbix_get -s 127.0.0.1 -p 12050 -k "vm.discovery[*]"
zabbix_get [6310]: Check access restrictions in Zabbix agent configuration
When I check the logs (/var/log/vmbix.log) I get the following output:
DEBUG [Thread-163] [VmBix.java:4142] Thread created, collecting data in 1 threads
DEBUG [Thread-163] [VmBix.java:554] Parsing this request : ZBXD^A^P^@^@^@^@^@^@^@vm.discovery[*]
ERROR [Thread-163] [VmBix.java:1794] An error occurred : java.lang.NullPointerException
DEBUG [Thread-163] [VmBix.java:4168] Request took 1 ms
DEBUG [Thread-163] [VmBix.java:4190] Thread closed, collecting data in 0 threads
Checking the zabbix agent log I get the following:
2085:20161221:100756.943 using configuration file: /etc/zabbix/zabbix_agentd.conf
2085:20161221:100756.944 VmBix module version 1.0
2085:20161221:100756.944 Loading VmBix module configuration file /etc/zabbix/vmbix_module.conf
2085:20161221:100756.944 loaded modules: vmbix.so
I'm assuming something is wrong, but I can't seem to figure out what the issue is exactly. Everything seems to be working as I can see, but somehow I cannot get any data.
As a side note I tried to run the script of vmbix-object-sync, but that is generating an issue aswell:
[2016-12-21 11:55:12,561] - INFO - Action for extra hosts : simulate
[2016-12-21 11:55:12,561] - INFO - Connecting to Zabbix server at http://<zabbix server>/zabbix
[2016-12-21 11:55:12,573] - INFO - [vsphere_object_vm] Importing objects of type [vsphere_object_vm] into Zabbix
Cannot decode VmBix response
[2016-12-21 11:55:12,625] - ERROR - [vsphere_object_vm] Cannot decode VmBix response
I hope someone can help me with this issue so I can start monitoring my VMware setup with Zabbix.
It appears as though VMs with 3 characters cant retrieve the vm.host item:
Running:
zabbix_get -s 127.0.0.1 -p 10050 -k 'vmbix[vm.host,tod]'
Returns:
ZBX_NOTSUPPORTED
But all other VMs with names longer then 3 characters works properly. Also all other checks work fine for VMs with 3 or more characters so it appears as though everything is working as it should.
Zabbix: 3.0.6
vCenter: 6.0
vmbix: 2.6.0.157
first of all, tanks for this program, it's a life saver.
the vmbix works fine on ESX discovery, however he doesn't discovery all virtual machines in my vcenter.
is there anything that i forgot?
Hi
I am unable to query datastores for information. All symptoms are exactly the same as described in issue #21. The only diffrence is ESXi version.
PS. Can somebody help me with other issue posted here: https://github.com/dav3860/vmbix_zabbix_module/issues/6
I'm trying to install the latest version of vmbix on my lab. I'm using VCSA 6.5 as well as few ESXI 6.5 hosts..
When using the vmbix command to connect to the esxi url (example: https://esxi1/sdk ) it works. However, when I try to connect to the VCSA (http://vcsa/sdk) it spits the error "Cannot connect to the VMWare SDK URL". Here is the full output.
# vmbix -P 12050 -u "[email protected]" -p "pass123" -s "https://vcsa/sdk/" log4j:WARN No appenders could be found for logger (com.vmware.vim25.ws.XmlGenDom). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. com.vmware.vim25.InvalidLogin at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at com.vmware.vim25.ws.XmlGenDom.fromXml(XmlGenDom.java:219) at com.vmware.vim25.ws.XmlGenDom.parseSoapFault(XmlGenDom.java:147) at com.vmware.vim25.ws.XmlGenDom.fromXML(XmlGenDom.java:105) at com.vmware.vim25.ws.SoapClient.unMarshall(SoapClient.java:212) at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:93) at com.vmware.vim25.ws.VimStub.login(VimStub.java:1732) at com.vmware.vim25.mo.SessionManager.login(SessionManager.java:153) at com.vmware.vim25.mo.ServiceInstance.login(ServiceInstance.java:238) at com.vmware.vim25.mo.ServiceInstance.constructServiceInstance(ServiceInstance.java:131) at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:104) at com.vmware.vim25.mo.ServiceInstance.<init>(ServiceInstance.java:94) at net.dav3860.VmBix.updateConnection(VmBix.java:435) at net.dav3860.VmBix.server(VmBix.java:489) at net.dav3860.VmBix.main(VmBix.java:234) 13:20:21.191 [main] ERROR net.dav3860.VmBix - Cannot connect to the VMWare SDK URL 13:20:21.197 [Thread-0] INFO net.dav3860.VmBix - Shutting down 13:20:21.197 [Thread-0] ERROR net.dav3860.VmBix - Error disconnecting: java.lang.NullPointerException 13:20:21.197 [Thread-0] INFO net.dav3860.VmBix - Shutted down
Hi, just have a question regarding the cache ttl and if there is any risk or possible issues if these ttl values are pushed out? With the default values I’m seen huge network spikes even 15 or so minutes, sometimes in the excess of 100 – 200 Mbps. I am only pulling stats for about 300 VMs on 6 items. I have also noticed that if I give access to the service account used by VmBix to the whole vCenter environment the bandwidth is really high. It’s a fairly large environment with over 2000 VMs, so I have found only giving it access to the folder of interest has reduced the network usage, but then I’m unable to get items like CPU Freq. Is the extra bandwidth used a result of other hosts etc been cached?
Hello,
I am trying to find a way to monitor multiple vcenter clusters with 1 VmBix template and vmbixd process running. Is this possible or could this be implemented as a new feature where you provide to the vmbixd daemon the vcenter/esxi SDK url, username and password.
I guess the sollution now is to use different templates + different vmbixd instances ?
Thanks in advance.
Kurt
v4.2.0 worked fine however since updating to v4.2.1 i dont get any data returned from VMBIX
I've added a new Item to the template to get the number of VMs on each host but i cant get it to work. All the other standard Items data in the templates return fine from our Zabbix Proxy where vmbix is installed.
I've tried both...
esx.vms.count[HOST.HOST]
vmbix[esx.vms.count,{HOST.HOST}]
If i run the first command above from the zabbix proxy server it returns fine
zabbix_get -s 127.0.0.1 -p 12050 -k esx.vms.count[MY-ESXiHOST.fqdn]
Hi dav,
in my setup I have vCenter 6 with 2 virtualization hosts and about 320 virtual machines managed by vCenter.
Also, I have the Zabbix 3.0.4 with VmBix 2.4 installed on CentOS 7 x64.
With default setting of VmBix (after VMs discovery has done), inbound network traffic is about 50 Mbps average. Almost all traffic is coming from vCenter. During monitoring used tools nload, nethogs and iftop.
For now, I disabled following items on Template VmBix VM Loadable Module:
Ballooned memory, Compressed memory, CPU Freq, CPU Overall Usage, CPU Ready, CPU Ready (%), CPU Total, CPU Used, Memory Latency, Private memory, Shared memory, Swapped memory, VM Tools mounted, VM Tools running, VM Tools status.
Also, increased Update interval on several items and Discovery rules.
Is there a way to determine which items are top consumers of bandwidth? How I can optimize network bandwidth usage on the Zabbix server with VmBix?
Please help
Getting the release 2.0 up and running was quite trivial on a centos 7 machine.
The issue I am now facing is that the datastore(s) cannot be monitored. It might be an vsan specific thing, but I have the following symptoms.
zabbix_get -s 127.0.0.1 -p 12050 -k datastore.discovery[*]
zabbix_get [19651]: Timeout while executing operation
And in the logging I see the following passing by:
Apr 13 11:56:27 cz01 vmbixd: 11:56:27.403 [Thread-2] INFO net.dav3860.VmBix - thread created, collecting data in 1 threads
Apr 13 11:56:29 cz01 vmbixd: 11:56:29.451 [Thread-2] INFO net.dav3860.VmBix - thread closed, collecting data in 0 threads
Apr 13 11:56:38 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:56:42 cz01 vmbixd: 11:56:42.555 [Thread-3] INFO net.dav3860.VmBix - thread created, collecting data in 1 threads
Apr 13 11:56:45 cz01 vmbixd: 11:56:45.254 [Thread-3] INFO net.dav3860.VmBix - thread closed, collecting data in 0 threads
Apr 13 11:57:08 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:57:17 cz01 vmbixd: 11:57:17.657 [Thread-4] INFO net.dav3860.VmBix - thread created, collecting data in 1 threads
Apr 13 11:57:17 cz01 vmbixd: Exception in thread "Thread-4" java.lang.ClassCastException: com.vmware.vim25.DatastoreInfo cannot be cast to com.vmware.vim25.VmfsDatastoreInfo
Apr 13 11:57:17 cz01 vmbixd: at net.dav3860.VmBix$Connection.getDatastores(VmBix.java:1673)
Apr 13 11:57:17 cz01 vmbixd: at net.dav3860.VmBix$Connection.checkAllPatterns(VmBix.java:716)
Apr 13 11:57:17 cz01 vmbixd: at net.dav3860.VmBix$Connection.run(VmBix.java:3219)
Apr 13 11:57:38 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:58:08 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:58:38 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:59:08 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 11:59:38 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 12:00:08 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Apr 13 12:00:38 cz01 vmsvc[14646]: [ warning] [guestinfo] Failed to get disk info.
Any ideas what is going on, the account that I use for monitoring has read-only access
Hi,
Today I upgraded a very old VmBix server to the current version 2.3.0.59. At the moment I use Low Level Discovery for Datastore and ESXi servers. The vsphere environment is 6.0.
I enabled the useuuid=true setting in the vmbix.conf.
I noticed that only VMFS datastores where discovered, the NAS datastores not. I noticed a "{#UUID}":"N/A" with all the NAS datastores. The UUID of VMFS datastores are correct.
I looked at the code and changed the following in de getDatastores function to make it work:
if (d != null) {
//Correction by Andrea for trap the NasDatastoreInfo
if (d.getInfo() instanceof NasDatastoreInfo)
{
NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostNasVolume naaName = dsInfo.getNas();
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", "N/A");
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName.getName());
jArray.add(jObject);
}
}
to:
if (d != null) {
//Correction by Andrea for trap the NasDatastoreInfo
if (d.getInfo() instanceof NasDatastoreInfo)
{
NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo();
if ( dsInfo != null ) {
HostNasVolume naaName = dsInfo.getNas();
JsonObject jObject = new JsonObject();
jObject.addProperty("{#DATASTORE}", d.getName());
//jObject.addProperty("{#UUID}", uuid);
jObject.addProperty("{#UUID}", dsInfo.url.substring(19, dsInfo.url.length() - 1) );
jObject.addProperty("{#CLUSTER}", d.getParent().getName());
jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess);
jObject.addProperty("{#NAA}", naaName.getName());
jArray.add(jObject);
}
}
I was inspired by the function getManagedEntityByUuid where the following is coded:
switch (meType) {
case "HostSystem":
HostSystem host = (HostSystem) ent;
HostListSummary hs = host.getSummary();
HostHardwareSummary hd = hs.getHardware();
meUuid = hd.getUuid();
break;
case "VirtualMachine":
VirtualMachine vm = (VirtualMachine) ent;
VirtualMachineConfigInfo vmcfg = vm.getConfig();
meUuid = vmcfg.getUuid();
break;
case "Datastore":
Datastore ds = (Datastore) ent;
DatastoreInfo dinfo = ds.getInfo();
meUuid = dinfo.url.substring(19, dinfo.url.length() - 1);
break;
}
CentOS Linux release 7.3.1611 (Core) + EPEL
java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el7_3.x86_64
vmbix installed from vmbix-2.6.0.157-1.x86_64.rpm
After some idle time (about 30 min) working it start return empty data:
#zabbix_get -s 127.0.0.1 -k "vmbix[esx.discovery,*]"
{"data":[]}
#zabbix_get -s 127.0.0.1 -k "vmbix[cluster.discovery]"
{"data":[]}
After restart it again working. Logs seems clean.
Log:
2017-03-24 18:35:19,398 INFO [main] [VmBix.java:260] creating pid file /var/run/vmbix.pid 10329
2017-03-24 18:35:22,305 INFO [main] [VmBix.java:489] starting server on 127.0.0.1/12050
2017-03-24 18:35:22,306 INFO [main] [VmBix.java:496] server started
2017-03-24 18:35:22,372 DEBUG [Thread-2] [VmBix.java:4142] Thread created, collecting data in 1 threads
2017-03-24 18:35:22,373 DEBUG [Thread-2] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 18:35:22,631 DEBUG [Thread-2] [VmBix.java:4168] Request took 258 ms
2017-03-24 18:35:24,666 DEBUG [Thread-2] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2017-03-24 18:40:24,059 DEBUG [Thread-3] [VmBix.java:4142] Thread created, collecting data in 1 threads
2017-03-24 18:40:24,060 DEBUG [Thread-3] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 18:40:24,278 DEBUG [Thread-3] [VmBix.java:4168] Request took 218 ms
2017-03-24 18:40:26,312 DEBUG [Thread-3] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2017-03-24 19:11:51,052 DEBUG [Thread-4] [VmBix.java:4142] Thread created, collecting data in 1 threads
2017-03-24 19:11:51,052 DEBUG [Thread-4] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 19:11:51,135 DEBUG [Thread-4] [VmBix.java:4168] Request took 83 ms
2017-03-24 19:11:53,168 DEBUG [Thread-4] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2017-03-24 19:11:54,713 DEBUG [Thread-5] [VmBix.java:4142] Thread created, collecting data in 1 threads
2017-03-24 19:11:54,714 DEBUG [Thread-5] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 19:11:54,739 DEBUG [Thread-5] [VmBix.java:4168] Request took 25 ms
2017-03-24 19:11:56,173 DEBUG [Thread-6] [VmBix.java:4142] Thread created, collecting data in 2 threads
2017-03-24 19:11:56,173 DEBUG [Thread-6] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 19:11:56,184 DEBUG [Thread-6] [VmBix.java:4168] Request took 11 ms
2017-03-24 19:11:56,783 DEBUG [Thread-5] [VmBix.java:4190] Thread closed, collecting data in 1 threads
2017-03-24 19:11:58,221 DEBUG [Thread-6] [VmBix.java:4190] Thread closed, collecting data in 0 threads
manual restart
2017-03-24 19:12:49,499 INFO [Thread-0] [VmBix.java:4200] Shutting down
2017-03-24 19:12:49,499 INFO [Thread-0] [VmBix.java:277] Pid file deleted.
2017-03-24 19:12:49,543 INFO [Thread-0] [VmBix.java:460] disconnected
2017-03-24 19:12:49,543 INFO [Thread-0] [VmBix.java:465] Shutted down
2017-03-24 19:12:51,221 INFO [main] [VmBix.java:260] creating pid file /var/run/vmbix.pid 17885
2017-03-24 19:12:54,363 INFO [main] [VmBix.java:489] starting server on 127.0.0.1/12050
2017-03-24 19:12:54,364 INFO [main] [VmBix.java:496] server started
2017-03-24 19:12:55,923 DEBUG [Thread-2] [VmBix.java:4142] Thread created, collecting data in 1 threads
2017-03-24 19:12:55,924 DEBUG [Thread-2] [VmBix.java:554] Parsing this request : ZBXD.........cluster.discovery
2017-03-24 19:12:56,096 DEBUG [Thread-2] [VmBix.java:4168] Request took 172 ms
2017-03-24 19:12:58,134 DEBUG [Thread-2] [VmBix.java:4190] Thread closed, collecting data in 0 threads
Hi
First thanks for the tool, is wonderful. Now we can monitor our retail vmware from zabbix
Just trying vmbix-discovery.py whith Zabbix 2.4 and get this error:
zabbix_api.ZabbixAPIException: (u'Error -32602: Invalid params., The "user.login" method must be called without the "auth" parameter. while sending {"params": {"password": "zabbix", "user": "Admin"}, "jsonrpc": "2.0", "method": "user.login", "auth": "", "id": 0}', -32602)
Can you tell if it will be fixed?
Thanks
It sure would be nice to get full documentation on what all of the variables mean in the config file and the implications of changing them from their default values.
Hi,
I've configured vmbix with wrapper to put discovered vms to different hostgroups but i've got some errors
CPU Ready has this error but value are OK
Network Rx&Tx have this error but no value
Error : Received value [] is not suitable for value type [Numeric (float)]
have you got an idea ?
Hi David,
Would it be possible to have an option to query for a counter by METRICNAME instead of METRICINSTANCE? For example, it's a bit difficult to remember that datastore uuid "52439c56-1b8dfea7-d162-002590980c38" is "datastore-08" when viewing it in Zabbix/VCenter.
Thanks!
Isamu
Will you be updating VMBIX to work with Zabbix v4
Hi, I was wondering if it would be possible to have the VM Power State return as one of the values from the VM discovery. We have a multi-tenant environment and in test cloud environment where there is a large number of VM which are powered off (hundred +) and I have noticed that Zabbix puts a lot of load on the vCenter server trying to retrieve data that is relevant. What I would like to do is filter the discovery so it does not add any VMs that are not powered ON.
I have also noticed an issue with the below two Zabbix cluster check which always return a value of 0, which is incorrect;
cluster.cpu[name,usage]
cluster.mem[name,free]
Hello,
I am trying to get a data from vcenter via vmbix on Zabbix 3.2.7 (CentOS7 and Ubuntu 16.04 LTS) but I cannot import this xml template. I tried several methods but looks like no way.
Import failed
Details
Created: Application "CPU" on "Template VmBix vCenter Loadable Module".
Created: Application "Datastore" on "Template VmBix vCenter Loadable Module".
Created: Application "ESX" on "Template VmBix vCenter Loadable Module".
Created: Application "Memory" on "Template VmBix vCenter Loadable Module".
Created: Application "Performance" on "Template VmBix vCenter Loadable Module".
Created: Application "Storage" on "Template VmBix vCenter Loadable Module".
Created: Application "vCenter" on "Template VmBix vCenter Loadable Module".
Created: Application "Virtual Machine" on "Template VmBix vCenter Loadable Module".
Created: Item "About" on "Template VmBix vCenter Loadable Module".
Created: Item "Latest event" on "Template VmBix vCenter Loadable Module".
Created: Item "VmBix Ping" on "Template VmBix vCenter Loadable Module".
Created: Discovery rule "Datastores" on "Template VmBix vCenter Loadable Module".
Created: Discovery rule "ESX Hosts" on "Template VmBix vCenter Loadable Module".
Created: Discovery rule "Virtual machines" on "Template VmBix vCenter Loadable Module".
Cannot find template "Template VmBix Datastore Loadable Module" for host prototype "{#DATASTORE}" of discovery rule "Datastores" on "Template VmBix vCenter Loadable Module".
Have you got any idea and/or solution for fix this issue?
Hello,
I'm having an issue trying to import the templates. Here is one of the errors:
Where am I going wrong?
Thanks!
Hi,
I have issues getting VmBix to work on my ubuntu zabbix 3.0.1 appliance.
I’m running zabbix version: zabbix_server (Zabbix) 3.0.1
Here is what I did so far:
• vmbix_2.5.0.151-1_amd64.deb
• vmbix-zabbix-module_1.0.16-zabbix-3.0-1_amd64.deb
/etc/zabbix/zabbix_server.conf
Zabbix log says the module is loading correctly:
Loading VmBix module configuration file /etc/zabbix/vmbix_module.conf
loaded modules: vmbix.so
Works
Exception in thread "main" java.lang.NullPointerException
at net.dav3860.VmBix.main(VmBix.java:224)
15:53:47.835 [Thread-0] INFO net.dav3860.VmBix - Shutting down
15:53:47.838 [Thread-0] ERROR net.dav3860.VmBix - Error disconnecting: null
15:53:47.838 [Thread-0] INFO net.dav3860.VmBix - Shutted down
I don’t understand this message and don’t know what to do.
serviceurl = https://vcenterappliance/sdk
username = [email protected]
password = adminpassword**
Configured zabbix:
This part is not completely clear to me:
7) Import template into zabbix
8) Created host with my vcenter server as hostname.
Also tried it with a dummy name vmbix which leads to nothing in my network.
(like the manual said : The IP address and port are not used, but it is necessary to make it monitored by the server/proxy running the loadable module.)
tail -f /var/log/vmbix.log
2016-09-20 16:14:06,513 DEBUG [Thread-76] [VmBix.java:4142] Thread created, collecting data in 1 threads
2016-09-20 16:14:06,514 DEBUG [Thread-76] [VmBix.java:554] Parsing this request : ZBXD+vm.powerstate[Vcenterserver.domain.local]
2016-09-20 16:14:06,514 ERROR [Thread-76] [VmBix.java:2603] An error occurred : null
2016-09-20 16:14:06,514 DEBUG [Thread-76] [VmBix.java:4168] Request took 0 ms
2016-09-20 16:14:07,530 DEBUG [Thread-77] [VmBix.java:4142] Thread created, collecting data in 2 threads
2016-09-20 16:14:07,530 DEBUG [Thread-77] [VmBix.java:554] Parsing this request : ZBXD'vm.status[Vcenterserver.domain.local]
2016-09-20 16:14:07,530 ERROR [Thread-77] [VmBix.java:1739] An error occurred : null
2016-09-20 16:14:07,531 DEBUG [Thread-77] [VmBix.java:4168] Request took 1 ms
2016-09-20 16:14:08,538 DEBUG [Thread-76] [VmBix.java:4190] Thread closed, collecting data in 1 threads
2016-09-20 16:14:09,553 DEBUG [Thread-77] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2016-09-20 16:14:26,822 DEBUG [Thread-78] [VmBix.java:4142] Thread created, collecting data in 1 threads
2016-09-20 16:14:26,822 DEBUG [Thread-78] [VmBix.java:554] Parsing this request : ZBXDevent.latest[*]
2016-09-20 16:14:26,823 ERROR [Thread-78] [VmBix.java:3042] An error occurred : null
2016-09-20 16:14:26,823 DEBUG [Thread-78] [VmBix.java:4168] Request took 1 ms
2016-09-20 16:14:27,844 DEBUG [Thread-79] [VmBix.java:4142] Thread created, collecting data in 2 threads
2016-09-20 16:14:27,844 DEBUG [Thread-79] [VmBix.java:554] Parsing this request : ZBXDping
2016-09-20 16:14:27,845 DEBUG [Thread-79] [VmBix.java:4168] Request took 1 ms
PuTTY2016-09-20 16:14:28,846 DEBUG [Thread-78] [VmBix.java:4190] Thread closed, collecting data in 1 threads
2016-09-20 16:14:29,873 DEBUG [Thread-79] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2016-09-20 16:15:08,406 DEBUG [Thread-80] [VmBix.java:4142] Thread created, collecting data in 1 threads
2016-09-20 16:15:08,407 DEBUG [Thread-80] [VmBix.java:554] Parsing this request : ZBXD,esx.connection[Vcenterserver.domain.local]
2016-09-20 16:15:08,407 ERROR [Thread-80] [VmBix.java:1511] An error occurred : null
2016-09-20 16:15:08,407 DEBUG [Thread-80] [VmBix.java:4168] Request took 0 ms
2016-09-20 16:15:10,444 DEBUG [Thread-80] [VmBix.java:4190] Thread closed, collecting data in 0 threads
2016-09-20 16:15:12,473 DEBUG [Thread-81] [VmBix.java:4142] Thread created, collecting data in 1 threads
2016-09-20 16:15:12,473 DEBUG [Thread-81] [VmBix.java:554] Parsing this request : ZBXD-esx.maintenance[Vcenterserver.domain.local]
2016-09-20 16:15:12,474 ERROR [Thread-81] [VmBix.java:1764] An error occurred : null
2016-09-20 16:15:12,474 DEBUG [Thread-81] [VmBix.java:4168] Request took 1 ms
Do I query the wrong object? what should I query and how?
When I try to query vmbix from the agent I get:
zabbix_get -s 127.0.0.1 -p 12050 -k vmbix.version 2.5.0.151
zabbix_get -s 127.0.0.1 -p 12050 -k "vm.discovery[]" zabbix_get [7288]: Check access restrictions in Zabbix agent configuration
zabbix_get -s 127.0.0.1 -p 12050 -k about[] zabbix_get [7986]: Check access restrictions in Zabbix agent configuration
Thanks a lot in advance!
Our fix was in the template, template_vmbix_vcenter.xml, references to vmbixget.py needs to be removed at lines 215, 257, 323 and 335
Could some please let me know what license the code is under? I had to do a fork for internal monitor project at my company and I need to ask if i can release updates and fixes.
Changes made:
thanks
Hi dav3860,
I configured VmBix following your manual from the Wiki page of this project. It seemed that everything works well until I configured to get notification in case of trigger status PROBLEM.
Since then, I get the following mail every 5 minutes:
Subject: PROBLEM: No response from VMBIX
Trigger: No response from VMBIX
Trigger status: PROBLEM
Trigger severity: Average
Trigger URL:
Item values:
1. VmBix Ping (vCenter:vmbix[ping]): 1
2. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
3. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
Original event ID: 8200
followed by another similar e-mail with subject "OK: No response from VMBIX".
I have Zabbix 3.0.3 installed on CentOS 7 x64 with VmBix 2.4.
Also, I noticed a big number of log files vmbix[date].log in the /var/log folder, each with size of 10 MB. I have the 7-8 such files per day. I attached my last vmbix.log.
In multiple graphs I see dotted line, and on several graphs sometimes there is no any data at all.
Please help
Thank you in advance
I have created an vmbixd service unit file, maybe you want the configuration
and adjust it to your own needs + package it into the debian repo?
[Unit]
Description=vmbixd
After=network.target
Before=zabbix-server.service
[Service]
ExecStart=/usr/bin/java -Dlogback.configurationFile=/etc/vmbix/logback.xml -jar /usr/local/vmbix/vmbix.jar -c /etc/vmbix/vmbix.conf -f /var/run/zabbix/vmbix.pid
Type=simple
User=zabbix
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
PIDFile=/var/run/zabbix/vmbix.pid
[Install]
WantedBy=multi-user.target
Hi love this tool... so much better performance and flexibility than Zabbix native VMware support.
I wonder though if it would be possible to get some sort of snapshot check in there... reason for asking is that I've on occasion seen snapshots drive VM's to freeze due to lack of DS space.
Although VmBix has DS checks it'll still be great to have snapshot checks, as snapshots have a tendency to be forgotten and just lie there.
Any chance for this to be implemented?
That said... this is one of the most useful tools in my daily work!!
I can run vmbix command and this returns values but when trying the start the Loadable module via my Zabbix Proxy it crashes my proxy
Hello
Current release makes the zabbix proxy crashes repeatedly, could you please make a new release which includes the nullpointer fixe?
Since zabbix 3.0 is out i can't use the vmbix modules, and i am slightly worried about installing maven and a full build environment on the servers to compile the last git version.
I have installed vmbix, but when I go to try I receive this message:
[root@vm34mz1 certs]# vmbix -P 12050 -u root -p MASKED -s https://10.1.64.130/sdk
Exception in thread "main" java.lang.NullPointerException
at net.djarvur.vmbix.VmBix.main(Unknown Source)
Shutting down
Error disconnecting: null
Shutted down
[root@vm34mz1 certs]# vmbix -P 12050 -u root -p vmware -s https://10.1.64.130/sdk
Exception in thread "main" java.lang.NullPointerException
at net.djarvur.vmbix.VmBix.main(Unknown Source)
Shutting down
Error disconnecting: null
Shutted down
[root@vm34mz1 certs]#
I put a ca-bundle certificate into the openssl directory but not works.
If I try with CURL it works fine:
[root@vm34mz1 certs]# curl -v -XGET https://10.1.64.130/sdk
subject: MASKED
start date: Feb 11 15:44:08 2014 GMT
expire date: Feb 11 15:44:08 2016 GMT
common name: MASKED
issuer: MASKED
< HTTP/1.1 404 Not FoundGET /sdk HTTP/1.1
User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Host: 10.1.64.130
Accept: /
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.