Business Service Management
Showing results for 
Search instead for 
Do you mean 

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

‎03-10-2014 10:38 AM - edited ‎01-10-2015 08:16 AM

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

About the Author


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.
1-3 December 2015
Discover 2015 London
Discover 2015 in London, the ultimate showcase technology event for business and IT professionals to learn, connect, and grow.
Read more
November 2015
Software Online Expert Days
Join us online to talk directly with our Software experts.
Read more
View all