Oracle® Traffic Director Administrator's Guide 11g Release 1 (11.1.1.7.0) Part Number E21036-04 |
|
|
PDF · Mobi · ePub |
Simple Network Management Protocol (SNMP) is a standard that enables management of devices in a network from a network management application running on a remote system. The network management application might, for example, show which servers in the network are running or stopped at any point in time, and the number and type of error messages received.
You can use SNMP to monitor the Oracle Traffic Director instances. To be able to do this, you should do the following:
Configure the instances to support monitoring through SNMP.
Configure the SNMP subagent on the nodes.
Start the SNMP subagent on the nodes.
This section contains the following topics:
When you create a configuration, support for monitoring the instances through SNMP is enabled by default. You can disable, enable, and configure support for SNMP monitoring by using either the administration console or the CLI.
Configuring SNMP Support Using the Administration Console
To enable SNMP support for a configuration by using the administration console, do the following:
Log in to the administration console, as described in Section 2.3.2, "Accessing the Administration Console."
Click the Configurations button that is situated at the upper left corner of the page.
A list of the available configurations is displayed.
Select the configuration for which you want to enable SNMP support.
In the navigation pane, expand Advanced Settings and select Monitoring.
The Monitoring Settings page is displayed.
In the SNMP section of the page, select the SNMP check box. The other parameters in the section are optional.
On-screen help and prompts are provided for all of the parameters.
When you change the value in a field or tab out of a text field that you changed, the Save button near the upper right corner of the page is enabled.
At any time, you can discard the changes by clicking the Reset button.
After making the required changes, click Save.
A message, confirming that the updated configuration was saved, is displayed in the Console Messages pane.
In addition, the Deployment Pending message is displayed at the top of the main pane. You can either deploy the updated configuration immediately by clicking Deploy Changes, or you can do so later after making further changes as described in Section 4.3, "Deploying a Configuration."
Configuring SNMP Support Using the CLI
To view the current SNMP settings for a configuration, run the get-snmp-prop
command, as shown in the following example:
tadm> get-snmp-prop --config=soa
enabled=false
To enable SNMP support, run the set-snmp-prop
command, as shown in the following example:
tadm> set-snmp-prop --config=soa enabled=true
OTD-70201 Command 'set-snmp-prop' ran successfully.
For the updated configuration to take effect, you should deploy it to the Oracle Traffic Director instances by using the deploy-config
command.
For more information about the CLI commands mentioned in this section, see the Oracle Traffic Director Command-Line Reference or run the commands with the --help
option.
When you create an Oracle Traffic Director node (see Section 3.1), an SNMP subagent is created automatically. The SNMP subagent collects information about the instances running on the node.
The SNMP subagent's configuration settings, including the frequency at which the subagent updates statistics, the duration after which cached statistics are timed out, and the port through which the subagent process communicates, are stored in the following file:
INSTANCE_HOME/admin-server/config/snmpagt.conf
You can configure the SNMP subagent's settings by editing the snmpagt.conf
file. Table 13-2 lists the key SNMP subagent parameters.
Table 13-2 SNMP Subagent Configuration Parameters
Parameter in smnpagt.conf | Description | Default Value |
---|---|---|
|
Ports at which the SNMP subagent receives requests |
11161 |
|
Statistics update frequency (seconds) |
5 |
|
Cache timeout period (seconds) |
5 |
The syntax for entries in snmpagt.conf
should be as described in the documentation for snmpd.conf
at: http://www.net-snmp.org/docs/man/snmpd.conf.html
.
After configuring the SNMP subagent on a node, you should start it. The subagent then begins collecting statistics about the Oracle Traffic Director instances on the node.
You can start and stop the SNMP subagent on a node by using either the administration console or the CLI.
Starting and Stopping the SNMP Subagent Using the Administration Console
To start or stop the SNMP subagent on a node by using the administration console, do the following:
Log in to the administration console, as described in Section 2.3.2, "Accessing the Administration Console."
Click the Nodes button that is situated near the upper left corner of the page.
A list of available nodes is displayed.
From the list of nodes, select the node for which you want to start or stop the SNMP subagent.
The General Settings page is displayed.
To start the SNMP subagent, click Start SNMP Subagent. The status changes to Running.
To stop the subagent, click Stop SNMP Subagent. The status changes to Running.
Specify the parameters that you want to change, and then click Save.
A message is displayed in the Console Messages pane indicating that the updated settings are saved.
Restart the administration server by clicking Restart in the Common Tasks pane.
Starting and Stopping the SNMP Subagent Using the CLI
To start the SNMP subagent on one or more nodes, run the start-snmp-subagent
, as shown in the following example:
tadm> start-snmp-subagent --user=admin --port=3002 node1.example.com node2.example.com
OTD-70210 Successfully started the SNMP subagent.
Note:
Alternatively, you can start the SNMP agent in agentx mode, by specifying the --agentx
option when you run the start-snmp-subagent
command.
In agentx mode, the SNMP agent needs to communicate with the operating-system master agent (snmpd
). So you must configure snmpd
to listen to the agentx protocol, by doing the following:
Add the socket path and socket path permissions in the ORACLE_HOME
/admin-server/config/snmpagt.conf
file, as shown in the following example:
Before configuring for agentx
agentuser admin123 agentxsocket /tmp/snmpagt-a46e5844/snmpagt.socket
After configuring for agentx
agentxsocket /tmp/snmpagt-d985d39c/snmpagt.socket agentXPerms 777 admin123 other agentXPerms DIRPERMS 777 admin123
Start snmpd
daemon manually.
To stop the SNMP subagent on one or more nodes, run the stop-snmp-subagent
, as shown in the following example:
tadm> stop-snmp-subagent --user=admin --port=3002 node1.example.com
OTD-70210 Successfully stopped the SNMP subagent.
For more information about the CLI commands mentioned in this section, see the Oracle Traffic Director Command-Line Reference or run the commands with the --help
option.
Note:
The prerequisites for using snmpwalk
are as follows:
For Linux: Make sure the contents snmpwalk package net-snmp-utils-5.3.2.2-9.0.1.el5_5.1
RPM or higher and standard MIBS package net-snmp-5.3.2.2-9.0.1.el5_5.1
RPM or higher are installed.
For Solaris: Make sure the package located at system/management/snmp/net-snmp
is installed. This package contains contents snmpwalk and standards MIBS.
Note:
Prior to using snmpwalk
, if required, you can set most of the snmpwalk
options in the snmp.conf
file, located at <user-home>/.snmp/snmp.conf
. The advantage of setting various options in snmp.conf
is that after setting the options, you can run the snmpwalk
command without specifying the options that are already set in snmp.conf
. For example, snmp.conf
enables you to set the following options:
defaultport 11161 defversion 2c defcommunity public mibdirs +/usr/local/share/snmp/mibs # mibdirs + <otd_install_root>/lib/snmp # mibs +ORACLE-TRAFFICDIRECTOR-MIB
After setting the above options, snmpwalk
can be run as follows:
snmpwalk <hostname> ORACLE-TRAFFICDIRECTOR-MIB::instanceTable
For information about all the options that can be set using snmp.conf, see the man-pages for snmp.conf.
You can view statistics collected by the SNMP subagent, by using the snmpwalk
command-line utility that is available in the Net-SNMP suite of applications (http://www.net-snmp.org
).
The following is the syntax of the snmpwalk
command:
> snmpwalk -c public -v 2c host:port oid
host
is the host name of the Oracle Traffic Director node that you want to monitor.
port
is the listen port of the SNMP subagent on the node. The default port specified in the snmpagt.conf
file is 11161
.
oid
is the unique object identifier series for which you want to view statistics. The OID for the Oracle Traffic Director product is 1.3.6.1.4.1.111.19.190
.
Note:
OIDs are assigned and maintained by the Internet Assigned Numbers Authority. In the OID for Oracle Traffic Director, the first six numbers, 1.3.6.1.4.1
, represent private enterprises, 111
is the unique identifier for Oracle and 19.190
represents the Oracle Traffic Director product. For more information about the structure of OIDs, see RFC 2578 (http://tools.ietf.org/html/rfc2578
).
To monitor statistics by using SNMP v3, do the following:
Create an SNMP v3 user by running the following command as the root
user:
$ sudo net-snmp-config --create-snmpv3-user -ro -a MD5 -A abcd1234 otdadmin
This command does the following:
Adds the following entry in /var/net-snmp/snmpd.conf
:
createUser otdadmin MD5 "abcd1234" DES
Adds the following entry in /etc/net-snmp/snmp/snmpd.conf
:
rouser otdadmin
Start and stop snmpd
.
$ sudo /etc/init.d/snmpd start Starting snmpd: [ OK ] $ sudo /etc/init.d/snmpd stop Stopping snmpd: [ OK ]
As a result of starting and stopping snmpd
, the createUser
entry in the /var/net-snmp/snmpd.conf
file changes as shown in the following example:
usmUser 1 3 0x80001f8801819ee527 0x676164686100 0x676164686100 NULL
.1.3.6.1.6.3.10.1.1.2
0x8b6a9b458c0cb628aa5ba10ebbec48e7 .1.3.6.1.6.3.10.1.2.2
0x8b6a9b458c0cb628aa5ba10ebbec48e7 ""
In this example, 0x80001f8801819ee527
is the generated engine ID.
Run the SNMP agent in agentx mode.
Run snmpwalk
by using the following command. The default port for snmpd is 161
snmpwalk -v3 -u otdadmin -l authNoPriv -a MD5 -A abcd1234 localhost:161 1.3.6.1.4.1
Enabling the snmpwalk Command to Show MIB Object Names Instead of Numeric OIDs
When you run the snmpwalk
command, the output would be as follows:
SNMPv2-SMI::enterprises.111.19.190.1.20.1.2.0.0 = INTEGER: 645 SNMPv2-SMI::enterprises.111.19.190.1.20.1.3.0.0 = Gauge32: 4 SNMPv2-SMI::enterprises.111.19.190.1.20.1.4.0.0 = Gauge32: 4 SNMPv2-SMI::enterprises.111.19.190.1.20.1.10.0.0 = Gauge32: 0 SNMPv2-SMI::enterprises.111.19.190.1.20.1.11.0.0 = Gauge32: 3072 SNMPv2-SMI::enterprises.111.19.190.1.20.1.12.0.0 = Counter64: 0 SNMPv2-SMI::enterprises.111.19.190.1.20.1.13.0.0 = Counter64: 0 SNMPv2-SMI::enterprises.111.19.190.1.20.1.14.0.0 = STRING: "0.0000"
Each line in the output shows the value of a metric, but because the OID is shown in numeric format, it is difficult to identify the name of the specific metric. The snmpwalk
utility can resolve numeric OIDs to textual names by using the management information base (MIB) definitions. For Oracle Traffic Director, the MIB definitions file is available in the following directory:
ORACLE_HOME/lib/snmp/ORACLE-TRAFFICDIRECTOR-MIB.txt
To enable the snmpwalk
command to show MIB object names instead of numeric OIDs, do one of the following:
Set the MIBS
environment variable on the host to point to the Oracle Traffic Director MIB.
> set env MIBS=+ORACLE-TRAFFICDIRECTOR-MIB
Then, run the snmpwalk
command and either grep
the output for the required MIB object or explicitly specify the required MIB object name.
For example, to view statistics for proxy cache parameters for an Oracle Traffic Director instance running on the node app1
, run the following command:
> snmpwalk snmpwalk -c public -v 2c app1:11161 ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheTable
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheEnabledFlag.0.0 = INTEGER: enabled(1)
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheCountEntries.0.0 = Counter64: 0
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheSizeHeap.0.0 = Counter64: 16498
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheCountContentHits.0.0 = Counter64: 0
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheCountContentMisses.0.0 = Counter64: 0
ORACLE-TRAFFICDIRECTOR-MIB::proxyCacheCountHits.0.0 = Counter64: 0
...
Specify the Oracle Traffic Director MIB explicitly for the snmpwalk
command by using the -m
option.
For example, to view the origin-server names for an Oracle Traffic Director instance running on the local host, run the following command:
> snmpwalk -c public -v 2c -m $ORACLE_HOME/lib/snmp/ORACLE-TRAFFICDIRECTOR-MIB.txt localhost:11161 ORACLE-TRAFFICDIRECTOR-MIB::originServerName
For a list of the SNMP MIB object names that you can use to query for specific statistics, see Appendix A, "Metrics Tracked by Oracle Traffic Director."
For more information about snmpwalk
, see the documentation at: http://www.net-snmp.org/docs/man/snmpwalk.html
.