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 configure and then enable the service.

To enable SNMP

1Open Server Admin.

2Select a server, click the Settings button in the toolbar, and then click the General tab.

3Select Network Management Server (SNMP).

4Click Save.

When SNMP is active, anyone with a route to the SNMP host can collect SNMP data from it.

5Configure the basic SNMP parameters from the command line.

The SNMP process will not start until /etc/snmpd.conf is configured for the current site. To configure, see “Configuring snmpd” on page 181.

Note: The default configuration 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 ramifications. 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.

Configuring snmpd

The configuration (.conf) file for snmpd is typically at /etc/snmpd.conf. If you have an environment variable SNMPCONF, snmpd will read any files named snmpd.conf and snmpd.local.conf in these directories. The snmpd process can be started with a -c flag to indicate other conf files. For more information about which conf files can be used, see the snmpd man page.

Configuration files can be created and installed more elegantly using the included script /usr/bin/snmpconf. As root, use this script with the -i flag to install the file at /usr/share/snmp/. Otherwise, the default location for the file to be written is the user’s home folder (~/). Only root has write permission for /usr/share/snmp/.

Because snmpd reads its configuration files at startup, changes to configuration files require that the process be stopped and restarted. You can stop snmpd with ProcessViewer or at the command line (kill -HUP <pid>).

Chapter 8    Monitoring Your System

181

Page 181
Image 181
Apple 10.6 manual Enabling Snmp reporting, Configuring snmpd, To enable Snmp