zbx-sadman / unifi_proxy

Fast client-server version of UniFi Miner
45 stars 21 forks source link

Zabbix Controller v6 -- import issues #41

Closed lslamp closed 3 years ago

lslamp commented 3 years ago

Greetings, Finding templates that work for unifi on zabbix is really not an easy task. I stumbled across your templates by accident while researching grafina possibilities. I have downloaded the templates but when I try to import them into zabbix, I get the error "Import failed No file was uploaded." Reading your issues page I saw someone suggested removing the screens. Iwill try this and see.

image

My question is, how will this work with unifi controller v6? Thanks Lawrence

lslamp commented 3 years ago

It seems that there is an issue with the unifi controller software version 6.

image

As you can see in teh image above, it says that the unifi version v6 is unknown. How can I try to resolve this? Thanks Lawrence

lslamp commented 3 years ago

I tried to add the following line CONTROLLER_VERSION_6 => 'v6', to the /usr/local/sbin/unifi_proxy.pl file, but that did not work I then changed the to use v5 instead. Then the proxy started. Now I have to see if things pass data

Lawrence

lslamp commented 3 years ago

Now that I seem to have the unifi.proxy running I tried to add the template "Template UBNT UGW - Unifi Controller v5 - active checks" I then get the following error. image

I hope that you have some time to advise. Thanks Lawrence

zbx-sadman commented 3 years ago

Hello

I have no access to installed Unifi Controller v6, and i did not inspect it API. This is a reason of utility incompatibility with v6 controller.

"Cannot find host interface" mean: you did not assign IP address to the host interface. It's not defect of the template.

lslamp commented 3 years ago

zbx-sadman,

I am very sorry if you misunderstood my intention. Your template is incredible, it is most definitely something on my side that I have done wrong or have configured. when you say that I do not have an ipaddress assigned to the host interface, can you please tell me how I get that so that I can test the template?

Thanks Lawrence

lslamp commented 3 years ago

I did some googling and as far as I can gather, at the min I have all my devices assigned to a DHCP ipaddress. Can you confirm that if I set the ipaddress to static, then there will be an ipaddress assigned to the interface. Is this what I have not done and is needed for the unifi.proxy to work

Thanks Lawrence

lslamp commented 3 years ago

I just thought about something that is still a little confusing to me. I have installed the controller software on Ubuntu Linux 20.04, the server ipaddress is 192.168.1.99. The actual controller has got the ipaddress 192.168.1.1, now if I am configuring the unifi.proxy config (/etc/unifi_proxy/unifi_proxy.conf), there is a config option UnifiLocation. I have pointed this to 192.168.1.99, is this correct? Should it be pointed to 192.168.1.1 I only assume the first option only because that is where all the stats are delivered from.

I very much appreciate your support here.

Thanks in advance. Lawrence

lslamp commented 3 years ago

UniFiLocation = https://192.168.1.99:8443

zbx-sadman commented 3 years ago

image

Pay attention to the item "Agent Interfaces". Template import error says literally: "The interface through which the request (Zabbix agent key) should be sent is not specified or not exist ".

https://www.zabbix.com/documentation/4.0/manual/config/hosts/host