Skip to content
Geek is the Way!
Menu
  • Forums
  • Sobre o blog
  • Contato
  • English
Menu

Monitoring Unifi APs through SNMP using Zabbix Server

Posted on January 1, 2023December 30, 2024 by Thiago Crepaldi

Last Updated on December 30, 2024 by Thiago Crepaldi

From previous posts, we have deployed Zabbix Server on a Proxmox container. We also hardened the installation through Let’s Encrypt certificates for the web frontend and TLS encryption for the communication between Server and Agents/Proxies, after all, although encrypted Zabbix Server <-> Agent/Proxy communication with PSK or SSL certificates 🙂

In this post I will cover how to monitor a Unifi AP using Zabbix Agent template. Templates are great because they already pack a bunch of monitoring items, actions, triggers, etc that we would have to add one by one otherwise. Using template is smart because when we need to make changes, we just do it in the template and all hosts that use them will see the new settings. On a manual setup, you would have to make the change in each host, one by one…

Configuring SNMPv3 on Unifi Controller

In order to allow the Zabbix Server to monitor your APs, we need to enable SNMPv3 on it.

After logging in into your Unifi Controller, navigate to Settings >> System >> SNMP. Make sure SNMP is configured as follows::

  • SNMP
    • SNMP Version 1 & 2C: unchecked
    • SNMP version 3: checked
      • User Name: zabbix
      • Password: Pick one password

Click on Apply CHANGES and you are done.

Configuring Zabbix Server through Web UI

The template we are going to use doesn’t come installed in Zabbix Server by default, so we are going to import it first. Visit the community template page and navigate to Network_Devices >> Ubiquiti >> template_unifi_ap_snmpv3 >> 6.0 and click on
template_unifi_ap_snmpv3.yaml file, followed a click on Raw button. Save the file locally.

Go to Configuration >> Templates and click on Import. Click on Choose file in the configuration dialog, select the YAML file previously saved and click on Import. Another dialog will be displayed with the actual content being imported. Click on Import .

Although we don’t need to install a Zabbix Agent on the APs, we still need to create a Host on Zabbix Server to specify the NAS address, etc

Go to Configuration >> Templates and click on Create Host button. When the configuration dialog open, the Host tab should be the default one. Fill in the following fields and leave the rest as-is:

  • Host
    • Host name: Type the Unifi AP hostname
    • Templates: UBQT UNIFI SNMP V3 HN
    • Host Groups: Agentless or whatever describes your Agent
    • Interfaces:
      • Add a new interface
        • Type: SNMP
        • IP Address: Type the server IP to be ping’ed
        • DNS Name: Type the server FQDN to be ping’ed
        • Connect to: Select IP or DNS
        • Port: 161
        • Description: Do your thing here
        • Monitored by Proxy: (no proxy)
        • SNMP Version: SNMPv3
        • Context Name: empty
        • Security Name: Type the user set in the Unifi Controller
        • Security Level: authPriv
        • Authentication Protocol: SHA1
        • Authentication Passphrase: Type the password set in the Unifi Controller
        • Privacy protocol: AES128
        • Privacy passphrase: Type the password set in the Unifi Controller
  • Macros
    • Click on Add
      • Macro: {$SNMP_AUTHPASS}
      • Value: The “Password” created in the previous section
      • Description: be creative or leave empty
    • Click on Add
      • Macro: {$SNMP_PRIVPASS}
      • Value: The SNMP Privacy Password created in the previous section
      • Description: do your thing
    • Click on Add
      • Macro: {$SNMP_USERNAME}
      • Value: zabbix (or whatever “Username” was created in the previous section)
      • Description: leave empty or not

Finish the host creation by clicking Update.

That is it, let’s try it. Go to Monitoring >> Latest data. In the filter section, type the name of your Synology NAS server in the Hosts box and finally hit Apply. A list of items should be displayed for it, such as AP Hostname, etc

That is it, have fun!

Share this:

  • Tweet

Related

