Configuring TIBCO ActiveMatrix BusinessWorks

Configuring TIBCO ActiveMatrix BusinessWorks

This section discusses the setup that is required in both versions of TIBCO ActiveMatrix BusinessWorks to enable monitoring, as well as the steps needed to install, configure, and setup the Solution Package for TIBCO ActiveMatrix BusinessWorks (versions 5 and 6). 

Required Setup in TIBCO ActiveMatrix BusinessWorks (Versions 5 and 6)

Some setup is required in TIBCO ActiveMatrix BusinessWorks Versions 5 and 6 to enable monitoring. For Version 6, there are two options: You can either install the OSGi plugin in every AppSpace you want to monitor, or you can enable the TIBCO Hawk MicroAgent in each AppSpace you want to monitor. Monitoring via the OSGi plugin is recommended for better performance and reliability.

For Version 5, monitoring must be done via TIBCO Hawk, which is enabled by default, but you also need to install the RTViewBWAgent plug-in microagent. If you enable JMX monitoring, you can access additional data such as CPU and Memory data. For BWSE engines, additional setup is needed to allow access to AMX Node data.

Enable Monitoring via OSGi Plugin for Version 6

This section describes the “Prerequisites” and steps required to install the RTView OSGi (Open Service Gateway Initiative) BusinessWorks plugin into “RTView TIBCO ActiveMatrix BusinessWorks”, “Docker”, and “Cloud Foundry”.

Prerequisites

BW 6.3.4
BWCE 2.2.0
RTVAPM X.X

RTView TIBCO ActiveMatrix BusinessWorks

Note: When upgrading to a new version of the OSGi plugin jar, make sure to delete the contents of the appnode config directory ($TIBCO_HOME/bw/ 6.x/domains/<domain>/appnodes/<appspace>/<appnode>/config) before restarting an appnode. If you do not remove the existing contents, the plugin might not function properly.

To enable the plugin in RTView® TIBCO® ActiveMatrix BusinessWorks™, perform the following:

  • Stop all AppSpaces that are to be monitored and stop the bwagent, if running.

  • Copy the plugin to $TIBCO_HOME/bw/<version>/system/shared.

  • Start the bwagent. Do not start the AppNode(s) or AppSpace(s) yet.

Note: Continue to the next step if you want to modify the default property values. You may skip the following steps entirely if you want to use the default property values.

  • Navigate to the system config folder: $TIBCO_HOME/bw/<version>/config/

  • Copy the appspace_config.ini_template file to a temporary file.

  • Edit the temporary file and set the properties below as needed.

Available Properties

Default Value

Available Properties

Default Value

sl.rtview.rtvagent.name

updater

sl.rtview.rtvagent.target

localhost:3372

sl.rtview.rtvagent.update

10 (seconds)

sl.rtview.bw.activities.enabled

false

  • Use the bwadmin config command to push the configuration to the AppSpace:

bwadmin config -d <domain> -cf <temporary-file> appspace <appspace>

  • (Optional) To see plugin output (INFO or TRACE) for any AppNode in the bwappnode.log file, add the following to the "user properties" section of the logback.xml file ($TIBCO_HOME/bw/6.3/domains/<domain>/appnodes/<appspace>/<appnode>/logback.xml):

<logger name="com.sl.rtvapm.osgi">
<level value="INFO"/>
</logger>

  • Restart the AppSpace.

  • Repeat the last four steps for every AppSpace to be monitored.

Docker

To enable the plugin in Docker, perform the following:

  • Download bwce_cf.zip from TIBCO (for example, save the file to the /opt directory).

cd /opt/tibco/bwce/2.2/docker

cp /opt/bwce_cf.zip ./resources/bwce-runtime

  • Build the image

docker build -t tibco/bwce:latest .

  • Add the RTView OSGi plugin to your application by copying the application archive (tibco.bwce.sample.BookStore.ear, for example) and the plugin jar (com.sl.rtvapm.osgi.jar) to your project directory.

  • Create a Docker file containing:

