
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.
Defining agents in Jaguar Manager
Make sure that EAServer is running and accepting connections
before you begin.
- If necessary, start Sybase Central and connect
to Jaguar Manager.
- Click the Agents folder to highlight it.
- Select File | New Agent to create a new agent.
- Enter a name for the agent in the Create Agent dialog
window and click OK.
- 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.
Configuring agent properties
- If the Agent Properties dialog box is not displayed,
display it by clicking on the agent name and selecting File | Agent
Properties.
- 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).
|
- On the backup tab, choose the agents for which this
agent will act as a backup.
- 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.
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.
- 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.
- 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.
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.
Starting the agent on the command line
- 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.
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:
- Domain Name The name of the domain where the agent is registered.
- Number of MBeans The number of MBeans registered for the agent.
- Registered MBeans A list of registered MBeans sorted by domain. Clicking on
the name of an MBean takes you to the MBean View window for that
particular MBean.
- Object Filter A text box that lets you filter the contents of the Agent View
window by object name. Enter the object name in the Filter Object
text box and press Enter to filter the Agent View screen by object
name.
- Agent Admin Click the Admin button to access the Agent Administration
window.
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:
- MBean Name The name of the repository entity for the MBean, and its value.
- MBean Java Class The name of the Java class file from which the MBean is constructed.
- Reload Period You can specify a different reload period in seconds for an
MBean. Enter the new reload time and click on Reload.
- Unregister You can unregister this MBean by clicking on Unregister.
- MBean Attributes This table contains a list of MBean attributes. The attribute
table is divided into four columns:
- Name The name of the attribute. Click on an attribute name to see
more information about it.
- Type The attribute type.
- Access An "R" indicates read-only access. An "RW" indicates that
the value can be changed by entering a new value in the Value field
to the right.
- Value The current value of the attribute. If the attribute access is "RW",
the current value appears in a text box. You can change the attribute
value by entering a new value and clicking on the Apply button below
the table.
- MBean Operations This section contains a list of individual MBean operations.
Click on the name of an operation to see more information about
it.
Each MBean operation monitors a value of
one or more EAServer Management Information Base (MIB) attributes.
To view an attribute's current value, click on the button
below the operation description. To set an attribute to a new value,
enter the value in the text box to the right of the operation button,
then click the Mbean operation button.
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.
Starting a server
- Open the Agent View screen.
- Set the ServerControlName attribute
to "Jaguar".
- Set the ServerStartCmd attribute
to the name of your server start script (serverstart.bat).
- Click on Apply.
- Click on startServer to start the server.
Shutting down a server
- Open the Agent View screen.
- Click on the MBean beneath Server Table.
- Click on Shutdown to shut down the server.
Restarting a server
- Open the Agent View screen.
- Click on the MBean beneath Server Table.
- 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.
|
|