Skip to content
No description, website, or topics provided.
Branch: master
Clone or download

Latest commit

Latest commit f37ce2a Oct 3, 2017


Type Name Latest commit message Commit time
Failed to load latest commit information.

usg-pro-snmp-temp: Add temperature data to SNMP

A trivial patch that allows temperature data of the USG-PRO-4 to be reported inside SNMP. This is the initial version, written on 10/02/2017. Involves manual modifications of your USG-PRO.

Installation guide


  • IP/Hostname of your USG-PRO ($USG-PRO)
  • User to log into the USG-PRO ($USERNAME)


  1. Clone this GIT

  2. Copy the shell scripts cpuTemp and phyTemp to your USG-PRO

     $ scp cpuTemp phyTemp $USERNAME@$USG-PRO
  3. Log into the USG-PRO by ssh and become root

     $ ssh $USERNAME@$USG-PRO
     $ sudo -s
  4. Move the required shell scripts to /usr/local/bin

     $ mv ~$USERNAME/cpuTemp /usr/local/bin
     $ mv ~$USERNAME/phyTemp /usr/local/bin
     $ chown root:root /usr/local/bin/cpuTemp
     $ chown root:root /usr/local/bin/phyTemp
     $ chmod 755 /usr/local/bin/cpuTemp
     $ chmod 755 /usr/local/bin/phyTemp
  5. Allow user snmp to fetch temperature data using ubnt-hal by adding the following line to /etc/sudoers

     $ echo "snmp     ALL = NOPASSWD: /usr/sbin/ubnt-hal" >> /etc/sudoers
  6. Configure SNMPD to fetch temperature data

     $ echo "pass . /usr/local/bin/cpuTemp" >> /etc/snmp/snmpd.conf
     $ echo "pass . /usr/local/bin/phyTemp" >> /etc/snmp/snmpd.conf
  7. Restart SNMPD

     $ pkill -HUP snmpd


Use your favorite SNMP browser to test the new OIDs.

  • OID . should contain the cpu temperature
  • OID . should contain the physical temperature (chassis?)
You can’t perform that action at this time.