How to monitor UNIFI UBIQUITI devices in zabbix - Part 3 - Upgrading Firmware and Enabling the SNMP Protocol

"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 - Access the Unifi controller interface from your ubiquiti device.

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 - By clicking the "DEVICES" button, you will see a screen as below. Note the message that there is an available firmware update:


4 - click on "upgrade" and confirm the action by clicking the "CONFIRM" button.


5 - Wait for the installation to finish.

6 - After the installation is complete, you can see that the version number has changed and the "UPGRADE" button is no longer available.

7 - Now we will proceed with the activation of the SNMP protocol, allowing zabbix to collect the updated AP data. Click the "SETTINGS" button, select the "Services" option and click "SNMP".

8 - Click enable, set the "Community String" to your community's environment. In this case, I used the community public. Click the "APPLY CHANGES" button and you will see the message below stating that your changes were successful.

9 - Wait for the changes to be applied in the AP.

10 - Then you will see in zabbix the data collected.

But what if something goes wrong? So keep reading ...

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.

Method 2 - Manual Update by 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 [email protected]:/tmp/fwupdate.bin


Re-access AP ssh and run the following command to apply the upgrade:

syswrapper.sh upgrade2 &

Then the AP will reboot:

Method 3 - Forget the AP before updating the firmware

If previous methods fail, you must update the AP without adopting it. That is, before the upgrade you should forget the AP. The path is "PROPERTIES" / "MANAGE DEVICE" / "FORGET THIS DEVICE". After that, click the "FORGET" button.

Then the AP will appear as in the figure below. Click on "UPGRADE"

Wait for the update to be installed. And at the end you'll see that the finally the AP has been updated successfully.

In this way, just adopt the AP again by clicking on "ADOPT".

Method 4 - Update the firmware cache on the controller

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:

See that the word "CACHE" will be replaced by the word "DELETE".

After that go back to the "DEVICES" session and click "UPGRADE" again. Confirm the operation and wait

And that's it.

Did you like the article?

Leave your comment or suggestion and see youl next time!

2 thoughts on “Como monitorar dispositivos UNIFI UBIQUITI no zabbix – Parte 3 – Atualizando firmware e Habilitando o protocolo SNMP”

  1. 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.

    1. 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

Leave a Reply