15 thoughts on “Monitoring Unifi APs through SNMP using Zabbix Server”

  1. DawsonR says:
    March 17, 2023 at 4:17 AM

    Don’t you have the wrong port for SNMP ?

    Reply
    1. Thiago Crepaldi says:
      March 17, 2023 at 10:35 PM

      Indeed, the port should be 161. Thanks, I have fixed the post!

      Reply
  2. andreasD says:
    March 30, 2023 at 9:07 AM

    when trying to import I get an error saying “Import failed > invalid parameter “/i/request_method”:value must be 0″

    Reply
    1. Matthew S says:
      April 5, 2023 at 4:48 PM

      @andreasD
      I am guessing you are running > Zabbix 6.2? If so, comment out (#) the “request_method”s in the yaml.

      Unrelated, where in the holy-heck is the passphrase portion of the SNMPv3 settings for the Ubiquiti Unifi. I only see username and password.

      Reply
      1. Thiago Crepaldi says:
        April 6, 2023 at 10:46 AM

        Username is zabbix and the password is the Passphrase you have created for the Zabbix Agent

        Reply
        1. Naser says:
          November 22, 2023 at 3:24 PM

          “I’m a bit confused. When I selected SNMPv3 in the Zabbix server section, I typed in the username ‘zabbix’, which is the same username I created on the controller. Now, I have to enter two passwords, SHA1 and AES128. Is the AES128 and SH1 password the same as the one I created on the controller?”
          I might be missing something. I’m able to ping the controller from Zabbix, but the Zabbix cannot communicate with the controller through SNMP (I got red SNMP)!!

          Reply
          1. Harnik Patel says:
            September 1, 2024 at 9:48 PM

            Facing similar issue for SHA1 & AES128 , but on Unifi Controller when using SNMP V3 it givens only one option of password

          2. Max says:
            September 18, 2024 at 10:41 AM

            Facing the same issue. Anyone got a fix?

  3. Antonio says:
    April 5, 2023 at 5:30 PM

    Ey Andreas, I tried commenting/removing all “request_method” lines and that worked for me.

    Reply
  4. David Nichols says:
    May 2, 2023 at 7:11 AM

    This is amazing!

    Any chance you can do this for switches?

    Reply
    1. Thiago Crepaldi says:
      May 2, 2023 at 10:56 PM

      Good idea. I will try on one of the Unifi switches I have and post it. Stay tuned

      Reply
  5. woozle weazle says:
    May 16, 2023 at 7:45 PM

    The templae is not any good for the Unifi USW switches, returns only basic static info, nothing about ports and traffic. Has someone found a better template that works well with the Unifi USW switches?

    Reply
    1. stranger says:
      May 28, 2024 at 7:09 PM

      which template should i import for the unifi switch , and what are the configuration

      Reply
  6. Kenneth says:
    October 8, 2023 at 11:28 PM

    followed the guide but there is no alert for the AP’s unavailable through ICMP. How can I add it on triggers? thank you.

    Reply
  7. Brandon says:
    June 25, 2024 at 3:19 PM

    Thanks for posting this! I got it working on Zabbix 7.0 using my Unifi APs. Is there a template for network gear as well ? I have a Unifi Security Gateway and two switches I’d like to monitor too.

    Reply

Leave a ReplyCancel reply

LIKED? SUPPORT IT :)

Buy Me a Coffee


Search


Categories

  • Cooking (1)
  • Homelab (79)
    • APC UPS (6)
    • pfSense (40)
    • Proxmox (20)
    • Shopping (1)
    • Supermicro (2)
    • Synology NAS (8)
    • Ubiquiti (6)
    • UDM-Pro (4)
  • Random (3)
  • Wordpress (1)

Tags

Agentless monitoring (3) AP9631 (3) Apache2 (3) APC UPS (6) Bind9 (3) certificates (5) DDNS (5) debian (3) DNS (7) DNSBL (2) DSM (6) Dynamic DNS (4) Firewall (9) gmail (3) Let's Encrypt Certificates (7) monitoring (18) networking (21) NMC (2) PBS (3) pfsense (43) port forwarding (3) privacy (2) proxmox (17) proxmox backup server (3) proxmox virtual environment (16) pve (5) rev202207eng (76) security (28) SNMP (4) SNMPv1 (3) ssh (4) SSL (6) Supermicro (2) Synology (7) udm-pro (5) unifi (6) unifi controller (3) unifi switch (2) UPS (5) VLAN (4) vpn (9) vpn server (2) wifi (4) Zabbix (18) Zabbix Agent2 (11)

See also

Privacy policy

Sitemap

©2025 Geek is the Way! | Design by Superb