These instructions are written for WebSphere Business Monitor V8.0.1 and use the WBMonitorEventsModel model,
which has been created by using the export monitoring information option
in the workbench.
From the IBM Integration Toolkit, open the WBMonitorEventsProject project and export the
MonitorModels.zip project interchange file
by clicking Export > General > File System.
Open the Business Monitoring perspective in the IBM Integration Designer.
Import the MonitorModels.zip
project interchange file into the MME by clicking
Import > Other > Project Interchange.
Open WBMonitorEvents_Project, and select
WBMonitorEventsModel.mm.
Right-click the monitor model and, from the menu,
select Generate Monitor Java EE Projects.
In the Generate Monitor Java EE Projects wizard
you can either keep the default project name that is automatically generated
or supply your own project name.
Write down the name for the J2EE Application Project Name
and click Finish.
When the code generation is complete, switch to the Java perspective.
Right-click the enterprise archive (EAR) application project that is generated.
If you used the default J2EE Application Project Name, the name is
WBMonitorEventsModelApplication.
Right-click the generated EAR application project and select
Export > EAR File.
In the Export wizard, click Browse
to select the file directory and the
EAR file name to which the EAR application must be exported.
Installing and configuring the monitoring model application
Start your Monitor Server.
Open the Monitor Server administrative console and, from the navigation panel, click
Applications > New Application
and select New Enterprise Application.
Set Path to the new application to the location of the exported
EAR application, and click Next on the remaining panels.
Review the summary information and click Finish.
Check for the message that states that the application has installed successfully.
Click Save to save the changes to the master configuration.
Click
Applications > Application Types > WebSphere Enterprise Applications and
select WBMonitorEventsModelApplication,
click Start.
The Application Status now contains a green arrow.
Create a WebSphere Business Monitor dashboard
These instructions describe creating a dashboard for
WebSphere Business Monitor 7.0.
Note: If security is enabled in your Monitor Server,
you might have to use the Monitor Data Security panel in the
Monitor Server administrative console to assign
appropriate permission so that your monitor models are visible in the dashboard.
For more information, see
IBM WebSphere Business Process Management Information Center.
Start the Business Monitor dashboard.
In the Business Space Manager, on the banner click Actions
and select Create Space.
Type in a name for the new space in the Space Name field.
Click Save.
Create a page by selecting the Create a Page (+) icon in the banner.
Enter the name of the page in the Title field.
Click Save.
Click the created page. Click Edit Page.
In the Widget panel, select Instances
and click the Add to page (+) icon.
In the Instances panel, select Edit Settings from the menu.
Select the Show/Hide page.
If you see the following message
If no monitor models are displayed,
either no models are installed
or you are not authorized to view the installed models,
go to the Monitor Server administrative console and complete the following steps:
Select Security > Monitor Data Security
and click Root.
Highlight the models in the Models pane.
Select KPI-Administrator and click Edit on the Users pane.
Click Search. In the Available column,
select the user that you want to use.
To move the user to the Selected column,
click the arrow (>) and click OK.
On the Monitor Data Security Administration page, click OK.
Go back to the Business Space Manager and refresh the page,
the installed monitor models are displayed.
Select WBMonitorEventsModel in the
"Select the monitoring contexts to personalize" pane.
Drill down and select TotalPurchaseOrderFlow.
Select all the columns under Available, click the double arrow
(>>) to move them to the Selected column.
Click Set as default.
Click OK.
Now add some KPIs:
In the Widget panel, select KPIs
and click the Add to page (+) icon.
From the KPIs panel select Edit Settings from the menu.
Click the plus sign (+)
beside WBMonitorEventsModel to expand the list of KPIs.
Select some of the KPIs from the list. For example,
Total Gold Customer Orders,
Total Regular Customer Orders, and
TotalPurchaseOrderFlow Average Transaction Duration.
Click OK.
Install and configure the message-driven bean (MDB)
In this sample, WebSphere MQ is configured as the JMS Provider.
You must set the following definitions on the Websphere MQ queue manager
before you can configure WebSphere MQ as the JMS Provider:
Create a TCP listener and start it.
Create a Server Connection channel.
Run the WebSphere MQ supplied MQJMS_PSQ.mqsc file to create
the required JMS queues on the Websphere MQ queue manager.
This .mqsc file is contained in the
WebSphere MQ product install directory
in the java/bin subdirectory.
Run the runmqsc command,
for example:
runmqsc IB9QMGR < MQJMS_PSQ.mqsc
When you have completed the previous three steps to set the definitions, you can configure
WebSphere MQ as the JMS Provider. These instructions are for a standalone server environment:
Create a topic connection factory:
From the Monitor Server administrative console expand
Resources > JMS > JMS Providers,
and select an appropriate scope from the list for your configuration.
Under Resources > JMS select
Topic connection factories, click
New.
Click WebSphere MQ messaging provider, click
OK.
Enter the name and JNDI name in the Name and
JNDI name fields;
for example, topicConn
and jms/topicConn,
click Next > Next.
Enter the queue manager name for your
Websphere MQ queue manager and click Next.
Set Transport to Client.
Enter the host name for where your IBM Integration queue manager is running.
In the Port field,
enter the port number of the TCP listener that you defined in the
Websphere MQ queue manager.
In the Server Connection Channel field,
enter the name of the Server Connection channel.
Click Next > Next > Finish.
Click Save.
Create a topic:
Click Resources > JMS and
select Topics, click New.
Click WebSphere MQ messaging provider,
click OK.
Enter the name and JNDI name in the Name and
JNDI name fields;
for example, topicName and jms/topicName.
In the Base Topic Name field, enter the name of the monitoring topic name.
If you use the default configuration, the topic name is
$SYS/Broker/IB9NODE/Monitoring/WBMonitorEventsExecGroup/TotalPurchaseOrderFlow.
In the IBM Integration Toolkit, export the MDB .zip
file WBEventEmitterEAR and extract the
file.
Switch to the Monitor Server administrative console by clicking
Applications > New Application and select
New Enterprise Application.
Click Browse and select the
WMBEventEmitter.ear file that you
extracted from the .zip file,
click Next.
Select Detailed - Show all installation options and parameters,
click Next.
Click Next.
Click Next until you get to
Bind listeners for message driven bean.
Write down the name of the listener port.
Click Next on the remaining
screens; on the final summary screen, click Finish.
Save the definition.
Optional: If security is enabled in the monitor server:
Switch to the Monitor Server administrative console by clicking
Applications > Application Types > WebSphere Enterprise Applications.
Click WMBEventEmitter. Under Detail Properties, select
Security role to user/group mapping.
Select the eventEmitter role check box,
click Map users.
Click Search, in the Available
column, select the Administrative user that you want to map to the eventEmitter role.
Click the double arrow (>>) to move the Administrative user to
the Selected column and click OK.
Select the eventEmitter role check box.
Click OK, click Save.
The selected user is now mapped to the eventEmitter role, and
you must assign the user name and password to the eventEmitter role.
Switch to the Monitor Server administrative console by clicking
Applications > Application Types > WebSphere Enterprise Applications.
Click WMBEventEmitter.
Under Detail Properties, select User RunAs roles.
Select the eventEmitter role check box.
Enter the name and password of the user in the
Username and Password fields.
Click Apply.
The user is displayed in the Username field beside the eventEmitter roles.
Click OK, click Save.
Create a listener for the MDB:
Click Servers > Server Types > WebSphere Application Servers,
click your server.
Under the Communications section, go to
Messaging > Message Listener Service > Listener Ports.
Click New and enter the listener name that you wrote down
when you installed the MDB application.
In the Connection factory JNDI name field, enter the JNDI name
that you used when you created the topic connection factory;
for example, jms/topicConn.
In the Destination JNDI name field, enter the JNDI name that
you used when you created the topic; for example, jms/topicName.
Click OK,
click Save.
Restart the server.
Click Servers > Application Servers, click your server.
Under the Communications section, go to
Messaging > Message Listener Service > Listener Ports
and check that the listener port is running.
Under Applications > Enterprise Applications
check that WMBEventEmitter is running.
Check that the event topic has a subscription registered against it for the message flow:
Open the WebSphere MQ Explorer and expand queue manager IB9QMGR under the Queue Managers folder.
To open the Subscriptions pane, double-click Subscriptions.
Click Refresh and check that a subscription with topic string
$SYS/Broker/IB9NODE/Monitoring/WBMonitorEventsExecGroup/TotalPurchaseOrderFlow
exists.
The source for the MDB is included in the WMBEventEmitter.ear file.
This gives an example of an MDB that can be used to:
Receive event messages from Integration Node
Submit them in a suitable format to the CEI server for processing by Websphere Business Monitor
The following steps describe how to import the WMBEventEmitter.ear into
IBM Integration Designer 8.0.1,
enabling you to view, edit and recompile the source code for the MDB.
Start Websphere Integration Developer and select a workspace
From the menu, select File>Import...>Java EE>EAR file
and click Next
Use the Browse button on the EAR file field
to select the location of WMBEventEmitter.ear.
When selected, the EAR Project field will be filled in
as WMBEventEmitter. Check that the Target runtime field is filled in
with an appropriate value for your installation. Click Finish.
If you are not already in the Java EE perspective, you will be prompted to switch to that perspective.
Click Yes to do so.
Two projects appear in the workspace, WMBEventEmitter and WMBEventEmitterEJB.
Expand WMBEventEmitterEJB>ejbModule>com.ibm.wmb.event.cbe>WMBMDBEmitterBean.java
to view the source of the MDB.
If you see an error reporting that The import com.ibm.events cannot be resolved,
you must add com.ibm.events.client.jar to your Build Path. To do this:
Right-click WMBEventEmitterEJB and select
Build Path>Configure Build Path.
Select the Libraries page
and click Add External JARs....
Navigate to the com.ibm.events.client.jar
in the ${WAS_INSTALL_PATH}/plugins directory and click OK
To export the MDB for application installation:
Right-click the WMBEventEmitter project and select Export>Export...Java EE>EAR file.
Click Next.
Use the Browse button to set the Destination field
and click Finish.
The event sources have already been configured in the message flow.
Double-click the TotalPurchaseOrderFlow message flow to open the Message Flow editor.
Click the message flow palette.
The Monitoring tab displays the five event sources that are enabled:
Each event definition contains a Basic,
Correlation, and Sequence tab.
The Basic tab defines the
Event Source and Event Name.
The tab also contains the options to set in Event Filter
to add data from the message payload and the message bit stream.
The Correlation tab defines
Event Correlation information.
The Sequence tab defines
Event Sequence information.
In this example the default settings are used for each event definition.
An event filter is set on each of the events that are defined on the InputOrder node.
These filters suppress events from customers of type GUEST.
Data is captured from the message payload in three of the event definitions.
Some of this extracted data is then used in the WebSphere Business Monitor Model.
InputOrderTransactionStart
The event contains the following simple elements (shown with
example data) from the input message payload:
Double-click the InputOrder MQInput node.
The Basic tab shows the XPath definitions
that are used to extract this data from the message payload in the Event
Payload section:
GoldOrderTotalInTerminal and RegularOrderTotalInTerminal
Both event definitions contain the same message data that is defined in InputOrder.TransactionStart.
Both event definitions also capture the data from the priceSummary element
added in the ComputeTotalOrder Compute node (shown with example data):
Double-click either the GoldOrderTotal or RegularOrderTotal MQOutput node.
The Basic tab
shows the XPath definitions that are used to extract this data from the message
payload in the Event Payload section:
If you have not already deployed the message flow,
deploy it by using the TotalPurchaseOrderArchive.bar
broker archive (BAR) file.
Issue the following command to enable monitoring for the deployed
TotalPurchaseOrderFlow message flow:
mqsichangeflowmonitoring IB9NODE -e WBMonitorEventsExecGroup
-f TotalPurchaseOrderFlow -c active
Send messages through the TotalPurchaseOrderFlow message flow
In WBMonitorEventsProject, open the Flow Tests folder and double-click
TotalPurchaseOrderFlow_1.mbtest.
Click Invoke Message Flow.
Click Send Message to send the first customer order message
to the message flow input queue.
In the Deployment Location window, select the WBMonitorEventsExecGroup
execution group, click Finish.
Repeat these steps by opening the remaining Flow Tests and submitting the remainder of the customer
orders.
View the events in the WebSphere Business Monitor dashboard
Open the WebSphere Business Monitor dashboard, and switch to the dashboard that you created previously.
You can see the events for the messages that you sent through the TotalPurchaseOrderFlow message flow.