Closed jrosetto closed 7 years ago
I have no Zabbix 3.x near real UniFi controller, but have Zabbix 3.2.3 & "empty" UniFi controller 4.8 at home. And i have tested unifi.so just now on my Debian Wheezy:
# ./zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 3.2.3
# ./zabbix_server -V
zabbix_server (Zabbix) 3.2.3
# cd /home/test/zabbix-3.2.3
#./configure
*** wait for prepare sources , download unifi.so sources to ./src/modules/unifi and etc.***
#cd src/modules/unifi
#make
gcc -fPIC -shared -o unifi.so unifi.c -I ../../../include ; chown zabbix:zabbix unifi.so ; chmod 644 unifi.so
#mkdir /usr/local/lib/zabbix
#mv -f ./unifi.so /usr/local/lib/zabbix/
*** copy unifi.conf to %LoadModulePath% (/usr/local/lib/zabbix), edit zabbix_agentd.conf ***
# service zabbix-agent restart
Stopping Zabbix agent: zabbix_agentd.
Starting Zabbix agent: zabbix_agentd.
# zabbix_agentd -t "unifi.alive"
unifi.alive [u|1]
#zabbix_agentd -t "unifi.proxy[discovery,wlan]"
unifi.proxy[discovery,wlan] [s|{"data":[{"{#SITENAME}":"default","{#NAME}":"aone","{#SITEID}":"574aa983adad2853a98587dc","{#ID}":"574aa9d4adad2853a98587ec","{#SITEDESC}":"Default"}]}]
So, i haven't problem, as you see...
Now I am getting "unsupported module "unifi.so" version: 2" in the zabbix_agent.log. Any chance I could try the unifi.so you have compiled as a last ditch effort?
I found some differences in the requirements for source code of Zabbix 3.2 loadable modules.
Now the source code is modified in strict accordance with the requirements of Zabbix 3.2 (i think so), try it: https://github.com/zbx-sadman/unifi_proxy/tree/master/src/modules/zbx_unifi_Zabbix_3_2
My _zabbixagentd.log (level 4):
30583:20170227:225008.255 Starting Zabbix Agent [Zabbix server]. Zabbix 3.2.3 (revision 64610).
30583:20170227:225008.255 **** Enabled features ****
30583:20170227:225008.255 IPv6 support: YES
30583:20170227:225008.255 TLS support: YES
30583:20170227:225008.255 **************************
30583:20170227:225008.255 using configuration file: /etc/zabbix/zabbix_agentd.conf
30583:20170227:225008.255 In zbx_load_modules()
30583:20170227:225008.255 loading module "/usr/local/lib/zabbix/unifi.so"
30583:20170227:225008.255 unifi.so: init module stage
30583:20170227:225008.255 unifi.so: load & parse config stage. Config file is /usr/local/lib/zabbix/unifi.conf
30583:20170227:225008.255 cfg: para: [UniFiProxyServer] val [127.0.0.1]
30583:20170227:225008.255 accepted configuration parameter: 'UniFiProxyServer' = '127.0.0.1'
30583:20170227:225008.255 cfg: para: [UniFiProxyPort] val [8448]
30583:20170227:225008.255 accepted configuration parameter: 'UniFiProxyPort' = '8448'
30583:20170227:225008.255 unifi.so: UniFi Proxy host is '127.0.0.1:8448'
30583:20170227:225008.255 loaded modules: unifi.so
30583:20170227:225008.255 End of zbx_load_modules():SUCCEED
And _zabbixagentd's output:
# zabbix_agentd -t "unifi.proxy[discovery,wlan]"
unifi.proxy[discovery,wlan] [s|{"data":[{"{#SITENAME}":"default","{#NAME}":"aone","{#SITEID}":"574aa983adad2853a98587dc","{#ID}":"574aa9d4adad2853a98587ec","{#SITEDESC}":"Default"}]}]
Works beautifully. Thanks for the quick fix.
Spoke to soon. I am not getting all of the data items from zabbix, only a few that are simple checks. I have waited 6 hours just to make sure it wasn't delayed somehow. It looks like nine of the zabbix active checks are not working but they have not gone to 'Not Supported' in zabbix.
https://s15.postimg.org/wtv3uefkb/img1.png https://s10.postimg.org/pfqjrh8sp/img2.png
I turned debugging on the zabbix agent
19889:20170228:143211.730 End of need_meta_update():FAIL 19889:20170228:143211.731 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>25&rssi<=40].rssi",,0]] received value [0] 19889:20170228:143211.731 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>25&rssi<=40].rssi",,0]' value:'0' 19889:20170228:143211.731 In send_buffer() host:'192.168.5.20' port:10051 entries:2/100 19889:20170228:143211.731 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.731 End of send_buffer():SUCCEED 19889:20170228:143211.731 buffer: new element 2 19889:20170228:143211.731 End of process_value():SUCCEED 19889:20170228:143211.731 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>25&rssi<=40].rssi",,0] 19889:20170228:143211.731 End of need_meta_update():FAIL 19889:20170228:143211.731 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>40].rssi",,0]] received value [0] 19889:20170228:143211.731 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>40].rssi",,0]' value:'0' 19889:20170228:143211.732 In send_buffer() host:'192.168.5.20' port:10051 entries:3/100 19889:20170228:143211.732 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.732 End of send_buffer():SUCCEED 19889:20170228:143211.732 buffer: new element 3 19889:20170228:143211.732 End of process_value():SUCCEED 19889:20170228:143211.732 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:0a].[rssi>40].rssi",,0] 19889:20170228:143211.732 End of need_meta_update():FAIL 19889:20170228:143211.732 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<10].rssi",,0]] received value [0] 19889:20170228:143211.732 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<10].rssi",,0]' value:'0' 19889:20170228:143211.732 In send_buffer() host:'192.168.5.20' port:10051 entries:4/100 19889:20170228:143211.732 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.732 End of send_buffer():SUCCEED 19889:20170228:143211.732 buffer: new element 4 19889:20170228:143211.732 End of process_value():SUCCEED 19889:20170228:143211.732 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<10].rssi",,0] 19889:20170228:143211.732 End of need_meta_update():FAIL 19889:20170228:143211.733 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<20].rssi",,0]] received value [0] 19889:20170228:143211.733 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<20].rssi",,0]' value:'0' 19889:20170228:143211.733 In send_buffer() host:'192.168.5.20' port:10051 entries:5/100 19889:20170228:143211.733 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.733 End of send_buffer():SUCCEED 19889:20170228:143211.733 buffer: new element 5 19889:20170228:143211.733 End of process_value():SUCCEED 19889:20170228:143211.733 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<20].rssi",,0] 19889:20170228:143211.733 End of need_meta_update():FAIL 19889:20170228:143211.734 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<30].rssi",,0]] received value [0] 19889:20170228:143211.734 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<30].rssi",,0]' value:'0' 19889:20170228:143211.734 In send_buffer() host:'192.168.5.20' port:10051 entries:6/100 19889:20170228:143211.734 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.734 End of send_buffer():SUCCEED 19889:20170228:143211.734 buffer: new element 6 19889:20170228:143211.734 End of process_value():SUCCEED 19889:20170228:143211.734 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<30].rssi",,0] 19889:20170228:143211.734 End of need_meta_update():FAIL 19889:20170228:143211.735 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<=10].rssi",,0]] received value [0] 19889:20170228:143211.735 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<=10].rssi",,0]' value:'0' 19889:20170228:143211.735 In send_buffer() host:'192.168.5.20' port:10051 entries:7/100 19889:20170228:143211.735 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.735 End of send_buffer():SUCCEED 19889:20170228:143211.735 buffer: new element 7 19889:20170228:143211.735 End of process_value():SUCCEED 19889:20170228:143211.735 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi<=10].rssi",,0] 19889:20170228:143211.735 End of need_meta_update():FAIL 19889:20170228:143211.736 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>10&rssi<=15].rssi",,0]] received value [0] 19889:20170228:143211.736 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>10&rssi<=15].rssi",,0]' value:'0' 19889:20170228:143211.736 In send_buffer() host:'192.168.5.20' port:10051 entries:8/100 19889:20170228:143211.736 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.736 End of send_buffer():SUCCEED 19889:20170228:143211.736 buffer: new element 8 19889:20170228:143211.736 End of process_value():SUCCEED 19889:20170228:143211.736 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>10&rssi<=15].rssi",,0] 19889:20170228:143211.736 End of need_meta_update():FAIL 19889:20170228:143211.737 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>15&rssi<=25].rssi",,0]] received value [0] 19889:20170228:143211.737 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>15&rssi<=25].rssi",,0]' value:'0' 19889:20170228:143211.737 In send_buffer() host:'192.168.5.20' port:10051 entries:9/100 19889:20170228:143211.737 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.737 End of send_buffer():SUCCEED 19889:20170228:143211.737 buffer: new element 9 19889:20170228:143211.737 End of process_value():SUCCEED 19889:20170228:143211.737 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>15&rssi<=25].rssi",,0] 19889:20170228:143211.737 End of need_meta_update():FAIL 19889:20170228:143211.738 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>25&rssi<=40].rssi",,0]] received value [0] 19889:20170228:143211.738 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>25&rssi<=40].rssi",,0]' value:'0' 19889:20170228:143211.738 In send_buffer() host:'192.168.5.20' port:10051 entries:10/100 19889:20170228:143211.740 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.740 End of send_buffer():SUCCEED 19889:20170228:143211.740 buffer: new element 10 19889:20170228:143211.740 End of process_value():SUCCEED 19889:20170228:143211.740 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>25&rssi<=40].rssi",,0] 19889:20170228:143211.740 End of need_meta_update():FAIL 19889:20170228:143211.741 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>40].rssi",,0]] received value [0] 19889:20170228:143211.741 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>40].rssi",,0]' value:'0' 19889:20170228:143211.741 In send_buffer() host:'192.168.5.20' port:10051 entries:11/100 19889:20170228:143211.741 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.741 End of send_buffer():SUCCEED 19889:20170228:143211.741 buffer: new element 11 19889:20170228:143211.741 End of process_value():SUCCEED 19889:20170228:143211.741 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:c4:2f].[rssi>40].rssi",,0] 19889:20170228:143211.741 End of need_meta_update():FAIL 19889:20170228:143211.741 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<10].rssi",,0]] received value [0] 19889:20170228:143211.742 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<10].rssi",,0]' value:'0' 19889:20170228:143211.742 In send_buffer() host:'192.168.5.20' port:10051 entries:12/100 19889:20170228:143211.742 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.742 End of send_buffer():SUCCEED 19889:20170228:143211.742 buffer: new element 12 19889:20170228:143211.742 End of process_value():SUCCEED 19889:20170228:143211.742 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<10].rssi",,0] 19889:20170228:143211.742 End of need_meta_update():FAIL 19889:20170228:143211.742 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<20].rssi",,0]] received value [0] 19889:20170228:143211.742 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<20].rssi",,0]' value:'0' 19889:20170228:143211.743 In send_buffer() host:'192.168.5.20' port:10051 entries:13/100 19889:20170228:143211.743 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.743 End of send_buffer():SUCCEED 19889:20170228:143211.743 buffer: new element 13 19889:20170228:143211.743 End of process_value():SUCCEED 19889:20170228:143211.743 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<20].rssi",,0] 19889:20170228:143211.743 End of need_meta_update():FAIL 19889:20170228:143211.743 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<30].rssi",,0]] received value [0] 19889:20170228:143211.743 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<30].rssi",,0]' value:'0' 19889:20170228:143211.743 In send_buffer() host:'192.168.5.20' port:10051 entries:14/100 19889:20170228:143211.744 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.744 End of send_buffer():SUCCEED 19889:20170228:143211.744 buffer: new element 14 19889:20170228:143211.744 End of process_value():SUCCEED 19889:20170228:143211.744 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<30].rssi",,0] 19889:20170228:143211.744 End of need_meta_update():FAIL 19889:20170228:143211.744 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<=10].rssi",,0]] received value [0] 19889:20170228:143211.744 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<=10].rssi",,0]' value:'0' 19889:20170228:143211.744 In send_buffer() host:'192.168.5.20' port:10051 entries:15/100 19889:20170228:143211.744 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.745 End of send_buffer():SUCCEED 19889:20170228:143211.745 buffer: new element 15 19889:20170228:143211.745 End of process_value():SUCCEED 19889:20170228:143211.745 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi<=10].rssi",,0] 19889:20170228:143211.745 End of need_meta_update():FAIL 19889:20170228:143211.745 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>10&rssi<=15].rssi",,0]] received value [0] 19889:20170228:143211.745 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>10&rssi<=15].rssi",,0]' value:'0' 19889:20170228:143211.745 In send_buffer() host:'192.168.5.20' port:10051 entries:16/100 19889:20170228:143211.745 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.748 End of send_buffer():SUCCEED 19889:20170228:143211.748 buffer: new element 16 19889:20170228:143211.748 End of process_value():SUCCEED 19889:20170228:143211.748 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>10&rssi<=15].rssi",,0] 19889:20170228:143211.748 End of need_meta_update():FAIL 19889:20170228:143211.749 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>15&rssi<=25].rssi",,0]] received value [0] 19889:20170228:143211.749 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>15&rssi<=25].rssi",,0]' value:'0' 19889:20170228:143211.749 In send_buffer() host:'192.168.5.20' port:10051 entries:17/100 19889:20170228:143211.749 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.749 End of send_buffer():SUCCEED 19889:20170228:143211.749 buffer: new element 17 19889:20170228:143211.749 End of process_value():SUCCEED 19889:20170228:143211.749 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>15&rssi<=25].rssi",,0] 19889:20170228:143211.749 End of need_meta_update():FAIL 19889:20170228:143211.749 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>25&rssi<=40].rssi",,0]] received value [0] 19889:20170228:143211.750 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>25&rssi<=40].rssi",,0]' value:'0' 19889:20170228:143211.750 In send_buffer() host:'192.168.5.20' port:10051 entries:18/100 19889:20170228:143211.750 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.750 End of send_buffer():SUCCEED 19889:20170228:143211.750 buffer: new element 18 19889:20170228:143211.750 End of process_value():SUCCEED 19889:20170228:143211.750 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>25&rssi<=40].rssi",,0] 19889:20170228:143211.750 End of need_meta_update():FAIL 19889:20170228:143211.750 for key [unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>40].rssi",,0]] received value [0] 19889:20170228:143211.750 In process_value() key:'Unifi:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>40].rssi",,0]' value:'0' 19889:20170228:143211.751 In send_buffer() host:'192.168.5.20' port:10051 entries:19/100 19889:20170228:143211.751 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.751 End of send_buffer():SUCCEED 19889:20170228:143211.751 buffer: new element 19 19889:20170228:143211.751 End of process_value():SUCCEED 19889:20170228:143211.751 In need_meta_update() key:unifi.proxy[pcount,user,default,"[ap_mac=f0:9f:c2:23:d0:0d].[rssi>40].rssi",,0] 19889:20170228:143211.751 End of need_meta_update():FAIL 19889:20170228:143211.752 for key [unifi.proxy[sum,uap,default,"stat.tx_dropped",,0]] received value [2920155] 19889:20170228:143211.752 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"stat.tx_dropped",,0]' value:'2920155' 19889:20170228:143211.752 In send_buffer() host:'192.168.5.20' port:10051 entries:20/100 19889:20170228:143211.753 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.753 End of send_buffer():SUCCEED 19889:20170228:143211.753 buffer: new element 20 19889:20170228:143211.753 End of process_value():SUCCEED 19889:20170228:143211.753 In need_meta_update() key:unifi.proxy[sum,uap,default,"stat.tx_dropped",,0] 19889:20170228:143211.753 End of need_meta_update():FAIL 19889:20170228:143211.754 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",,0]] received value [0] 19889:20170228:143211.754 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",,0]' value:'0' 19889:20170228:143211.754 In send_buffer() host:'192.168.5.20' port:10051 entries:21/100 19889:20170228:143211.754 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.754 End of send_buffer():SUCCEED 19889:20170228:143211.755 buffer: new element 21 19889:20170228:143211.755 End of process_value():SUCCEED 19889:20170228:143211.755 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",,0] 19889:20170228:143211.755 End of need_meta_update():FAIL 19889:20170228:143211.756 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9de,0]] received value [0] 19889:20170228:143211.756 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9de,0]' value:'0' 19889:20170228:143211.756 In send_buffer() host:'192.168.5.20' port:10051 entries:22/100 19889:20170228:143211.756 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.756 End of send_buffer():SUCCEED 19889:20170228:143211.756 buffer: new element 22 19889:20170228:143211.756 End of process_value():SUCCEED 19889:20170228:143211.756 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9de,0] 19889:20170228:143211.756 End of need_meta_update():FAIL 19889:20170228:143211.758 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9e1,0]] received value [0] 19889:20170228:143211.758 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9e1,0]' value:'0' 19889:20170228:143211.758 In send_buffer() host:'192.168.5.20' port:10051 entries:23/100 19889:20170228:143211.758 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.758 End of send_buffer():SUCCEED 19889:20170228:143211.758 buffer: new element 23 19889:20170228:143211.758 End of process_value():SUCCEED 19889:20170228:143211.760 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec91e4b0c47d8f06f9e1,0] 19889:20170228:143211.760 End of need_meta_update():FAIL 19889:20170228:143211.761 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec92e4b0c47d8f06f9e4,0]] received value [0] 19889:20170228:143211.761 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec92e4b0c47d8f06f9e4,0]' value:'0' 19889:20170228:143211.761 In send_buffer() host:'192.168.5.20' port:10051 entries:24/100 19889:20170228:143211.761 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.761 End of send_buffer():SUCCEED 19889:20170228:143211.761 buffer: new element 24 19889:20170228:143211.761 End of process_value():SUCCEED 19889:20170228:143211.762 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec92e4b0c47d8f06f9e4,0] 19889:20170228:143211.762 End of need_meta_update():FAIL 19889:20170228:143211.763 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec94e4b0c47d8f06f9e7,0]] received value [0] 19889:20170228:143211.763 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec94e4b0c47d8f06f9e7,0]' value:'0' 19889:20170228:143211.763 In send_buffer() host:'192.168.5.20' port:10051 entries:25/100 19889:20170228:143211.763 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.763 End of send_buffer():SUCCEED 19889:20170228:143211.763 buffer: new element 25 19889:20170228:143211.763 End of process_value():SUCCEED 19889:20170228:143211.763 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec94e4b0c47d8f06f9e7,0] 19889:20170228:143211.763 End of need_meta_update():FAIL 19889:20170228:143211.764 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec95e4b0c47d8f06f9ea,0]] received value [0] 19889:20170228:143211.765 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec95e4b0c47d8f06f9ea,0]' value:'0' 19889:20170228:143211.765 In send_buffer() host:'192.168.5.20' port:10051 entries:26/100 19889:20170228:143211.765 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.765 End of send_buffer():SUCCEED 19889:20170228:143211.765 buffer: new element 26 19889:20170228:143211.765 End of process_value():SUCCEED 19889:20170228:143211.765 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec95e4b0c47d8f06f9ea,0] 19889:20170228:143211.765 End of need_meta_update():FAIL 19889:20170228:143211.766 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec96e4b0c47d8f06f9ed,0]] received value [0] 19889:20170228:143211.766 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec96e4b0c47d8f06f9ed,0]' value:'0' 19889:20170228:143211.766 In send_buffer() host:'192.168.5.20' port:10051 entries:27/100 19889:20170228:143211.767 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.767 End of send_buffer():SUCCEED 19889:20170228:143211.767 buffer: new element 27 19889:20170228:143211.768 End of process_value():SUCCEED 19889:20170228:143211.768 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec96e4b0c47d8f06f9ed,0] 19889:20170228:143211.768 End of need_meta_update():FAIL 19889:20170228:143211.769 for key [unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec98e4b0c47d8f06f9f0,0]] received value [0] 19889:20170228:143211.769 In process_value() key:'Unifi:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec98e4b0c47d8f06f9f0,0]' value:'0' 19889:20170228:143211.769 In send_buffer() host:'192.168.5.20' port:10051 entries:28/100 19889:20170228:143211.769 send_buffer() now:1488310331 lastsent:1488310331 now-lastsent:0 BufferSend:5; will not send now 19889:20170228:143211.769 End of send_buffer():SUCCEED 19889:20170228:143211.769 buffer: new element 28 19889:20170228:143211.770 End of process_value():SUCCEED 19889:20170228:143211.770 In need_meta_update() key:unifi.proxy[sum,uap,default,"vap_table.rx_errors",58adec98e4b0c47d8f06f9f0,0] 19889:20170228:143211.770 End of need_meta_update():FAIL
I am running
Unifi Controller 5.4.11 7xUnifi AP AC Pro 3.7.39.6089 Zabbix Server 3.2.1 Zabbix Agent 3.2.1
Any suggestions?
Are you finished setting up agent and "Active mode" related options is filled correctly?
ServerActive=<Unifi Controller IP>
Hostname=<hostname from zabbix's web interface>
Just check from Zabbix Server side that UniFi Proxy & unifi.so is working in "passive mode" :
zabbix_get -s <agent's ip with unifi.so> -k "unifi.proxy[sum,uap,default,adopted]"
You must see number of adopted UAP's on the "default" site.
Just switched all the items from active checks to regular checks and data is starting to populate. Not sure why the active checks are not working as I have quite a few other clients doing active checks just fine.
I am hosting the Unifi Controller in house and the UAP's are talking to the controller from other locations.
Is there another way other than ICMP to check if they are alive? In the controller interface it knows they are functioning from a heartbeat I believe, is there a way to pull this instead of ICMP?
If I have to use ICMP I am going to have to have an IPSEC to every location that we install these to be able to ping their network which isn't practical for residential installs.
Thanks for all your help, it is greatly appreciated.
I don't know why yours agent does not work in active mode :( But i think that passive mode is enough for 7 UAPs. Active mode is much better for a big installations.
You can use 'state' as key of metric to detect state of every UAP. Refer to unifi.proxy[get,uap,{#SITENAME},state,{#ID}] prototype in UniFi Access Points discovery rule, which you can find in template.
Item's description field contain all known values of 'state' metric and you can make your own trigger for some states. Also you can see example of 'state' related trigger in triggers prototype section.
The 'state' works great for my situation.
I only have one site with 7 on the controller right now, but I have about 20 other installs to add as well. I don't see the number doing anything except growing in the near future so I will have to tackle the active checks when it becomes an issue.
Thanks again for all your help.
I hope that you can resolve active checks problem.
One more question: can you share cache file for AC Pro access point? I have no access to this model and i want inspect it to get specific AC-proto related metric.
Please, email to me if you want share data.
I'm a little new to the Unifi stuff, usually go with Mikrotik. Can you walk me through getting what you are looking for?
UniFi Proxy cache placed on /dev/shm on default (/etc/unifi_proxy/unifi_proxy.conf -> CacheDir) and contains all data fetched from UniFi controller.
File named like as https___localhost_8443_api_s_default\stat_device_ contain metrics of all devices adopted on some site. You can send me the whole file or UAP AC pro related part of it.
Email placed on main page of my github area. Tanx.
I am running Zabbix-Server 3.2.1. I have compiled unifi using the 3.2.1 source code but when I load the zabbix-agent I get this error.
cannot load module "unifi.so": /usr/local/lib/zabbix/unifi.so: undefined symbol: zbx_tcp_recv_line
Any suggestions?