The operation of the master agent is defined in an agent configuration file named CONFIG. You can edit the CONFIG file using the Server Manager, or you can edit the file manually. You must install the master SNMP agent before you can enable the SNMP subagent.
If a bind error message appears similar to System Error: Could not bind to port, when restarting the master agent, use ps -ef | grep snmp to check if magt is running. If it is running, use the command kill -9 pid to end the process. The CGIs for SNMP will then start working again.
This section includes the following topics:
The Administration Interface will not start the SNMP master agent on ports other than 161.
Specify the desired port in the /server-root/plugins/snmp/magt/CONFIG file .
Run the start script as follows:
cd /server-root/proxy-admserv
./start -shell /server-root/plugins/snmp/magt/magt
/server-root/plugins/snmp/magt/CONFIG
/server-root/plugins/snmp/magt/INIT
The master agent will then start on the desired port. The user interface will be able to detect that the master agent is running.
Log in as superuser.
Check whether an SNMP daemon (snmpd) is running on port 161.
If an SNMP daemon is running, make sure you know how to restart it and which MIB trees it supports. Then kill its process.
Edit the CONFIG file located in plugins/snmp/magt in the server root directory.
(Optional) Define sysContact and sysLocation variables in the CONFIG file.
Log in as superuser.
Check to see if there is an SNMP daemon (snmpd) running on port 161.
If an SNMP daemon is running, make sure you know how to restart it and which MIB trees it supports. Then kill its process.
Edit the CONFIG file located in plugins/snmp/magt in the server root directory.
(Optional) Define sysContact and sysLocation variables in the CONFIG file.
The sysContact and sysLocation entries in the CONFIG file specify the sysContact and sysLocation MIB-II variables. The strings for sysContact and sysLocation in this example are enclosed in quotes. Any string that contains spaces, line breaks, tabs, and so on must be in quotes. You can also specify the value in hexadecimal notation.
The following example shows a CONFIG file with sysContract and sysLocation variables defined:
COMMUNITY public
ALLOW ALL OPERATIONS
MANAGER nms2
SEND ALL TRAPS TO PORT 162
WITH COMMUNITY public
INITIAL sysLocation "Server room
987 East Cannon RoadMountain View, CA 94043 USA" INITIAL sysContact "Jill Dawson email: jdawson@example.com"
You can configure the SNMP subagent to monitor your server.
Access the Server Manager, and click the Server Status tab.
Click the Configure SNMP Subagent link.
The Configure SNMP Subagent page is displayed.
Type the name and domain of the server in the Master Host field.
Type the Description of the server, including operating system information.
Type the Organization responsible for the server.
Type the absolute path for the server in the Location field.
Type the name of the person responsible for the server and the person’s contact information in the Contact field.
Select On to Enable the SNMP Statistics Collection.
Click OK.
Click Restart Required.
The Apply Changes page appears.
Click the Restart Proxy Server button to apply the changes.
Once you have installed the SNMP master agent, you can start it manually or by using the Administration Server.
To start the master agent manually, type the following command at the command prompt:
# magt CONFIG INIT&
The INIT file is a nonvolatile file that contains information from the MIB-II system group, including system location and contact information. If INIT does not 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 start-up process to fail.
To start a master agent on a nonstandard port, use one of two methods:
Method one: In the CONFIG file, specify a transport mapping for each interface over which the master agent listens for SNMP requests from managers. Transport mappings allow the master agent to accept connections at the standard port and at a nonstandard port. The master agent can also accept SNMP traffic at a nonstandard port. The maximum number of concurrent SNMP is limited by your target system’s limits on the number of open sockets or file descriptors per process. The following example shows a transport mapping entry:
TRANSPORT extraordinary SNMP
OVER UDP SOCKET
AT PORT 11161
After editing the CONFIG file manually, you should start the master agent manually by typing the following command at the command prompt:
# magt CONFIG INIT&
Method two: Edit the /etc/services file to allow the master agent to accept connections at the standard port as well as a nonstandard port.