IT Operations Management (ITOM)
Showing results for 
Search instead for 
Do you mean 

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

BTopham ‎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


June 6 - 8, 2017
Las Vegas, Nevada
Discover 2017 Las Vegas
Join us for HPE Discover 2017 in Las Vegas. The event will be held at the Venetian | Palazzo from June 6-8, 2017.
Read more
Apr 18, 2017
Houston, TX
HPE Tech Days - 2017
Follow a group of tech bloggers for a new HPE Tech Day, a full day of sessions about how to create a hybrid IT, from hyperconverged to Composable Infr...
Read more
View all
//Add this to "OnDomLoad" event