Monitoring a Limousine Company setup

Configuring this project takes approximately 15 minutes.

About this task
This sample contains a WebSphere Business Monitor development toolkit project.

To import the sample to your workspace, complete the following steps:

  1. Import the sample
  2. Import the sample events
  3. In the Import Project dialog box, accepts the defaults and click Finish
  4. Generate a J2EE application for your monitor model.
    1. From the Business Monitoring perspective, right-click on the monitor model name in the Project Explorer tab and click Generate Monitor J2EE Projects. The Generate Monitor J2EE Projects wizard opens.
    2. The Generate Monitor J2EE Projects window lists the default names of the three projects. The first two names are for the two EJB projects. The third name is the name of the J2EE Application project. You can change these names, but the default names reflect which J2EE applications and EJB projects were generated from the monitor model (since the names are derived exactly from the name of the monitor model). After you decide to keep or change the names, click Finish.
  5. Start the Monitor Server.
    1. Click the Servers tab.
    2. Locate and select the monitor server. The server is easy to recognize since it starts with “WebSphere Business Monitor v6.2” in the Server column. If it is currently stopped, the server state is listed as "Stopped" under the State column for that server.
    3. If the server is currently stopped, click the Run icon.
    4. After you click the Run icon, the state should say “Starting …” under the State column. The Console tab will become active and displays messages indicating its progress.
    5. After a successful start, the State of the monitor server changes to “Started”.
  6. Publish the generated applications.
    1. From the Server tab, right-click on the monitor server.
    2. Click Add and Remove Projects …. The Add and Remove Projects wizard opens.
    3. The Add and Remove Projects wizard has two lists, one on the left that contains available projects, and one on the right that contains configured projects. Select MonitorLimousinesApplication on the left.
    4. Click Add. The application will move to the right.
    5. Click Finish. You might be prompted with a message saying that a project will be added/removed from the server. Click OK. The Console tab will be activated again showing you some messages.
    6. When complete, click the Server tab again. Select the monitor server and expand it. You should see the MonitorLimousinesApplication and the 2 EJB projects under the monitor server.
  7. Create a business monitoring space on Business Space powered by WebSphere.
    1. On the Server tab, right-click on the monitor server, then click Business Space.
    2. Login to the Business Space using a valid dashboard user ID and password. The main page of Business Space opens.
    3. Cick Create a new Business Space.
    4. From the prompt menu, enter MonitorLimousines Space as the name of the business space. Since you want a business monitoring space, select the From a template radio button and make sure that Business Monitoring is the selected template, then click OK.
  8. Create Instances widgets in the business monitoring space.
    1. From the main page of Business Space, locate the MonitorLimousines Space in the list of spaces. Click MonitorLimousines Space to open that business space.
    2. In the MonitorLimousines Space, click New Page. The New Page prompt menu opens. Enter Trips as the name of your new page. Select an empty layout, then click OK.The Trips page is then created and becomes your current page.
    3. Click the Add Widgets pull-down menu, then Select on the Instances widget. Drag the Instances widget towards the upper left corner of the Trips page. Release the mouse and there will be an instance of the Instances widget on the page.
    4. Configure the Instances widget by clicking the down arrow located to the upper right corner of the widget. Click Configure.
    5. In the Configuration page, expand the MonitorLimousines monitor model, then select the Trip monitoring context definition. The metrics defined for Trip appear in the Available list to the right.
    6. Select which metric definitions from the Available list you want to be displayed in your Instances widget. For every instance of Trip, you will see the values of your selected metrics. Select the following metrics: limousine, pickUpAddress, pickUpScheduledTime, pickUpActualTime, dropOffAddress, dropOffScheduledTime, dropOffActualTime. You can select them one at a time. As you select one, click the right arrow to move you selected to the Selected list.
    7. Click Set As Default, then click OK.
  9. Submit the event sequences using the Integrated Test Client.
    1. From the Project Explorer tab, right-click on the MonitorLimousines monitor model name, then click Launch Integrated Test Client.
    2. The first tab of ITC called “Events” opens. This page has two sections. On the right side is the Create Test Script section.
    3. Before proceeding, click the Target Server tab located at the bottom of the ITC page. Make sure that the ITC is pointing to the right test server when it emits events. Under the Target server configuration section, make sure that the WebSphere Business Monitor Server where you deployed your monitor model is selected. After you have configured the target server, return to the Events tab.
    4. Return to the Create test script section, then click Open to load the ITC script that contains the six events. Go to your workspace directory then select the SampleResources folder. Within that folder, select the Events for Limousines Part 1.xml file. Click Open. Note that a pause is included after every emission of an event.
    5. To start sending events, click Run Script. A new ITC console opens. It shows the progress of the script. It sends the first carDispatched event. Since a Pause command follows, you will see “Pausing..” in the ITC console after the event is emitted. You can see the results for this first event being updated in real time in the Instances widget.
    6. Click Run Script again to send the next event. You can check the Instances widget again. You can force a refresh of the contents of the Instances widget by clicking on the arrow at the upper right side of the widget title bar, then click Refresh.
    7. Repeat the previous step until all six events are emitted. The ITC console displays a message informing you of the end of the script when the script is done.
  10. View the results from the Instances widget.
    1. In you business space, there are two instances of the Trip monitoring context definition. For each instance, the values of the metrics you chose are also displayed. As you added your events, the monitor model consumed the events, created the instances, and mapped the values from the events to the metrics. The dashboard also shows that the events are filtered correctly and the instances were correlated with the events.
    2. To retest your monitor model you must clear the instance data from your Instances view. You can do this by removing your monitor model from the monitor server, then publishing it again to the same monitor server.