WAS v8.5 > Monitoring > Monitoring overall system health > SNMP based performance monitoring for WAS

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 WAS to enable the collection of performance metrics.

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 WAS" topic.

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

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:

  1. Start the deployment manager server.
  2. Start wsadmin 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 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>;/opionalLibraries/IBM/SNMPAgent/config/templates
    /templateSnmpAgentServer.car -nodeName <node name>;-serverName SnmpAgent }
    where <washome> is the complete installation path of WAS, and <nodename> is the name of the node to which the IBM WebSphere Snmp Agent is to be created.

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, first enable Performance Monitoring Infrastructure (PMI) monitoring from the dmgr console on the required server.

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>

    You should only edit the registryPort, ipAddress and authMode attributes. Modifying any other attribute could result in undefined behavior.

    .

    Attributes in the agentConfig.xml file.

    Attribute Name Description
    registryPort The port number to register the bootstrap agent with the RMI service registry. This attribute is present in the <agentConfig> tag.

    Specify a port number above 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.

    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.
    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.

    The privacy mode of Snmp v3 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. Set all of the attributes that 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.

    Attributes in the jmxConfig.xml file.

    Attribute name Description
    connectorType We 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.

    If we specify any other value, IBM WebSphere Snmp Agent uses SOAP by default.

    Security Whether WAS security is enabled. We 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.

    If we specify any other value, IBM WebSphere Snmp Agent uses no by default.

    Address Specifies the Hostname or IPAddress of the WAS.
    Port SOAP_CONNECTOR port for SOAP connection and the BOOTSTRAP for RMI connection.
    sampleInterval Interval (number of seconds) in which the WebSphere Snmp Agent should retrieve PMI data. This value should be at least 60.
    User If we have enabled the security attribute, set the username required to logon to the console.
    Password If we have enabled the security attribute, set the password required to logon to the 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.

    The files, soap.client.props and sas.client.props respectively, are present with the WAS installation, and are located in the </was_profile>/properties directory. Modify the value to point to the location on your system.

    sslRMIConfig f you choose the RMI connection, the SSL handshake is performed when this security attribute is enabled. We can use the default ssl.client.props file, located in the </was_profile>/properties directory, or we can modify it according to the instructions contained in the file.

    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 Location of the truststore file on the host on which the WebSphere Snmp Agent is running. We can use the default truststore or create our own. If we use the default truststore, make sure this value reflects the corresponding path on your machine.
    tsPassword Password required to access the truststore.
    keyStore Location of the keystore file on the host on which the WebSphere Snmp Agent is running. We can use the default truststore or create our own. If we 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 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.

    The bootstrap address or soap connector can be identified by clicking Server > Server Types > WASs in the dmgr console. Select the name of the 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&gt;127.0.0.1</HostName>    <Port&gt;163</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

You must enable security for the IBM WebSphere Snmp Agent to connect to a security-enabled WAS environment. Read the topic "Enabling security for the IBM WebSphere SNMP Capability" for more information.


Related concepts:

SNMP based performance monitoring for WAS


Related


Enable security for the IBM WebSphere SNMP Capability
Access the IBM WebSphere SNMP Capability
Monitoring performance with IBM Tivoli Composite Application Manager for WAS


+

Search Tips   |   Advanced Search