zbx-sadman / unifi_proxy

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

unifi_proxy generated triggers disappear from maps... #26

Closed mmorgan-github closed 6 years ago

mmorgan-github commented 6 years ago

We've got a problem that we were hoping you could help us with. We're using the latest version of unifi_proxy with Zabbix 3.4.8. We've made a map that has an ICMP trigger for each access point so that we can see if they're up or not. Occasionally, the unifi controller (which has unifi_proxy on it) will lose communication with the access points for some reason. When it does, after a period of time, the triggers disappear from the map. The icons are still there, but the trigger that was configured for ICMP is gone. The strange thing is that the ICMP item and trigger are still in Zabbix. The problem appears to just be with the map. This doesn't happen with any other equipment that we've made maps for. It appears to be specific to any item generated from the unifi_proxy. Have you ever experienced this behavior before? If so, what was causing the problem? If not, what would you suggest I do to troubleshoot the map? I'm not sure where to start.

zbx-sadman commented 6 years ago

How much time passes between the loss of ping and the problem with the map?

Template's discovery rule creates icmpping[{#IP}] item with simple check type. Zabbix manual say to us: "Note that Zabbix agent is not needed for simple checks. Zabbix server/proxy is responsible for the processing of simple checks (making external connections, etc)". Therefore UniFi Proxy script or Zabbix agent on UniFi host make no any action to change this key value.

But Zabbix server can drop all items of specific UAP if it not discovery on some round and re-creates they when its begin discovered again. After that you can see items with the same keys in Zabbix interface. But discovered items do not added to any map automatically.

I have only this idea.

mmorgan-github commented 6 years ago

Thanks for getting back to me. I fix the triggers on the map and they usually disappear again after a day or two. But, I had a switch at a remote site go out yesterday so the whole site went down. There are two Rocket AC’s at that site that are not controlled by UniFi (they’re SNMPv1 in Zabbix). Their triggers did not disappear from the map. But, the three UniFi AP-AC-Pro’s at that site that are on the UniFi controller and do communicate to Zabbix via the Unifi Proxy did have their triggers disappear from the map. That’s why I contacted you. I think you are correct about the discovery. But, I don’t understand why the triggers themselves are still in Zabbix. They just aren’t on the map anymore. I wonder if there is a way to configure Zabbix to wait longer before removing things? Would you happen to know how to configure that?

mmorgan-github commented 6 years ago

FYI: I’m going to raise the discovery interval for all UniFi templates from 10 minutes to 1 hour. While it can’t possibly solve the problem, it might help reduce the frequency that triggers get lost. Thanks for your feedback.

zbx-sadman commented 6 years ago

You must just increase Keep lost resources period (in days) option on UniFi Access Points discovery rule. And you do not need to change the Discovery interval time.

mmorgan-github commented 6 years ago

Ah! Thank you. I’ll do that right now.