Business Service Management (BAC/BSM/APM/NNM)

More than everything monitoring, BSM provides the means to determine how IT impacts the bottom line. Its purpose and main benefit is to ensure that IT Operations are able to reactively and proactively determine where they should be spending their time to best impact the business. This covers event management to solve immediate issues, resource allocation and through reporting performance based on the data of applications, infrastructure, networks and from third-party platforms. BSM includes powerful analytics that gives IT the means to prepare, predict and pinpoint by learning behavior and analyzing IT data forward and backwards in time using Big Data Analytics applied to IT Operations.

SiteScope Custom Database Monitor - Pass results of SQL query to another monitor via temporary file

Here at the HP Business Service Management (BSM) Research and Development department, we’re constantly working on ways to make your work-life easier.  Here are some useful tips on how to create a custom database monitor and pass results of SQL queries onto another monitor via temporary files. Let’s get started…


You can also download SiteScope here and experience it for yourself.



Two Database monitors (e.g. one Custom Database and one Database Query) and a Composite monitor are used.
1. The first database monitor (Custom Database) is set to execute a stored procedure against the first server, and to put the results into an SQL query for the second request. The resulting SQL query is written to a temporary file by the first monitor.
2. The second database monitor (Database Query or Custom Database in case further processing is required) is set to get the complete SQL query string from the temporary file and then use that query string to execute a stored procedure on another server.
3. The Composite monitor is set to control the above monitors (their run order and possibly delay between runs).


Enhancements for initial concept

This solution does not take into account when more than one configuration of monitors is required.
In this case each monitor's configuration should use a dedicated temporary file.
In order to provide this interconnection, each temporary file should contain a token string that could be looked up by both of the monitors that are going to use the file.


Implementation result

Upon template deployment the following monitors configuration is created.

1. Composite monitor



2. Two Custom Database monitors with description field containing token string unique for this specific configuration



Monitor run order and data flow

1. Composite monitor runs the first database monitor (Custom Database). The Custom Database monitor executes the first SQL query.



2. The result of the SQL query is stored to a sequentially numbered temporary file containing a token string.





3. Composite monitor runs the second database monitor (Custom Database). The Custom Database monitor executes the SQL query taken from the temporary file.





The complete content package with all the monitors and data processing script code can be found at


For more information about HP SiteScope and to try our FREE 60-Day trial download, please visit our website at


Written By:

Dmitriy Dobrovolskiy

HP SiteScope Infra Team


Posted By:

Bryan Topham

Sr. Product Marketing Manager

Leave a Comment

We encourage you to share your comments on this post. Comments are moderated and will be reviewed
and posted as promptly as possible during regular business hours

To ensure your comment is published, be sure to follow the Community Guidelines.

Be sure to enter a unique name. You can't reuse a name that's already in use.
Be sure to enter a unique email address. You can't reuse an email address that's already in use.
Type the characters you see in the picture above.Type the words you hear.
Showing results for 
Search instead for 
Do you mean 
About the Author

Follow Us
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.