FROM tibco/bwce:latest
MAINTAINER Tibco
ADD tibco.bwce.sample.BookStore.ear /
RUN mkdir -p /resources/addons/jars
ADD com.sl.rtvapm.osgi.jar /resources/addons/jars
EXPOSE 8080

  • Build the application:

docker build -t tibco/bookstore:latest .

  • Configure the plugin via Java system properties, BW_JAVA_OPTS, and the Docker run command, for example:

OPTS="-Dsl.rtview.rtvagent.target=localhost:3372 \
-Dsl.rtview.rtvagent.name=updater \
-Dsl.rtview.bw.domain=Containers \
-Dsl.rtview.bw.appspace=Docker \
-Dsl.rtview.bw.appnode=docker-1"

docker run -i \
-e ... \
-e BW_JAVA_OPTS="$OPTS" \
-e ... \
tibco/bookstore:latest

Available Properties

Default Value

Available Properties

Default Value

sl.rtview.rtvagent.name

updater

sl.rtview.rtvagent.target

localhost:3372

sl.rtview.rtvagent.update

10 (seconds)

sl.rtview.rtvagent.class

SL-BW6OSGI-Agent

sl.rtview.bw.activities.enabled

false

sl.rtview.bw.domain

<system default>

sl.rtview.bw.appspace

<system default>

sl.rtview.bw.appnode

<system default>

Note: If you choose not to supply values for the sl.rtview.bw.domain, sl.rtview.bw.appspace, and sl.rtview.bw.appnode properties, then unique names will be created for appspace and appnode, and each container will appear as a standalone application with a single appnode. If you supply specific names, then your containers will appear in the displays as if they were appnodes in an appspace, and if they are instances of the same application, their metrics will be summed for the application as if it were deployed to the appspace. In summary, you may configure your containers to run as if they were appnodes in an appspace; or else they will run such that each is a unique appnode and application.

  • The plugin logs to the console at levels INFO and TRACE. You can set the log level for all packages with BW_LOGLEVEL, and so on.

-e BW_LOGLEVEL=INFO

Cloud Foundry

To enable the plugin in Cloud Foundry, perform the following:

  • Download the bwce-buildpack_cf-v2.2.0.18.zip file from TIBCO.

  • Insert the plugin jar into the zip file at /resources/addons/jars.

  • Upload the buildpack to your cloud. For example:

cf create-buildpack bw-buildpack bwce-buildpack_cf-v2.2.0.18.zip 1

  • Configure the plugin via Java system properties and BW_JAVA_OPTS in the manifest.yml file. For example:

. . .
env:
. . . 
BW_JAVA_OPTS: '-Dsl.rtview.rtvagent.target=hostyy:3372 -Dsl.rtview.rtvagent.name=hostxx -Dsl.rtview.bw.domain=BW6 -Dsl.rtview.bw.appspace=PCF -Dsl.rtview.bw.appnode=pcf'
. . .

Available Properties

Default Value

Available Properties

Default Value

sl.rtview.rtvagent.name

updater

sl.rtview.rtvagent.target

localhost:3372

sl.rtview.rtvagent.update

10 (seconds)

sl.rtview.rtvagent.class

SL-BW6OSGI-Agent

sl.rtview.bw.activities.enabled

false

sl.rtview.bw.domain

<system default>

sl.rtview.bw.appspace

<system default>

sl.rtview.bw.appnode

<system default>

  • Push the application.

Enable Monitoring via TIBCO Hawk for Versions 5 and 6

This section discusses the steps required to enable monitoring via TIBCO Hawk for TIBCO ActiveMatrix BusinessWorks (Versions 5 and 6).

ActiveMatrix BusinessWorks Version 6

Perform these instructions if you are monitoring ActiveMatrix BusinessWorks version 6:

  • Enable your applications for statistics collection. You can do this using the TIBCO BusinessWorks administrator CLI with commands such as:

bwadmin enablestats -d MyDomain -a MyAppSpace process MyAppName MyAppVersion

