Previous Contents Index Documentation Resources Next |
Managing Servers With iPlanet Console |
Chapter 11Using SNMP to Monitor Servers
You can use the Simple Network Management Protocol (SNMP) to manage your iPlanet and Netscape servers. This chapter explains how SNMP works and tells you how to set it up on your network. The chapter contains the following sections:
SNMP Basics
Setting Up SNMP on UNIX Systems
Using a Proxy SNMP Agent on UNIX Systems
Reconfiguring a Native Agent on UNIX Systems
Starting the Master Agent on UNIX Systems
SNMP Basics
SNMP is a protocol used to exchange data about network activity. It defines a standard method of communication used to manage products from different vendors. This standard allows administrators to remotely manage hardware and software located across their network.Each piece of controlled hardware and software is known as a managed device. A managed device is anything that runs SNMP, such as a host, router, or iPlanet server.
The machine used to monitor and configure managed devices is called a network management station. A network management station is usually a powerful workstation running network management applications which graphically show information about managed devices. For example, a network management application might show which servers in your enterprise are running and which are shut down, or the application might report the number and type of error messages received.
iPlanet and Netscape servers transmit data to a network management station using two types of agents: SNMP subagents and SNMP master agents. An SNMP subagent gathers information and sends it to an SNMP master agent. The SNMP master agent transfers the data to the network management station. Every iPlanet and Netscape server has an SNMP subagent except for iPlanet Administration Server, which either has a master agent (on UNIX) or no agent (on Windows NT).
A single machine can host multiple subagents, but a machine can only have one master agent. For example, if you have one instance each of Enterprise Server, Directory Server, and Messaging Server installed on one host, each will have its own subagent. All three subagents will report to the same master agent. This master agent is located on the same host machine as the subagents. Figure 11-1 illustrates this example.
Figure 11-1    Interaction Between a Network Management Station and a Host Computer
The Windows NT operating system includes an SNMP master agent. iPlanet Administration Server employs this service when utilizing SNMP. You can access and operate this master agent through the Network control panel. In the UNIX environment, the master agent is installed with Administration Server.
Some UNIX operating systems support an extended version of SNMP called the SNMP multiplexing protocol (usually known as SMUX). This allows iPlanet servers to operate without a master agent. For those versions of UNIX that do not support SMUX, you can use iPlanet Console to manage the master agent that iPlanet provides.
How SNMP Works
A managed device, such as a server, stores its configuration and management settings as variables. Some of these variables can be read and changed over SNMP while others cannot. The variables that the master agent can read and change are called managed objects. Managed objects are defined in a tree-like hierarchy known as a management information base (MIB).Each iPlanet or Netscape server provides a management information base (MIB) for use in SNMP communication. This MIB contains managed objects pertaining to the server's operation. Each managed object has a unique object identifier. A server can report significant events to the network management station by sending "trap" messages (often called just "traps") containing these object identifiers. In addition, the network management station can initiate communication, and then specify one or more object identifiers when querying a server's MIB for data. The network management station can also remotely change variables in the MIB by specifying an object identifier and sending its new value.
iPlanet MIBs
Each iPlanet or Netscape server has its own MIB. All iPlanet MIBs are located in the <server root>/plugins/snmp directory.A server's MIB contains variable definitions used when managing that particular server. Some of these variables can be modified over SNMP by a network management station while others are flagged as read-only or inaccessible. See your server's documentation for detailed information about its management variables.
The Administration Server MIB
iPlanet Administration Server stores its MIB in a file called netscape-main.mib.The Administration Server MIB lists the object identifiers for all installed iPlanet servers. It also defines the object identifier shared by all iPlanet and Netscape servers. This object identifier is
netscape OJBECT IDENTIFIER: :={enterprises 1450}
The netscape-main.mib file may look like this:
Types of SNMP Messages
SNMP defines three types of messages: GET, SET, and trap. The network management station uses GET messages to request data and SET messages to change variable values in the MIB. The messages sent by a server to the network management station are known as trap messages.The following examples illustrate how a network management station, and the servers it communicates with, use GET, SET, and trap messages.
Network Management Station-Initiated Communication
A network management station can request information from a server or change the value of a variable stored in a server's MIB. For example:
The network management station sends a GET message to the Administration Server master agent. The GET message is a request for the number of Directory Server errors encountered since the server was last started.
The master agent forwards the message to the Directory Server's SNMP subagent.
The subagent retrieves the data.
The subagent sends the data to the master agent. The master agent sends a trap message containing the data to the network management station.
The network management station displays the data through its network management application.
Server-Initiated Communication
The server subagent sends a trap message to the network management station when a significant event has occurred. For example:
The Directory Server's subagent informs the master agent that the server has stopped.
The master agent sends a trap message reporting the event to the network management station.
The network management station displays the information textually or graphically through its network management application.
Setting Up SNMP on UNIX Systems
In general, to use SNMP on UNIX Systems you must have a master agent and at least one subagent installed and running on your system. You need to install a master agent before you can enable a subagent. Some UNIX systems have their own SNMP master agent. If your system has one of these native agents, you can either disable it or change the port number that it uses. If you disable the native agent, you will only be able to use the master agent included with Administration Server. If you change the port number that the native agent uses, you can use it alongside Administration Server's master agent.The procedures for setting up SNMP are different depending upon your system. Table 11-1 provides an overview of the procedures to follow in various situations. The actual procedures are described in detail later in this chapter.
Before you begin, examine your system.
Is your system already running an SNMP agent that's native to your operating system?
If you are unsure of how to verify this information, see your system documentation.If so, does your native SNMP agent support SMUX communication? If your native agent supports SMUX, you don't need to install a master agent. However, you do need to change the native agent's configuration.
Table 11-1    Overview of Procedures for Enabling SNMP Master Agents and Subagents
If your server meets these conditions...
... follow these procedures
Using a Proxy SNMP Agent on UNIX Systems
If you want to use a native agent and the iPlanet Console master agent concurrently, you will need to set up a proxy agent. The proxy agent fields requests from the iPlanet master agent and then passes them on to the native agent. This scenario is illustrated in Figure 11-2.
Figure 11-2    Using a Proxy Agent When You're Running a Native SNMP Agent
In order to use both master agents simultaneously, you need to install and start the proxy SNMP agent. You also have to restart the native SNMP master agent using a port number other than the one used by the iPlanet Console master agent.
Installing and Starting the Proxy SNMP Agent
Before you install the proxy SNMP agent, make sure to stop the native master agent. See your system documentation for detailed instructions.
To Install the SNMP Proxy Agent
Edit the CONFIG file located in the <server-root>/plugins/snmp/sagt directory so that it includes the port that the SNMP proxy agent will listen to. The file also needs to include the MIB trees and traps that the SNMP proxy agent will forward.
After the proxy SNMP agent starts, you need to restart the native agent on the port you specified in the CONFIG file.
Reconfiguring a Native Agent on UNIX Systems
If your native agent supports SMUX, you don't need to install a master agent. However, you do need to change the native agent's configuration.UNIX uses several configuration files to screen its communications. One of them, etc/snmp/conf/snmpd.conf, needs to be changed so that the native agent accepts incoming messages from SMUX subagents. To change the file, add a line defining each subagent by its object identifier.
For example, you might add this line to snmpd.conf:
smux 1.3.6.1.4.1.1.1450.1 "" IPAddress netMask
where IPAddress is the IP address of the host on which the subagent is running and netMask is the network mask of that host (for instance, 255.255.0.0).
Note Do not use the loopback address 127.0.0.1; use the host's actual IP address instead.
For more information on configuring SNMP and SMUX, see the online manual page for snmpd.conf.
Configuring the Master Agent on UNIX Systems
In order to use SNMP, you must configure the master agent by specifying community strings and trap destinations.
Community Strings
A community string is a password that an SNMP agent uses for authorization.A community string is a text string that an SNMP master agent uses for authorization. Whenever a network management station sends a message, it includes a community string. The agent receiving the message can then verify whether the network management station is authorized to obtain information. Community strings are not concealed when sent in SNMP packets; they are sent as ASCII text.
To ensure that a network management station is authorized to obtain information, the SNMP master agent compares the community string sent by the station to its list of accepted community strings. If the community string is listed, the network management station is authenticated.
Trap Destinations
An SNMP trap is a message the SNMP agent sends to a network management station. For example, an SNMP agent might send a trap when a server goes down. The SNMP agent must know the address of the network management station in order to send traps. This address is called a trap destination.
Configuring the Master Agent using iPlanet Console
iPlanet Console provides an easy way to work with SNMP parameters. You can add, edit, and remove community strings and trap destinations from the Administration Server management window. You can also set the SNMP operations that a particular community string can request, as well as view any trap destinations you have already configured.
To Add, Edit, or Remove a Community String using iPlanet Console
In the iPlanet Console navigation tree, select the instance of Administration Server that you want to work with.
Click Open to open the management window for the server instance.
Click the Configure SNMP Master Agent button, and then click Communities.
Click the appropriate button for the task you are performing.
If you want to add a community string, click Add.
Enter community string information as necessary.If you want to edit a community string, select it, and then click Edit.
If you want to remove a community string, select it, and then click Remove.
Click OK.
- Community. Enter a community string you want to add, or edit the listed community string.
- GET and SET. Choose this option if you want to use this community string for requesting data, replying to messages, and setting variable values.
- GET only. Choose this option if you want to use this community string only for requesting data and replying to messages.
- SET only. Choose this option if you want to use this community string only for setting variable values.
To Add, Edit, or Remove a Trap Destination
In the iPlanet Console navigation tree, select the instance of Administration Server on which the master agent is running.
Click Open to open the management window for the server instance.
Click the Configure SNMP Master Agent button, then click Managers.
Click the appropriate button for the task you are performing.
If you are adding a trap destination, click Add.
If you are adding or editing a trap destination, enter Manager information as necessary:If you are editing a trap destination, select it, and then click Edit.
If you are removing a trap destination, select it, and then click Remove.
Click OK.
- Manager Station. Enter a valid system name or an IP address for the network management station.
- Trap Port. Enter the port number that the network management station uses to listen for traps. The default is 162.
- With Community. Enter the community string you want to use in the trap.
Manually Configuring the Master Agent
Although you can easily set SNMP master agent parameters through iPlanet Console, you may want to manually add or modify some settings. You can do this by editing the master agent's configuration file. This file is called CONFIG and it contains all master agent settings, whether entered manually or through iPlanet Console.
To Configure the Master SNMP Agent Manually
Log in as root.
Instructions for editing the CONFIG file and defining the sysContact and sysLocation variables are detailed below.Check to see if there is a native agent (snmpd) running on port 161.
Edit the CONFIG file located in the <server-root>/plugins/snmp/magt directory.
- If a native agent is running, make sure you know which MIB trees it supports and how to restart it, then stop it.
(Optional) Define sysContact and sysLocation variables in the CONFIG file.
Editing the Master Agent Config File
The CONFIG file defines the community and manager with which the master agent will work. The manager value should be a valid system name or an IP address. Here is an example of a basic CONFIG file:
COMMUNITY public
ALLOW ALL OPERATIONS
MANAGER <your_manager_station_name>
SEND ALL TRAPS TO PORT 162
WITH COMMUNITY public
Defining sysContact and sysLocation Variables
You can edit the CONFIG file to include initial values for the sysContact and sysLocation variables (these variables are defined as part of MIB-II, the MIB section of the second version of SNMP). The value for sysContact specifies the person in charge of the host system on which the master agent runs. The value for sysLocation specifies a physical address where the host machine can be found.The following example CONFIG file defines the sysContract and sysLocation variables. The strings for the variables in this example are enclosed in quotes. Any string that contains spaces, line breaks, or tabs must be in quotes. Alternatively, you can omit the quotes and specify the value of these whitespace characters in hexadecimal notation.
Starting the Master Agent on UNIX Systems
Once you have configured the SNMP master agent, you can start it from iPlanet Console or from the command line.
Starting the Agent Using iPlanet Console
iPlanet Console can start the SNMP master agent on the standard port (161) only. If you want to use a non-standard port, see "Starting the Agent From the Command Line" below.
To Start the Master Agent Using iPlanet Console
Log in as root.
Check to see if there is a native agent (snmpd) running on port 161.
In the iPlanet Console navigation tree, select the instance of Administration Server on which the master agent is running.
- If a native agent is running, make sure you know which MIB trees it supports and how to restart it, then stop it.
Click Open to open the management window for the server instance.
Starting the Agent From the Command Line
If you do not want to start the SNMP master agent from iPlanet Console, you can launch it from the command prompt. If you want to run the agent on a port other than 161, you must modify your CONFIG or system services file and then start the agent from the command line.
To Start the Agent on the Standard Port
Enter the following at the command prompt to start the master agent on port 161:
- magt CONFIG INIT&
- The INIT file contains information from the MIB-II system group, including system location and contact information. If INIT doesn't already exist, starting the master agent for the first time will create it. An invalid manager name in the CONFIG file will cause the master agent to fail during startup.
To Start the Agent on a Non-Standard Port Using the Config File
In the CONFIG file, specify a transport mapping for each interface over which the master agent listens for SNMP requests from network management stations. Transport mappings allow the master agent to accept connections on both the standard port and a nonstandard port.
After manually editing the CONFIG file, you should start the master agent by typing the following at the command prompt:
- The maximum number of concurrent SNMP requests is limited by your target system's limits on the number of open sockets or file descriptors per system process.
- Here is an example of a transport mapping entry:
TRANSPORT extraordinary SNMP
OVER UDP SOCKET
AT PORT 11161
To Start the Agent on a Non-Standard Port Using System Services
Edit the /etc/services file to allow the master agent to accept connections on the standard port as well as on a nonstandard port. For information on editing this file, see your system documentation.
Enabling the Subagent on UNIX Systems
For information on enabling the subagent, see the documentation for your iPlanet or Netscape server. If you need more information, see your system documentation.
Using the Windows NT SNMP Service
Windows NT implements SNMP as a service. Any iPlanet servers that use SNMP communicate directly with this service. iPlanet Administration Server does not perform any SNMP-related tasks on Windows NT. All SNMP-related tasks are handled by the operating system.
Previous Contents Index Documentation Resources Next
Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corp. All rights reserved.