dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
83 stars 31 forks source link

Connect a Proxy Server from Zabbix 3.0 to a vPooler Server #263

Closed lmadgin closed 5 years ago

lmadgin commented 5 years ago

I created a new vPoller and I try to connect it with my new Proxy Zabbix 3.0. I think I have done all the installations as it is installed on my old environment.

But the log of my new proxy say that the new vPoller does not respond. And the vPoller logs did not mention any requests received.

Here is an example of my Proxy log: 87174:20190402:185904.396 Did not receive response from vPoller, giving up. 87174:20190402:185904.396 Closing socket and re-establishing connection to vPoller... 87174:20190402:185904.397 End of get_value_simple():NOTSUPPORTED 87174:20190402:185904.397 Item [bo2-inf-vcr-001.ycsdev.io:vpoller["about", "{HOST.HOST}", "null", "apiVersion", "null"]] error: Did not receive response from vPoller 87174:20190402:185904.397 End of get_value():NOTSUPPORTED 87174:20190402:185904.397 In activate_host() hostid:10728 itemid:35934 type:3 87174:20190402:185904.398 End of activate_host()

dnaeon commented 5 years ago

Please post your config files of the vpoller-proxy, vpoller-worker and the Zabbix module itself.

It seems like you have not pointed the Zabbix vPoller module to the correct vpoller-proxy endpoint.

lmadgin commented 5 years ago

Here is the information of my Proxy Zabbix 3.0

[root@bo2-inf-mon-002 ~]# sudo hostnamectl; Static hostname: bo2-inf-mon-002 Icon name: computer-vm Virtualization: vmware Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-957.1.3.el7.x86_64 Architecture: x86-64

# This is the configuration file for the vPoller loadable module. # For more information about vPoller, ``# please visit https://github.com/dnaeon/py-vpoller

### Option: vPollerTimeout # Specifies the timeout period for vPoller task requests. # The timeout value is in milliseconds. # # Mandatory: no # Range: 1000-60000 # Default: # vPollerTimeout=10000

### Option: vPollerRetries # Specifies how many times a vPoller task requests can be retried. # # Mandatory: no # Range: 1-100 # Default: ``# vPollerRetries=1

### Option: vPollerProxy # Specifies the vPoller Proxy endpoint to which new # task requests will be sent. # # Mandatory: no # Default: vPollerProxy=tcp://bo2-inf-mon-003.ycsdev.io:10123 ``

lmadgin commented 5 years ago

Here is the information of my vPoller

[root@bo2-inf-mon-003 ~]# sudo hostnamectl; Static hostname: bo2-inf-mon-003 Icon name: computer-vm Virtualization: vmware Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-957.1.3.el7.x86_64 Architecture: x86-64

[root@bo2-inf-mon-003 ~]# cat /etc/vpoller/vpoller.conf [proxy] frontend = tcp://:10123 backend = tcp://:10124 mgmt = tcp://*:9999

[worker] db = /var/lib/vconnector/vconnector.db proxy = tcp://localhost:10124 mgmt = tcp://*:10000 helpers = vpoller.helpers.zabbix,vpoller.helpers.czabbix tasks = vpoller.vsphere.tasks

[cache] enabled = True maxsize = 0 ttl = 3600 housekeeping = 480

lmadgin commented 5 years ago

After a long circle, I found my problem. It was an access issue, the Zabbix account had no rights to the vpoller_module.conf file.

So with the following command: chown root.zabbix /etc/zabbix/vpoller_module.conf It changes the root group to that of Zabbix, which now has the right to read, here is the result:

[root@bo2-inf-mon-002 ~]# ls -lah /etc/zabbix/ total 36K drwxr-xr-x 3 root root 107 Apr 15 15:26 . drwxr-xr-x. 88 root root 8.0K Apr 15 14:05 .. -rw-r----- 1 root zabbix 705 Apr 15 14:17 vpoller_module.conf -rw-r--r-- 1 root root 796 Apr 15 14:01 zabbix_agentd.conf drwxr-xr-x 2 root root 108 Jan 28 15:43 zabbix_agentd.d -rw-r----- 1 root zabbix 16K Apr 2 18:45 zabbix_proxy.conf