In Part 1 of this series, you learned how to very quickly create a real-time dashboard in IBM Business Monitor, and to populate it with sample data using a new CSV tool. In Part 2, you learned how to customize all parts of the dashboard, to make it more closely meet the requirements of your business users. In the final part of this series, you'll learning about additional capabilities of the CSV tool and how it can help improve time to value with IBM Business Monitor.
First, you'll learn how to define alerts around one of the KPIs produced by the CSV tool, so that if a specified business situation occurs, such as a KPI gauge entering an undesirable range, you'll receive an alert in real-time when that happens.
Next, we'll use the CSV tool to send some further sample data. We'll watch as the dashboards update in real time, seeing new instances appear, Cognos reports update, KPIs reflect the latest values - and seeing our alert get triggered.
Finally, you'll learn how you can use Eclipse to make modifications to the monitor model produced by the CSV tool. Although it's nice in early demo situations to quickly produce dashboards via the CSV tool without ever having to open Eclipse, sometimes you may want to use the CSV tool as a way to jump start your monitor model development, letting it make a model with the desired metrics, KPIs, and reports, and then load the generated monitor model into the Eclipse-based IBM Business Monitor toolkit and perform additional customization.
You've seen the dashboards that get generated, and learned how to customize those dashboards to look just the way you want. But you don't want to always have to be looking at the dashboard to know if something has happened. Sometimes you would prefer to be notified right when a situation occurs, rather than not noticing the situation until the next time you happen to log in to the dashboard. That's where alerts comes into play.
To demonstrate this, let's define a situation that will cause an alert to be raised. Let's say we want to be alerted if a really expensive item is purchased: say, one that puts the Most Expensive KPI into the red range.
Go to the Order Processing KPIs page of our dashboard. Click the down arrow for the Most Expensive KPI, and choose Alert Manager.
Figure 1. Launching the Alert Manager
Click New Alert.
Figure 2. Creating a new alert
Expensive Item Sold! in the Alert name field. Choose
Above range from the Condition drop-down. Choose
Normal in the Value drop-down.
from the How often to check conditions drop-down. Choose
once when the condition applies from the Notification
frequency drop-down. Click OK.
Note: We could have chosen In range for the Expensive range, but that would not cover the case of an item more expensive than the upper limit for the Expensive range, which we set to $2000 in our KPI spreadsheet. This way, we get alerted whether the KPI falls in the red range or is "off the chart" beyond that range.
Figure 3. Alert conditions
You should see the message shown in Figure 4.
Figure 4. Alert created
Once you click OK, you should see the following:
Figure 5. Alert manager
Note that here you can specify how you would like to be notified about the alert. You could have it sent as a text to your phone, sent in an email, and so on. However, those methods require a user registry, such as LDAP, that knows the phone number and email address for the logged in user. To keep it simple, we'll just have it send us a dashboard alert, meaning a new entry will appear in the Alerts widget (at the bottom of the Order Processing KPIs page of the dashboard). Click Close.
You have now created an alert. If any events arrive that push the Most Expensive KPI into the red range, you will now be alerted.
Real-time dashboard updates
Now let's use the CSV tool to send some more data, so that, in real-time, you can see additional rows appear in the Instances page, see the various Cognos BI reports update, see the KPI needles move in the gauges, and see an alert appear.
Go to the C:\CSV folder and double-click Order Metrics 2.csv, to view it in Microsoft™ Excel™.
Figure 6. More sample data
Note that Veronique is buying an expensive item, which should trigger our alert. Note also that we've added a new country (Ireland), and data for a new year (2013). Finally, note that if you changed the names of any of the metrics in the original metrics spreadsheet, or added or removed any metrics, you'll need to make the same changes here.
Return to the browser hosting the CSV tool. Click Browse by the Metrics CSV file field and choose Order Metrics 2.csv (from C:\CSV). Then click 3. Send data to monitor model to send through the events based on this new metrics spreadsheet.
Note: If you had closed the browser hosting the CSV tool, you'll
need to open a new browser and have it load the CSV tool. Note that by
default, the CSV tool only enables each button once you've completed the
previous step, so you can't deploy a monitor model until you've generated
it, and you can't send it events until you've deployed it. To override
this behavior and get the 3. Send data to monitor model button
enabled from the start, add the
enableAllButtons=true parameter to
the URL, as in http://localhost:9080/csv/?enableAllButtons=true,
and then make sure to specify exactly the same name for the monitor model
(such as Order Processing) as used previously.
Figure 7. Send sample data
Note that the dialog indicates that events for three new orders were sent. Click OK to dismiss the dialog and return to the browser window showing the dashboards.
Return to the Order Processing Instances page of the dashboard. You will now see three more rows, containing the additional data from the new spreadsheet.
Figure 8. Updated instances page
Now go to the Order Processing Reports page. You will see the new slice and cone alluded to earlier. You will also see a new spike in the line chart for Dublin, new needles in the gauge chart, and a new country (Ireland) in the area chart and the vertical bar chart. You may need to zoom out (Ctrl -) to see all the charts at once.
Figure 9. Updated reports page
Double-click USA in any of the charts with Location as a dimension to drill down to the state level. Then double-click on NC to see results within the cities of North Carolina. Likewise, double-click on a year (cone) to drill down to the month level within that year, and on a month to see results by day within that month. You can right-click and choose Drill Up to return to the previous level.
Finally, let's look at the Order Processing KPIs tab now that we've processed those extra events. You may want to zoom back in (Ctrl +) to read everything clearly, if you had zoomed it out to see all the reports on the previous tab. You'll notice the Most Expensive KPI is in the red range now, and our alert has indeed arrived. Click on the Expensive Item Sold! alert to see its details.
Figure 10. Updated KPIs page
We have now seen all parts of the dashboard update, in response to sending through additional sample spreadsheet data. We saw new instances appear, saw the Cognos reports change, saw the KPIs update, and received an alert.
Editing the monitor model
So far, we've taken the "easy button" path, completely avoiding the use of Eclipse, and accepting the monitor model as generated by the CSV Tool. When putting together a quick demo of IBM Business Monitor, that's sufficient, but there may be scenarios where you do want to edit the monitor model that is generated.
To do this, return to the CSV tool and click 4. Export monitor model. You'll be prompted to save the resulting Eclipse project interchange zip file to your hard drive.
Figure 11. Export monitor model
Now launch IBM Integration Designer, and go to the Business Monitoring perspective. Right-click and choose Import. In the resulting dialog, choose Other, then Project Interchange.
Figure 12. Import the monitor model
Double-click on Order Processing.mm, to open it in the Monitor Model Editor. As you'd expect, you see a monitor model with the metrics, KPIs, and reports from the spreadsheets. You could add additional content to this monitor model, such as going to the Visual Model tab and adding an SVG diagram and annotating it as desired.
Figure 13. Exploring the monitor model
Let's also take a look at the event definition that got generated. Double-click on Metrics.xsd, and you'll see the structure of the complex type definition that was generated, based on the metrics from the spreadsheet. When you send events via the CSV tool, it is constructing XML documents that conform to this XSD. You could also send your own events that conform to this XSD, either directly via Java code, or by using an ESB to mediate the data already flowing through the environment into this format. You could deliver this event using either JMS or REST. The CSV tool demonstrates doing so via JMS.
Figure 14. Exploring the event XSD
Finally, you may decide to delete the generated Metrics.xsd and associated inbound event definition in the monitor model, and replace it with "real" events. To do that, you'd just import the XSD files describing the structure of the "real" events, define inbound event definitions based on the complex types defined in those XSDs, and then wire up each metric's map expression to get its value from a field of the appropriate "real" event. You wouldn't need to change anything regarding the KPIs and reports that are based on those metrics. Note that if you do this, you'll no longer be able to use the CSV tool to feed sample data to this monitor model, since it would no longer understand the generated event format as sent by the tool.
In this series, you've seen how, in the span of about an hour, the CSV tool can help you quickly define a new monitor model, deploy it to the server, generate dashboards, and populate it with sample data. You've learned how to customize all parts of the generated dashboards, including report editing and alerting, and you've seen how you can edit the monitor model produced by this tool.
Note that source code is provided for the CSV tool (inside the csv.ear file). You can take a look at the code to see how you can programmatically construct a monitor model and associated event XSDs, how you can programmatically deploy that monitor model, and how you can programmatically send events to that monitor model. You can also see how the Java applet client communicates with the servlets running on the server. You may also choose to modify the source code to add additional features, such as extending the CSV tool to allow you to specify an SVG file to upload and make part of the monitor model.
When working with your business users to gather requirements on what information they need to see in dashboards, the CSV tool can help you quickly get hands-on feedback on your concepts, allowing a rapid, iterative approach to producing the kind of dashboard that is needed. By having business users fill out these simple spreadsheets, and then quickly showing them a live dashboard produced from them, you can quickly and easily demonstrate the value and insight that can be provided by IBM Business Monitor.
- Learn more about IBM Business Monitor.
- IBM Software Services for WebSphere: Find out how IBM expertise in cutting-edge and proven technologies can help you achieve your business and IT goals.
- developerWorks BPM zone: Get the latest technical resources on IBM BPM solutions, including downloads, demos, articles, tutorials, events, webcasts, and more.
- IBM BPM Journal: Get the latest articles and columns on BPM solutions in this quarterly journal.
Get products and technologies
- Get the CSV Tool used in this article.
Dig deeper into Business process management on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Experiment with new directions in software development.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.