dav3860 / vmbix

Fork of vmbix, a TCP proxy for querying a VMWare infrastucture with Zabbix
53 stars 19 forks source link

NullPointerException - No data #38

Open dannycanero opened 7 years ago

dannycanero commented 7 years ago

Installation:

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.

Issue

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.

dav3860 commented 7 years ago

Hi, It may be related to vSphere 6.5, VmBix was compiled against yavijava 6.0. Can you check if you can query a internal VmBix method, like vmbix.version ? zabbix_get -s 127.0.01 -p 12050 -k "vmbix.version"

If it works, it means that you can query VmBix, but that there is an issue with the VMWare SDK.

dannycanero commented 7 years ago

Hi Dav,

Thank you for your response.

I've ran the command and it seems to be getting the data. It's highly possible that the SDK for vSPhere 6.5 is the culprit. I will try to add the ESXi hosts seperatly and see if I can monitor the hosts in Zabbix with the templates.

I'll keep you posted in the meantime.

zabbix_get -s 127.0.0.1 -p 12050 -k "vmbix.version" 2.6.0.157