"Persistence accomplishes the impossible."
Chinese proverb.
Continuing the article published in the last post, I will now demonstrate how to update the firmware and enable the snmp protocol to zabbix be able to monitor the APs.
How to update the firmware of a Ubiquiti Unifi device?
1 – Acesse a interface da controladora Unifi do seu dispositivo ubiquiti.
Note that the example version is already in 5.9.29:
2 -After accessing the system, you will see an interface similar to this:
3 – Ao clicar no botão “DEVICES”, você verá uma tela como abaixo. Note a mensagem informando que existe um update de firmware disponível:
4 – clique em “upgrade” e confirme a ação clicando no botão “CONFIRM”.
5 – Aguarde o fim da instalação.
6 – Após a conclusão da instalação você poderá ver que o número da versão foi alterado e o botão “UPGRADE” não se encontra mais disponível.
7 – Agora vamos proceder com a ativação do protocolo SNMP, permitindo ao zabbix a coleta dos dados do AP atualizado. Clique no botao “SETTINGS”, selecione a opção “Services” e clique em “SNMP”.
8 – Clique em enable, configure a “Community String” para community do seu ambiente. Neste caso, usei a community public. Clique no botão “APPLY CHANGES” e será exibida a mensagem abaixo informando que suas alterações foram efetuadas com sucesso.
9 – Aguarde as alterações serem aplicadas no AP.
10 – Então você verá no zabbix os dados coletados.
Mas, e se algo der errado? Então continue lendo…
Firmware Ubiquiti does not update.
If the firmware is not updated, you will see the figure below, showing that the data is not being collected correctly.
In general the procedure is relatively simple, but, I will demonstrate all of them.
Method 1: Disable WLAN Group.
Simply access the AP configuration and set the WLAN option to OFF. Wait for the change to be applied, and after completion, you can restart the procedure described earlier.
Método 2 – Update manual via SSH
You should access the Ubiquiti Firmware downloads session at:
https://www.ubnt.com/download/unifi/
And then download the firmware corresponding to your AP.
In my specific case for the UAP-LR model the url was this:
root@localhost:/downloads# wget https://dl.ubnt.com/unifi/firmware/BZ2/4.0.10.9653/BZ.ar7240.v4.0.10.9653.181205.1311.bin
Is recommended to access the AP by ssh before updating, which can be done as follows:
You must execute the following command to transfer the new firmware to the AP:
scp BZ.ar7240.v4.0.10.9653.181205.1311.bin admin@10.3.2.254:/tmp/fwupdate.bin
Re-access AP ssh and run the following command to apply the upgrade:
syswrapper.sh upgrade2 &
Then the AP will reboot:
Método 3 – Esquecer o AP antes de atualizar o firmware
Se os métodos anteriores falharem, você deverá atualizar o AP sem tê-lo adotado. Ou seja, antes da atualização você deverá esquecer o AP. O caminho é “PROPERTIES” / “MANAGE DEVICE” / “FORGET THIS DEVICE”. Após isso, clique no botão “FORGET”.
Então o AP aparecerá como na figura abaixo. Clique em “UPGRADE”
Wait for the update to be installed. And at the end you'll see that the finally the AP has been updated successfully.
Desta forma, basta apenas adotar o AP novamente clicando em “ADOPT”.
Método 4 – Atualizar o cache de firmware na controladora
This tip was sent by my friend Rafael from Natal.
Access the Settings / Maintenance / FIRMWARE path and click the cache button, and wait as shown below:
Note que a palavra “CACHE” será substituída pela palavra “DELETE”.
Após isso volte para a sessão “DEVICES” e clique em “UPGRADE” novamente. Confirme a operação e aguarde
And that's it.
Did you like the article?
Leave your comment or suggestion and see youl next time!
View Comments (2)
Hello, could you give me a little more information regarding the MIBs requirement? I have downloaded the MIBs that you specified as a prerequisite in Step 1, and copied them to /usr/share/snmp/mibs/. I uncommented the MIB entry in snmp.conf, and restarted Zabbix. If I look at the host I created, it indicates a timeout connecting to the host. I suspect I have not loaded the MIBs correctly or they are not in the correct directory. Please kindly advise.
Hello Glenn!
In fact, I developed this template using these MIBs, but, these requirements are to troubleshooting.
I changed my direction, and only using the OID numbers to create the template and used the OID names to identify the MIBs correspondent names.
Despite my system have these MIBs, in theory, perhaps not necessary for troubleshooting.
MIBs are files to translate the OID numbers to human readable information.
So let's go to solve your problem.
Follow these steps to fix your AP.
1 - The SNMP protocol must be enabled at the Acess Point set in services SNMP session in controller. For troubleshooting use "public" community.
2 - Use ping to test the physical connection to the Access point.
3 - On zabbix server use NetCat to test the port connectivity;
EX: nc -vu 192.168.0.200 161
this will be a correct response. Connection to 192.168.0.200 port [udp/snmp] succeeded!
4 - test snmp response with this command:
snmpwalk -v2c -c public 192.168.0.200
5 - looking if the correct port is configured in the host settings in zabbix.
This is a easy part, if this not enough to solve your problem, then let me know more detailed information.
If you solved then let me know too.
Best Regards
Alex Moura