Out of the box, FreeBSD’s default SNMP daemon bsnmpd(1) does not support the UCD-SNMP-MIBs which is where all the “good stuff” like CPU, disk, network and memory that us sysadmins like to monitor. Adding this module is as easy as installing the bsnmp-ucd port and doing a quick update to bsnmp’s config file:
$ cd /usr/ports/net-mgmt/bsnmp-ucd/ $ make install clean
Once that module is installed all we need to do is add these lines to end of /etc/snmpd.config:
# # bsnmp-ucd (8) # begemotSnmpdModulePath."ucd" = "https://n3u2f2r9.rocketcdn.me/usr/local/lib/snmp_ucd.so"
Finally we just need to restart bsnmpd to have it load the new module:
$ /etc/rc.d/bsnmpd restart Stopping bsnmpd. Starting bsnmpd.
Note: This assumes you have the following in your /etc/rc.conf:
That’s it! You should be able to retrieve full disk, CPU and memory information (as well as a bunch of other things UCD’s MIB adds) via SNMP queries!