Installing and configuring the IBM WebSphere SNMP Capability

You must first install and configure the IBM® WebSphere® Simple Network Management Protocol (SNMP) Capability on IBM WebSphere Application Server to enable the collection of performance metrics.

Before you begin

Note: For more information about the IBM WebSphere SNMP Capability (also referred to as the IBM WebSphere Snmp Agent), read the "SNMP based performance monitoring for WebSphere Application Server" topic.

Before you install the IBM WebSphere SNMP Capability, confirm that the WebSphere Application Server Version is 8.5 or later and is installed with a stand-alone thin client.

About this task

The IBM WebSphere Snmp Agent files are located in the <WAS_HOME>/optionalLibraries/IBM/SNMPAgent directory:

The IBM WebSphere Snmp Agent must be created as a generic server using the provided template configuration archive file, which is <WAS_HOME>/optionalLibraries/IBM/SNMPAgent/templateSnmpAgentServer.car.

To install the IBM WebSphere Snmp Agent, perform the following steps:

Procedure

  1. Start the deployment manager server.
  2. Start wsadmin with -lang jacl to connect to the deployment manager server.
  3. Create the WebSphere WAS_NODE_NAME variable at node scope, with node name as the value:
    $AdminTask setVariable {-scope Cell=<cell name>,Node=<node name> -variableName WAS_NODE_NAME -variableValue <node name> }
    where <nodename> is the name of the node in which the IBM WebSphere Snmp Agent generic server is to be created.
  4. Create the IBM WebSphere Snmp Agent as a generic server using the provided template configuration archive:
    $AdminTask importServer {-archive <washome>/optionalLibraries/IBM/SNMPAgent/config/templates
    /templateSnmpAgentServer.car -nodeName <node name> -serverName SnmpAgent }
    where <washome> is the complete installation path of WebSphere Application Server, and <nodename> is the name of the node to which the IBM WebSphere Snmp Agent is to be created.
  5. Save the configuration.
    $AdminConfig save

What to do next

One or more IBM WebSphere Snmp agents can be created as generic servers connecting to different application servers and administration servers, such as deployment manager, NodeAgent and AdminAgent.

Configure the IBM WebSphere Snmp Agent by modifying three xml files: agentConfig.xml, jmxConfig.xml and trapConfig.xml. These xml files are located in the WebSphere configuration repository under the cells/<tcell name>;/nodes/<tnode name>/servers/<server name> directory.

Before you configure the three xml files, you must first enable Performance Monitoring Infrastructure (PMI) monitoring from the administrative console on the required server.

