Fixing SNMP in Mac OS X Server 10.5.7

I monitor my network with PRTG Network Monitor. After recently upgrading our Xserve from 10.5.4 to 10.5.7 (server), its status changed in PRTG to “in alarm” and was unable to connect via SNMP to collect any data. It turns out that the default configuration of the SNMP agent changed with the 10.5.7 upgrade, tightening access restrictions for the community string “public”. The fix is fairly simple. Edit line 97 of /etc/snmp/snmpd.conf and restart the SNMP daemon to reload the config file.

The default SNMP configuration in 10.5.7 and above  limits unauthenticated access to the system contact info as shown in lines 96 and 97 of /etc/snmp/snmpd.conf:

# We limit unauthenticated requesters to the system contact info
rocommunity public default .1.3.6.1.2.1.1.4

To allow access to MIB-2 info only, edit line 97 as follows:

rocommunity public default .1.3.6.1.2.1

To allow unlimited access, edit line 97 as follows:

rocommunity public

Then restart SNMP:

sudo killall -c snmpd -HUP

NOTE: The new default configuration of SNMP in 10.5.7 is the same in Snow Leopard.