/////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
# /the/tech/blog
Solutions for FreeBSD web and application servers using PHP, mySQL, Apache and more.
Posted By Adam
Sunday, August 15th 2010

Adam StrohlHOWTO: CPU, Disk, Network and Memory Usage Reporting via FreeBSD's bsnmpd(1) and bsnmp-ucd(8)

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" = "/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:

bsnmpd_enable="YES"

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!

loading icon

Fetching vote status, one moment ...

Add a Comment:

* Name:
* Email address:
Verification purposes only. Your email address will not be shown publicly, transfered, or sold. We don't spam and take data privacy seriously.
* Comment:
icon

Related Experience

Take a look at these related items:

Server Management & Monitoring
FreeBSD® Admin. & Security
UNIX® Experience

icon

Disclaimer

Any problems and their solutions discussed here are designed to be examples and may not exactly match your situation.

No warranty is provided or implied with these articles, if it's critical contact us: we support and guarantee all of our work.