From a business point of view, the evolution of stocks on exchange markets are critical input for most companies despite the inability to drive how investors evaluate and trade them. Therefore, stocks quotes are a form of external environment data that has a huge impact on companies’ management.

This makes it incredibly important for each company rated on the stock exchange to continuously monitor their stocks and those of their partners and competitors.

It may also be useful to employ BMC Impact Manager or BMC Reporting to correlates these values with other business and production-related information and explore how your stock quotes impact your business or how your production impacts your stock quotes.

Principle

The principle is the same as described in previous sections: we are going to use BMC Performance Manager Monitoring Studio to retrieve the current value of a given company’s stock from a finance Web site, like MSN Money, for example.

In the following example, we are monitoring the value of BMC Software’s stock from MSN Money’s Web site. The page URL is: http://moneycentral.msn.com/detail/stock_quote?Symbol=BMC.

Finance_1

Once this Web request analysis is set up, we will configure Monitoring Studio to look for the current value of the stock in the Web page. This current stock value is located in a simple line which only contains the value, as shown in the following screenshot (page content as shown in the PATROL Console, HTML tags and formatting code has been removed):

Finance_2

Configuring BMC Performance Manager to report stock quotes

From the PATROL Console, right-click the main Monitoring Studio icon > KM Commands > New > Web request analysis….

In the wizard, enter the http://moneycentral.msn.com/detail/stock_quote?Symbol=BMC URL. This creates a new icon in the console representing the MSN Money Web request.

Finance_3

Then, right-click on this icon > KM Commands > New > Numeric value search…. In the wizard, specify that we want the numeric value located in the line that matches the following regular expression: \(^[0-9]+.*%$\)\|\(^[0-9]+.*unch$\)

This regular expression will match with either line that begins with a numeric value and ends with percent sign or lines that begin with a numeric value and end with the “unch” string.

Finance_4

Finally, we specify that Monitoring Studio must retrieve the value at the very beginning of the matching line and that this numeric value is formatted using US-English standards:

Finance_5

Once configured, BMC Performance Manager Monitoring Studio builds a graph representing the stock quote of BMC Software. We could even configure alert thresholds to get a warning when the stock drops below a given threshold:

Finance_6

Summary

In order to report BMC Software’s stock quote in BMC Performance Manager, we have configured BMC Performance Manager Monitoring Studio to:

Retrieve the MSN Money page for BMC (http://moneycentral.msn.com/detail/stock_quote?Symbol=BMC).
Retrieve the value at the very beginning of the line that matches with the \(^[0-9]+.*%$\)\|\(^[0-9]+.*unch$\) regular expression.
noteWe could have set up the monitoring of any other stock quote and from another financial Web site.