Ubiquiti Cloud Gateway Ultra (UCG-Ultra) Bandwidth Monitoring

They are disabled by default iirc

Sorry for my ignorance, what do we need to config so these stats can be enabled?

Go to the integration and navigate to the device or the device’s entities. Then enable the disabled entities. Or go to your entities page under settings and filter accordingly.

Thanks for your help. I also needed to run through the configuration process of Ubiquiti integration to enable the hidden entities. I added Rx/Tx sensors for my UCG-Ultra port 5 (the WAN port).

Dears, i would like to configure UCG-Ultra with HA using this plugin but with no success. I can see that @nicolinuxfr posted picture that it is working.
I’m trying to put credentials for UCG-Ultra and type local IP address. No chance to connect. I tried to login as root and put ssh cretentials. as well not working. :wink: Thanks a lot for any info.

I’m receiving a lot of Verification requests on my mobile when i try to configure it … Verify app for auth is i thing blocking it ;(

Thanks for help @nicolinuxfr

For everyone else : you need to create a special user for Home Assistant, here if you keep the default parameters of the UGC : https://192.168.1.1/admins

Without this user, you can not connect to the UniFi system from Home Assistant.

Hey, do you remember which setting you changed? I think I can only get detailed data from clients but not from the UCG itself.

same here, I can not find whole UCG entity

SNMP has been added to the Cloud Gateway Ultra on UniFi OS 4.0.6 (Release candidate).

https://community.ui.com/releases/UniFi-OS-Cloud-Gateway-Ultra-4-0-6/6dfaa8b2-eb9b-4e85-899a-fc04af7d15b7

Anyone managed to get it working? I’m specifically trying to pull daily traffic totals for the WAN.

2 Likes

And the same version has been released for the UDR, so now I (at last) have SNMP on it!

UniFi OS - Dream Router 4.0.6 | Ubiquiti Community

So… anyone managed to pull WAN In and WAN Out stats with the new OS 4.0.6 on Cloud Gateway Ultra?

The setup I had for my old USG3 did not work (1.3.6.1.2.1.31.1.1.1.6.2 / 1.3.6.1.2.1.31.1.1.1.10.2). Also tried my luck with a MIB Browser but was not able to figure the correct value out :frowning: .

In my case, the WAN port is eth4. This is on a UDR. I simply monitored and graphed each eth port while doing a speed test.

YMMV

  - platform: snmp
    name: snmp_wan_in
    host: 192.168.0.1
    community: !secret router_snmp_community
    version: 2c
    baseoid: 1.3.6.1.2.1.2.2.1.10.13  # ifInOctets.13 / eth4 (interface 12, zero-indexed)
    unit_of_measurement: octets

  - platform: snmp
    name: snmp_wan_out
    host: 192.168.0.1
    community: !secret router_snmp_community
    version: 2c
    baseoid: 1.3.6.1.2.1.2.2.1.16.13  # ifOutOctets.13 / eth4 (interface 12, zero-indexed)
    unit_of_measurement: octets

Mapping:


Unifi Dream Router
OS version is: 10.16.0

Info About the Router:
Description: Linux Dream-Router 4.4.198-ui-mtk #1 SMP PREEMPT Fri Jun 7 23:26:01 CST 2024 aarch64
Name: Dream-Router
Uptime: 4 days 17:39:37
interface #0 name is: lo
interface #1 name is: dummy0
interface #2 name is: nic0
interface #3 name is: gre0
interface #4 name is: gretap0
interface #5 name is: ip_vti0
interface #6 name is: sit0
interface #7 name is: ip6tnl0
interface #8 name is: eth0
interface #9 name is: eth1
interface #10 name is: eth2
interface #11 name is: eth3
interface #12 name is: eth4
interface #13 name is: deprecated
interface #14 name is: ppd
interface #15 name is: MEDIATEK Corp. Device 7915
interface #16 name is: MEDIATEK Corp. Device 7622
interface #17 name is: ifb0
interface #18 name is: ifb1
interface #19 name is: switch0
interface #20 name is: MEDIATEK Corp. Device 7622
interface #21 name is: MEDIATEK Corp. Device 7622
interface #22 name is: MEDIATEK Corp. Device 7622
interface #23 name is: MEDIATEK Corp. Device 7622
interface #24 name is: MEDIATEK Corp. Device 7622
interface #25 name is: MEDIATEK Corp. Device 7622
interface #26 name is: MEDIATEK Corp. Device 7622
interface #27 name is: wds0
interface #28 name is: wds1
interface #29 name is: wds2
Number of interfaces reported by the router: 30

You can maybe find the MiB file on your device, which may be more descriptive. I didn’t check in my case. I kind of forgot about that option.

2 Likes

Thanks, this was very educational. These seem to be the interface names for my UCG-Ultra.

So it appears the correct baseoid’s are 1.3.6.1.2.1.2.2.1.10.4 and 1.3.6.1.2.1.2.2.1.16.4 respectively.

henrikb@WS-D21XD14:~$ snmpbulkwalk -v 2c -c public 192.168.1.1 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: “lo”
iso.3.6.1.2.1.31.1.1.1.1.2 = STRING: “dummy0”
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: “miireg”
iso.3.6.1.2.1.31.1.1.1.1.4 = STRING: “eth4”
iso.3.6.1.2.1.31.1.1.1.1.5 = STRING: “switch0”
iso.3.6.1.2.1.31.1.1.1.1.6 = STRING: “ifb0”
iso.3.6.1.2.1.31.1.1.1.1.7 = STRING: “ifb1”
iso.3.6.1.2.1.31.1.1.1.1.8 = STRING: “eth0”
iso.3.6.1.2.1.31.1.1.1.1.9 = STRING: “eth1”
iso.3.6.1.2.1.31.1.1.1.1.10 = STRING: “eth2”
iso.3.6.1.2.1.31.1.1.1.1.11 = STRING: “eth3”
iso.3.6.1.2.1.31.1.1.1.1.12 = STRING: “switch0.1”
iso.3.6.1.2.1.31.1.1.1.1.13 = STRING: “switch0.10”
iso.3.6.1.2.1.31.1.1.1.1.14 = STRING: “br0”
iso.3.6.1.2.1.31.1.1.1.1.15 = STRING: “br10”

1 Like

Maybe! I’m glad it helps so far. :slight_smile:

In my case, I first thought it might be nic0, but it’s unclear what it refers to. I assumed NIC, as in Network Interface Card, and perhaps being a physical interface.

Then I thought it might be eth0, but it seems the vertically placed ethernet ports on my UDR is numbered from the bottom up, and the WAN port is at the top, so that’s how I ended up with eth4 and confirmed it with my testing.

I will compare a full day’s download and upload totals after today with my ISP’s report to ensure this is correct, but so far, it’s looking good.

Sure. I am pretty confident that eth4 is the right one for UCG Ultra, if you look at the ports on the Controller application it shows up as port #5, which makes eth4 given that in SNMP the first port is eth0. It also seems to correspond at what is shown on the Unifi dashboard.

image

1 Like

Ah, well-spotted.

I forgot about that view in the console.

It’s the same for me.

Thanks for sharing, do you have full config like real time bandwidth monitoring?

Check these:

And my current version:

1 Like