Repeat for each application you wish to monitor.

  • Enable the Hawk MicroAgent in your AppNodes for each AppSpace you wish to monitor. Refer to the Enabling TIBCO Hawk MicroAgent section of the TIBCO BusinessWorks6 Administration Guide.

ActiveMatrix BusinessWorks Version 5

This section is for ActiveMatrix BusinessWorks Version 5 users.

Note: This section does not apply if all your engines are deployed as BusinessWorks Service Engines (BWSE).

Install the RTViewBWAgent plug-in microagent in the Hawk Agent for each domain you have configured to communicate with the Monitor.

RTViewBWAgent detects deployed engines and gets their maximum heap size metrics when the Hawk agent is started. If RTViewBWAgent is not installed, deployed engines are not detected until they have been started and report data to the Monitor. When live data is received the engine is added and its Status is set to LIMITED. The Status remains LIMITEDbecause, although live data metrics are available, the deployment and maximum heap size metrics are still unavailable.

Note: After installation, you can use the Hawk Display to view the RTViewBWAgent microagent and invoke its methods: GetBWDeploymentNames and GetBWDeploymentMaxHeapSizes.

You can also configure the agent to detect deployed engines and make data updates at more frequent, specified intervals. To specify the update interval you uncomment the -update argument in the BWAgentPlugin.hma file and specify a non-zero value. When the -update argument is not used (is commented out), the Monitor does not report that an engine has been deployed or undeployed until the Hawk agent is restarted.

  • Navigate to the agents/BWAgentPlugin directory of your Monitor installation and locate the following two files:

BWAgentPlugin.jar

BWAgentPlugin.hma

  • For a given domain, find the plug-in directory via this path:

<TIBCO-home>/tra/domain/<domain-name>

  • Repeat the second step for each Hawk domain you have configured to communicate with the Monitor.

  • To (optionally) set RTViewBWAgent to make data updates at more frequent, specified intervals, open the BWAgentPlugin.hma file, uncomment the -update argument and specify a non-zero value. The value, which defaults to 300, represents the update interval in seconds. For example, a value of 3600 updates every hour:

<arguments> 
<arg>-update:3600</arg> 
. . 
</arguments>

  • Copy the BWAgentPlugin.jar file and BWAgentPlugin.hma file into the plug-in directory and restart the Hawk Agent.

Enable Monitoring via JMX for Version 5

ActiveMatrix BusinessWorks version 5 engines can also be enabled for JMX monitoring as documented in TIBCO ActiveMatrix BusinessWorks™ Administration, Monitoring the BusinessWorks Engine Using JMX.

Enable monitoring of BW5 engines via JMX

  • To enable local JMX monitoring, add the following properties to bwengine.tra:

Jmx.Enabled=true
java.property.com.sun.management.jmxremote=true
To enable remote JMX monitoring, add the following properties to bwengine.tra: (Note <port_number> can be any available port)
java.property.com.sun.management.jmxremote.port=<port_number>
java.property.com.sun.management.jmxremote.authenticate=false
java.property.com.sun.management.jmxremote.ssl=false

For example, the BW Engine MyDomain.MyApp.Procs can be enabled for remote JMX monitoring by adding the following lines to the file:

C:\Tibco\tra\domain\MyDomain\application\MyApp\MyApp-Procs.tra:

#
# Enable JMX on port 9000
#
Jmx.Enabled=true
java.property.com.sun.management.jmxremote=true
java.property.com.sun.management.jmxremote.port=9000
java.property.com.sun.management.jmxremote.authenticate=false
java.property.com.sun.management.jmxremote.ssl=false

  • After the BW Engine is enabled for JMX monitoring and restarted, it can be monitored by adding a JMX Connection property in the RTView Configuration Application where the Connection Name is the Engine name. See Configuring Data Collection for RTView Manager for more information.

Enable Monitoring of BWSE Engines for Version 5

This section is for TIBCO ActiveMatrix (AMX) users, and describes how to configure BW Monitor to monitor BWSE engines. BW Monitor needs access to AMX Node data stored in EMS message queues on the AMX Host system. To make this data available to BW Monitor you will create EMS topics with bridges from the queues.

