Background:
The state of SNMP support in FreeBSD is not so good as this thread from the FreeBSD-net mailing list shows.
In short:
- The net-snmp port for FreeBSD does not read data from the kernel correctly. As such, the port installs fine, but requires major tweaks to get performance data out.
- There is an SNMP daemon that ships with FreeBSD but seems to be very basic partly due to the minimalistic design, partly due to lack of developers to work on new features. The TODO List could do with some volunteers.
This document is a work in progress that describes how to get ZenOSS to monitor a FreeBSD host using bsnmp that has shipped with FreeBSD since version 6.0
Installing extra modules for bsnmp
The ports tree has some extra modules that install in the usual way. These extend the capabilities of the base bsnmpd.
For our purposes we only really need net-mgmt/bsnmp-ucd but net-mgmt/bsnmp-regex, net-mgmt/bsnmp-jails, net-mgmt/bsnmptools are also available. To install:
- run the following to install bsnmp-ucd:
# cd /usr/ports/net-mgmt/bsnmp-ucd # make all install clean
- Run the following to instal bsnmptools
# cd /usr/ports/net-mgmt/bsnmptools # make all install clean
Configuring bsnmp
- edit /etc/snmpd.config to add the line:
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"
- edit the rest of that file - change the read variable to set your snmp community string
- Read the manual pages bsnmpd(1) and bsnmp-ucd(8) for more info.
Finishing touches and final comments
At this point you need to add bsnmpd_enable="YES"
to the file /etc/rc.conf and start bsnmp by issuing # /etc/rc.d/bsnmp start
You should be able to add the host to zenoss and get basic performance data. This snmp daemon doesn't support snmp v3 yet and the default plugins will not know how to get the extra data specific to FreeBSD (netgraph, pf and friends). An update to this document should happen once I've got those bits working.