Apple 10.6 Server User Manual


 
Chapter 8 Monitoring Your System 181
SNMPv2 is the default access protocol and the default read-only community string is
“public.”
Enabling SNMP reporting
SNMP access isn’t enabled by default on Mac OS X Server. To use SNMP tools to poll
your Mac OS X Server for data, you must congure and then enable the service.
To enable SNMP
1 Open Server Admin.
2 Select a server, click the Settings button in the toolbar, and then click the General tab.
3 Select Network Management Server (SNMP).
4 Click Save.
When SNMP is active, anyone with a route to the SNMP host can collect SNMP data
from it.
5 Congure the basic SNMP parameters from the command line.
The SNMP process will not start until /etc/snmpd.conf is congured for the current site.
To congure, see “Conguring snmpd” on page 181.
Note: The default conguration of snmpd uses privileged port 161. For this reason
and others, it must be executed by root or using setuid. Only use setuid as root if you
understand the ramications. If you do not, seek assistance or additional information.
Flags available for snmpd will change the uid and gid of the process after it starts.
For more information, see the snmpd man page.
Conguring snmpd
The conguration (.conf) le for snmpd is typically at /etc/snmpd.conf. If you have an
environment variable SNMPCONF, snmpd will read any les named snmpd.conf and
snmpd.local.conf in these directories. The snmpd process can be started with a -c ag
to indicate other conf les. For more information about which conf les can be used,
see the snmpd man page.
Conguration les can be created and installed more elegantly using the included
script /usr/bin/snmpconf. As root, use this script with the -i ag to install the le at
/usr/share/snmp/. Otherwise, the default location for the le to be written is the user’s
home folder (~/). Only root has write permission for /usr/share/snmp/.
Because snmpd reads its conguration les at startup, changes to conguration
les require that the process be stopped and restarted. You can stop snmpd with
ProcessViewer or at the command line (kill -HUP <pid>).