Page tree
Skip to end of metadata
Go to start of metadata

Note

This pattern is only available in Atrium Discovery 8.3 and later

Overview

The DiscoverWebSphere pattern performs a deep discovery of WebSphere instances via configuration files by parsing the results to build a J2EE inferred model of its Applications and Resources.

In particular it tries to:

  • get the application names from serverindex.xml and create the application SoftwareComponent node.
  • get the JNDI names of all the resources used by each application from the <appname.ear>/WEB-INF/web.xml file
  • read the resources.xml files for the server, node and cell and get database and mail resource info.
  • create the database and mail Detail nodes.
  • link each resource with the apps that use it.

Trigger

The DiscoverWebSphere pattern triggers off the creation or confirmation of a IBM WebSphere Application Server Software Instance whose profile_dir, cell_name and node_name attributes all exist.

serverindex.xml Configuration File

The pattern then tries to read the serverindex.xml file on the following path:

UNIX

  • <profile_dir>/config/cells/<cell_name>/nodes/<node_name>/serverindex.xml

Windows

  • <profile_dir>\config\cells\<cell_name>\nodes\<node_name>\serverindex.xml

The pattern stops immediately if the serverindex.xml file can not be read.

Deployed Applications

The contents of the serverindex.xml file are parsed using the following xpath to extract a list of application names:

  • //serverEntries[@serverName="<server_name>"]/deployedApplications/text()where <server_name> is correspondent server name of trigger WebSphere Application Server Software Instance

Server Log

The pattern then tries to extract results matching "ADMN0015I", "WSVR022[01]I WSVR0100W" or "WSVR022[01]I|WSVR0100W" from SystemOut*.log files on the following path:

UNIX

  • <profile_dir>/logs/<server_name>/SystemOut*.log

Windows

  • <profile_dir>\\logs\\<server_name>\\SystemOut*.log

From the results, it then tries to extract WebSphere's startup time using the following regular expression:

  • (?:\n|^).*\[(.*)\]

and then the timestamp and state of each application using the following regular expression:

  • (?:\n|^).*\[(.*)\].*Application\s(started|stopped):\s(\w+)

Deployed Apps

The pattern then extracts the application name using the following regular expression:

  • ^(.*?)\.ear

and updates its running state.

The pattern then extracts the ear name using the following regular expression:

  • ^(.*?\.ear)

and lists the contents of the following directory:

  • <profile_dir>/installedApps/<cell_name>/<ear_name>

The pattern then gets the JNDI names of all the resources used by each application by reading its web.xml file on the following path:

  • <app_path>/<app_dir.name>/WEB-INF/web.xml

and then extract the res refs using the following xpath:

  • /web-app/resource-ref/res-ref-name/.

and then the res env refs using the following xpath:

  • /web-app/resource-env-ref/resource-env-ref-name/.

Clustered Application modeling

Clustered WebSphere instances are discovered starting from BMC Discovery v11.0 onward.

If the discovered Application belongs to clustered WebSphere instance the Extended discovery pattern will search for the related SoftwareCluster Node and will create a Containment link with it.

JDBC and Mail Resources

The pattern then reads the resources.xml file for the server, node and cell to get database and mail resource information:

  • <profile_dir>/config/cells/<cell_name>/nodes/<node_name>/servers/<server_name>/resources.xml

Also the pattern tries to check is this setup clustered by looking at existence of any directories inside 'clusters' sub-directory of the cells directory:

  • <profile_dir>/config/cells/<cell_name>/clusters

and then the pattern obtains cluster configuration from each found cluster.xml configuration file:

  • <profile_dir>/config/cells/<cell_name>/clusters/<cluster>/cluster.xml
    where <cluster> is found sub-directory name in 'clusters' directory and in the same time it is the name of existing cluster we should check

After obtaining cluster config the pattern checks for belonging of currently processing server to this cluster by result of matching the following XPath query against cluster.xml:

  • //members[@memberName="<server_name>"]/@memberNamewhere <server_name> is server name of current server

In successful case this means that current server belongs to this cluster and the following resources configuration file is added to list of processed files:

  • <profile_dir>/config/cells/<cell_name>/clusters/<cluster>/resources.xml

DatabaseDetail and MailDetail nodes are then created for each JDBC or Java Mail resource found.

JDBC Resource identification is based on using the following XPath query against any of resources.xml:

  • resources.jdbc:JDBCProvider/factories/@name

Java Mail Resource is identified by the following Xpath query:

  • resources.mail:MailProvider/factories/@name

Each resource is then linked with the apps that use it.

Clustered JDBC and Mail Resources

Clustered WebSphere instances are discovered starting from BMC Discovery v11.0 onward.

If the Extended WebSphere pattern determines the Resource's scope and if its configuration file belongs to cluster it will create a link to correspondent SoftwareCluster instance instead of WebSphere Application Server SoftwareInstance.

1 Comment

  1. Unknown User (nicholas.nguyen@kroger.com)

    The section under Server Log is incorrect:
    UNIX
    <profile_dir>\\logs
    <server_name>
    SystemOut*.log

    Windows
    <profile_dir>/logs/<server_name>/SystemOut*.log

    May need to switch the headers of Windows and UNIX.