Note: In the Network Deployment environment, the IBM WebSphere SNMP Capabilities should be configured in the configuration repository of the deployment manager.
To configure the three xml files for the IBM WebSphere Snmp Agent, perform the following steps:
  1. Open the agentConfig.xml file. This file configures the hostname, port and community on which the IBM WebSphere Snmp Agent runs. Make a backup of the file before editing to preserve the original copy.
    <!--sample agentConfig.xml -->
    <agentConfig name="WsSNMPAgent" logFile="log/WsSNMP.log"
        registryPort = "1107" agents = "WsSNMP">
      <metadata
        mibsFolder = "mibs"  
        mibs="nh-smi.smi,rfc1213-mib.mib,rmon-mib.mib,snmpv2-tc.mib,websphere-mib.mib”   />ok
    <WsSNMP ipAddress = "localhost" snmpPort = "161" 
      views="V1" 
      Behaviors="getScalars,getCollection" jmxConfigFile="jmxConfig.xml"  user="nick2" authMode="MD5" password="password">
      			
      <V1
      jmacfgFiles = "oid.out" 
     trapConfig = "config/trapConfig.xml"/>
      			
      <getScalars
      oid = "1.3.6.1.4.1.1977.22.10.1.0"
      class = "com.ibm. ws.pmi.snmp.behaviors.GetScalarsBehavior"/>  			
    			
      <getCollection
      oid = "1.3.6.1.4.1.1977.22.10.10.1.2"
      class = "com.ibm. ws.pmi.snmp.behaviors.GetCollectionBehavior"/>	
    <…..>		
     </WsTSNMP>
      
    </agentConfig>
    Note: You should only edit the registryPort, ipAddress and authMode attributes. Modifying any other attribute could result in undefined behavior.
    .
    Table 1. Attributes in the agentConfig.xml file
    Attribute Name Description
    registryPort The port number to register the bootstrap agent with the Java™ RMI service registry. This attribute is present in the <agentConfig> tag.
    Note: Specify a port number higher than 1024 to avoid using reserved ports.
    ipAddress The address of the host on which the IBM WebSphere Snmp Agent runs. The same value should be set in SNMP monitoring software to communicate with the IBM WebSphere Snmp Agent. This attribute is present in the <agent> tag.
    Note: Specify the fully qualified hostname/IP address instead of the default value: localhost.
    snmpPort The port number on which the WebSphere Snmp Agent listens for the snmp packets. The same value should be set in SNMP monitoring software to communicate with the IBM WebSphere Snmp Agent. This attribute is present in the <agentConfig> tag.
    user The name of the user authorized to connect to the IBM WebSphere Snmp Agent. The same value should be set in SNMP monitoring software to communicate with the IBM WebSphere Snmp Agent. This attribute is present in the <agent> tag.
    Note: "user" and "password" are the user/password credentials used for the SNMP monitor that is to connect to the SNMP Agent. These credentials are not the WebSphere Application Server credentials used to log in to the administrative console.
    authMode The authentication mode used for communicating with the IBM WebSphere Snmp Agent. The same value should be set in SNMP monitoring software to communicate with the IBM WebSphere Snmp Agent. This attribute is present in the <agent> tag.
    password The password of the authorized user defined in the ‘user’ attribute. The same value should be set in SNMP monitoring software to communicate with the IBM WebSphere Snmp Agent. This attribute is present in the <agent> tag.
    Note: The privacy mode of Snmp Version 3 is not supported in the current release of IBM WebSphere Snmp Agent.
  2. Open thejmxConfig.xml file. Make a backup of the file before editing to preserve the original copy.

    This configuration file contains information about the Mbean server from which the PMI data must be collected. You must set all of the attributes that are specified in this file.

    All nodes and attributes, except those under <Mbean>, are static (that is, they can be configured only before starting the IBM WebSphere Snmp Agent). However, the nodes and attributes under <Mbean> can be modified even when the IBM WebSphere Snmp Agent is running.

    In the following table, the only attributes that can be configured when security is enabled are: Security, User, Password, connectorSOAPconfig/connectorRMIconfig, sslRMIConfig, trustStore, tsPassword, keyStore and ksPassword.

    Table 2. Attributes in the jmxConfig.xml file
    Attribute name Description
    connectorType You can only specify the following values as the connector type:
    • SOAP
    • RMI
    Specify the SOAPmbeanServer attribute if you are using the connector type SOAP and the RMIm-beanServer attribute if you are using connector type RMI.
    Note: If you specify any other value, IBM WebSphere Snmp Agent uses SOAP by default.
    Security Specifies whether WebSphere Application Server security is enabled. You can only specify the following values:
    • To enable security, set the value to yes or y.
    • To disable security, set the value to no or n.
    Note: If you specify any other value, IBM WebSphere Snmp Agent uses no by default.
    Address Specifies the Hostname or IPAddress of the WebSphere Application Server.
    Port Specifies the SOAP_CONNECTOR port for SOAP connection and the BOOTSTRAP for RMI connection.
    sampleInterval Specifies the interval (number of seconds) in which the WebSphere Snmp Agent should retrieve PMI data. This value should be at least 60.
    User If you have enabled the security attribute, set the username required to log in to the administrative console.
    Password If you have enabled the security attribute, set the password required to log in to the administrative console.
    connectorSOAPconfig/connectorRMIconfig If security is enabled, and the username or password (or both) are not specified, the WebSphere Snmp Agent looks for the username and password in the file that this attribute points to.
    Note: The files, soap.client.props and sas.client.props respectively, are present with the WebSphere Application Server installation, and are located in the </was_profile>/properties directory. Modify the value to point to the location on your system.
    sslRMIConfig If you choose the RMI connection, the SSL handshake is performed when this security attribute is enabled. You can use the default ssl.client.props file, which is located in the </was_profile>/properties directory, or you can modify it according to the instructions contained in the file.
    Note: For connectorRMIConfig and sslRMIConfig, the path name should be preceded by file. For example: sslRMIConfig="file:/opt/IBM/Websphere/AppServer/profiles/Dmgr01/properties/ssl.client.props".
    trustStore Specifies the location of the truststore file on the host on which the WebSphere Snmp Agent is running. You can use the default truststore or create your own. If you use the default truststore, make sure this value reflects the corresponding path on your machine.
    tsPassword Specifies the password required to access the truststore.
    keyStore Specifies the location of the keystore file on the host on which the WebSphere Snmp Agent is running. You can use the default truststore or create your own. If you use the default truststore, make sure this value reflects the corresponding path on your machine.

    The truststore and keystore files perform the SSL handshake for SOAP when security is enabled.

    ksPassword Specifies the password required to access the keystore.
    Mbean Specifies the Mbeans that must be monitored. This node can have any number of collection children nodes. Each collection node has three attributes:
    expression
    Any regular expression supported by Java, and is used to specify the pattern of Mbeans that must be monitored.
    counterMode
    Can be automatic or manual
    counter
    If counterMode is automatic, all of the counters of the matched Mbeans are monitored. If counterMode is manual, the counters attribute should have a comma-separated list of counters to be monitored for the matched Mbeans.
    Note: The bootstrap address or soap connector can be identified by clicking Server > Server Types > WebSphere Application Servers in the administrative console. Select the name of your application server (for example, dmgr). Once the Application Server page is displayed, select the configuration tab (if it is not already selected). Scroll down to Communication and expand Ports.
  3. Open the trapconfig.xml file. Make a backup of the file before editing to preserve the original copy.
    This file contains the list of trap listeners. Multiple listeners might listen for SNMP trap messages. An administrator can add multiple trap destinations in the trapConfig.xml file in the following format:
    <?xml version="1.0" encoding="UTF-8"?>
    <tns:TrapDestinations 
    xmlns:tns="http://www.ibm.com/schema/WsT/SNMPSchema/TRAPConfig/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ibm.com/schema/WsT/SNMPSchema/TRAPConfig/TrapConfig.xsd ">
    
    <TrapDestination community="public" index="2" name="abcdom" 
    protocol="2" status="3" version="1">
       <HostName>127.0.0.1</HostName>
       <Port>161</Port>
      </TrapDestination>
    </tns:TrapDestinations>
    where:
    Community
    The community name to which this entry belongs
    Protocol
    The protocol to be used:
    • 1 – for ip (default)
    • 2 – for ipx
    Version
    SNMP version to use when generating the trap
    Index
    The unique integer index ID. It is ignored if multiple trap destinations have the same index value.
    Status
    Status of the table entry. It contains one of the following values:
    • 1 - active
    • 2 - notInService
    • 3 - notReady
    • 4 - createAndGo
    • 5 – createAndWait
    • 6 – destroy
    <TrapDestinations>
    Main root element of the trapConfig.xml
    <TrapDestination>
    Defines a trap destination listener
    <tHostName>
    The hostname or IP address of the listener
    <tPort>
    The port number where the listener is running
    <Status>
    Used to enable or disable specific notifications
Note: You must enable security for the IBM WebSphere Snmp Agent to connect to a security-enabled WebSphere Application Server environment. Read the topic "Enabling security for the IBM WebSphere SNMP Capability" for more information.

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: March 5, 2017 17:28
File name: tprf_snmp_install.html