The TIBCO ActiveMatrix BusinessWorks Service Engine (BWSE) is an ActiveMatrix (AMX) component that enables BW engines to participate in the implementation of AMX services. In this case, the BWSE engines run within an AMX Node and are not visible to BW Monitor. However, you can configure BW Monitor to display these engines, as well as to gather JVM memory metrics for the AMX Nodes in which they are running.

Configure for BWSE engines

  • To configure the AMX Host, execute the following commands in the EMS administration tool (tibemsadmin):

create topic rtv.amx.governance.stats
create bridge source=queue:amx.governance.stats target=topic:rtv.amx.governance.stats

  • In AMX Administrator, in the properties for each BWSE engine, set HawkEnabled to true.

Configuring Data Collection for Hawk (Version 5 or 6)

Note: Only the Classpath and Connections regions on the CONNECTIONS tab need to be set up for TIBCO ActiveMatrix BusinessWorks (Version 5 or 6). Modifying the configurations on the DATA COLLECTION and DATA STORAGE tabs is optional.

Note: If using Version 6 and you have installed the OSGI plugin, TIBCO Hawk connections are not needed.

  • Navigate to the Solution Package Configuration > TIBCO Hawk > CONNECTIONS tab.

  • In the CONNECTIONS tab, specify the classpaths for the TIBCO Hawk jar files, the TIBCO Rendezvous jar files, and the TIBCO EMS jar files.

  • Click the 

     icon.

The Add Connection dialog displays.

  • For TIBCO Hawk domains running on EMS transports, specify the connection information and click SAVE where:

Domain: Enter the name of the domain.

Transport Type: Select EMS from this drop down list.

URL: Enter the complete URL for the EMS connection.

Username: The username is used when creating the EMS connection. This field is optional.

Password: This password is used when creating the EMS connection. This field is optional. By default, the password entered is hidden. Click the 

 icon to view the password text.

Agents: Enter the associated Unix/Windows agents. The agent name displays in the field after entering the name and typing a comma or by clicking the Tab or Enter key. You can enter more than one agent in the fields. Once the agent is specified, you can delete the agent by clicking the X next to their name.

  • For TIBCO Hawk domains running on Rendezvous transports, specify the connection information and click SAVE where:

Domain: Enter the name of the domain.

Transport Type: Select Rendezvous from this drop down list.

Service: Enter the Service for the Rendezvous connection.

Network: Enter the Network for the Rendezvous connection.

Daemon: Enter the Daemon for the Rendezvous connection.

Agents: Enter the associated Unix/Windows agents. The agent name displays in the field after entering the name and typing a comma or by clicking the Tab or Enter key. You can enter more than one agent in the fields. Once the agent is specified, you can delete the agent by clicking the X next to their name.

  • After you complete these configuration steps and restart the RTView Data Server, you can verify your Hawk configuration by viewing the dataserver.log file, located in the logs directory. For example:

2013-05-08 13:39:48,009 INFO rtv_stdout - [rtview] ... AppMgr.initApp
2013-05-08 13:39:48,009 INFO rtv_stdout - [rtview] ... BWMON Manager AppMgr.initApp
2013-05-08 13:39:48,025 INFO rtv_stdout - [rtview] ... using filters file <bwmon_filters.xml>
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] ... startApplication()
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] ... startApplication()
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] ----------------------------
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] Group: WIN_AGENTS
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] Agent: demo1(domain1)
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] Agent: demo2(domain1)
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] Agent: demo3(domain1)
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] ----------------------------
2013-05-08 1339:49,056 INFO rtv_stdout - [rtview] ----------------------------
2013-05-08 13:39:49,056 INFO rtv_stdout - [rtview] Group: UNIX_AGENTS
2013-05-08 13:39:49,072 INFO rtv_stdout - [rtview] Agent: demo4(domain2)
2013-05-08 13:39:49,072 INFO rtv_stdout - [rtview] Agent: demo5(domain2)
2013-05-08 13:39:49,072 INFO rtv_stdout - [rtview] Agent: demo6(domain2)
2013-05-08 13:39:49,072 INFO rtv_stdout - [rtview] ----------------------------

