Chapter 15 Using the SNMP Agent


Configuring SNMP agents

Before using an agent, you must first configure it using Jaguar Manager. After you create an agents, you can start it from the command line. Once the agent is running, you can access it from an Internet browser window or from an SNMP management application.

Defining agents in Jaguar Manager

Jaguar Manager offers a simple way to define new SNMP agents.

Steps Defining agents in Jaguar Manager

Make sure that EAServer is running and accepting connections before you begin.

  1. If necessary, start Sybase Central and connect to Jaguar Manager.
  2. Click the Agents folder to highlight it.
  3. Select File | New Agent to create a new agent.
  4. Enter a name for the agent in the Create Agent dialog window and click OK.
  5. The Agent Properties dialog window appears. Configure the properties as described in "Configuring agent properties in Jaguar Manager".

Configuring agent properties in Jaguar Manager

The Agent Properties dialog has three tabs: General, Configuration and Backup Agents. You need only set the properties on the General and Configuration tabs.

Steps Configuring agent properties

  1. If the Agent Properties dialog box is not displayed, display it by clicking on the agent name and selecting File | Agent Properties.
  2. Enter the General properties.
    Field name Explanation
    Description Enter the agent's description.
    Host Name Enter the name of the local server. To view agent activity from an Internet browser, specify the host name and the HTML port number (below) as the URL. For example: http://myhost:8182 .
    HTML Port Enter the port number you want to use for HTML connections to the agent. The default is 8182. To view agent activity from an Internet browser, specify the host name (above) and the HTML port number as the URL. For example: http://myhost:8182 .
    SNMP Port Enter the port number you want to use for SNMP/UDP connections to the SNMP agent. The default is 8185. To view agent activity from an SNMP management application, enter the host name (above) and the SNMP port number where appropriate.
    Refresh Rate Enter the refresh rate time in milliseconds. The default is 60000 (one minute).
  3. On the backup tab, choose the agents for which this agent will act as a backup.
  4. Click OK to save the agent properties.

Starting the SNMP agent from the command line

Agents you create in Jaguar Manager must be started from the command line.

Steps Preparing to start an agent

Before you run the agent script at the command line, you must create a properties file that specifies the server user name and password.

  1. Create the file .agent1Params.props in %JAGUAR%\html\classes\.

    You can specify a different properties file name, but you must always specify that file name at the command line, since .agent1Params.props is the default for the runAgent script.
  2. Add the following lines to the file:

    username= username
    password= password

    The agent uses the properties file to connect to the repository. The agent also verifies that the user name and password entered by the user matches the contents of the file.

    Note   Because the server password is stored in the properties file in unencrypted form, Sybase recommends that you set appropriate permissions on the file.You must create a separate properties file for each host to which agents connect.

Steps Starting the agent on the command line

  1. Navigate to the %JAGUAR%\bin directory and enter:

    runagent agentname hostname port [properties_file]
    
    Where agentname is the name of the agent you want to start, hostname is the name of the local server, port is the server port number, and properties_file is the name of the agent properties file (the default is .agent1Params.props). For example:

    runagent agent1 myhost 9000
    


    After you start the agent script, you can view active agents in an Internet browser window or with an SNMP management application.

Viewing agents in an Internet browser window

You can access active agents in an Internet browser window.

To view an agent, open an Internet browser window and enter the URL as:

http://hostname:HTML_port_number

Where hostname is the name of the server where the agent is running and HTML_port_number is the HTML port specified in the agent configuration properties.

Note   HTML connections to an agent must begin with http:// .

When you navigate to the URL, you are prompted for the system administrator login and password. Enter the login and password to continue to the Agent View window.

The Agent View window

The Agent View window contains the following information:

MBean View screen

When you click on the name of a registered MBean in the Agent View window, the MBean View window for that MBean appears. Each MBean View window contains:

Starting, shutting down, and restarting EAServer with the SNMP agent

You can use the Agent View screen to start, shut down, or restart a server.

Steps Starting a server

  1. Open the Agent View screen.
  2. Set the ServerControlName attribute to "Jaguar".
  3. Set the ServerStartCmd attribute to the name of your server start script (serverstart.bat).
  4. Click on Apply.
  5. Click on startServer to start the server.

Steps Shutting down a server

  1. Open the Agent View screen.
  2. Click on the MBean beneath Server Table.
  3. Click on Shutdown to shut down the server.

Steps Restarting a server

  1. Open the Agent View screen.
  2. Click on the MBean beneath Server Table.
  3. Click on the Restart button to restart the server.

Connecting to agents with SNMP management applications

To connect to an agent using your SNMP management tool, open a User Datagram Protocol (UDP) connection to the host and SNMP port number you specified for the agent in Jaguar Manager.

Many SNMP management applications have the ability to import MIB files. You may have to manually import EAServer-specific MIB values into your SNMP management application. You can find the MIB file at %JAGUAR%\SNMP\easmib.mib.

 


Copyright © 2002 Sybase, Inc. All rights reserved.