Configuring Data Collection for RTView Manager

The configurations defined in this section are only relevant for Version 5 users, and only if they enabled JMX. Version 6 users do not need to complete this section. JMX data is available in the Monitor in the RTView Servers view.

  • Navigate to Solution Package Configuration > RTView Manager > CONNECTIONS tab.

  • Click the 

     icon.

The Add Connection dialog displays.

Connection Name: Use the Engine name for the Connection Name field.

Host: Enter the host for the engine.

Port: Enter the Port specified in your .tra file.

Username: The username is used when creating the connection. This field is optional.

Password: This password is used when creating the connection. This field is optional. By default, the password entered is hidden. Click the 

 icon to view the password text.

  • Optionally, navigate to Solution Package Configuration > RTView Manager > DATA COLLECTION > Poll Rates to update the default polling rates for all RTView Manager caches.

Note: The Connection Discovery option does not impact TIBCO ActiveMatrix BusinessWorks.

Configuring Historical Data for RTView Manager (Optional)

You can specify the number of history rows to store in memory, the compaction rules, the duration before metrics are expired and deleted, and the different types of metrics that you want the Historian to store in the Data Storage tab in the RTView Configuration Application. These configurations already contain default values and modifications to these configurations are optional.

Defining the Storage of In Memory RTView Manager History

You can modify the maximum number of history rows to store in memory in the DATA STORAGE tab. The History Rows property defines the maximum number of rows to store for the JvmGcInfo, JvmMemoryPool, RtvDataServerManager, RtvDisplayServerManager, RtvDataServerClientTotals, TomcatGlobalRequestStats, and TomcatWebModuleTotals caches. The History Rows Large property defines the maximum number of rows to store for the JvmOperatingSystem, JvmThreading, JvmMemory, RtvDataServerClientStats, and TomcatWebModuleStats caches. The default setting for History Rows is 50,000 and the default setting for History Rows Large is 100,000. To update the default settings:

  • Navigate to the Solution Package Configuration > RTView Manager > DATA STORAGE tab.

  • In the Size region, click the History Rows and History Rows Large fields and specify the desired number of rows.

Defining Compaction Rules for RTView Manager

Data compaction, essentially, is taking large quantities of data and condensing it using a defined rule so that you store a reasonably sized sample of data instead of all of your data, thus preventing you from potentially overloading your database. The available fields are:

Condense Interval -- The time interval at which the cache history is condensed. The default is 60 seconds. The following caches are impacted by this setting: JvmGcInfo, JvmMemoryPool, JvmOperatingSystem, JvmThreading, JvmMemory, RtvDataServerManager, and RtvDataServerClientTotals.

Condense Raw Time -- The time span of raw data kept in the cache history table. The default is 1200 seconds. The following caches are impacted by this setting: JvmGcInfo, JvmMemoryPool, JvmOperatingSystem, JvmThreading, JvmMemory, RtvDataServerManager, RtvDataServerClientTotals, TomcatWebModuleStats, TomcatGlobalRequestStats, and TomcatWebModuleTotals.

Compaction Rules -- This field defines the rules used to condense your historical data in the database. By default, the columns kept in history will be aggregated by averaging rows with the following rule 1h -;1d 5m;2w 15m, which means the data from 1 hour will not be aggregated (1h - rule), the data over a period of 1 day will be aggregated every 5 minutes (1d 5m rule), and the data over a period of 2 weeks old will be aggregated every 15 minutes (2w 15m rule). The following caches are impacted by this setting: JvmOperatingSystem, JvmThreading, JvmMemory, RtvDataServerManager, RtvDataServerClientTotals, TomcatWebModuleStats, TomcatGlobalRequestStats, and TomcatWebModuleTotals.

  • Navigate to the Solution Package Configuration > RTView Manager > DATA STORAGE tab.

  • In the Compaction region, click the Condense Interval, Condense Raw Time, and Compaction Rules fields and specify the desired settings.