# of dependant tests based on master test results

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Alex
Posts: 2
Joined: Wed Aug 23, 2006 3:13 pm

# of dependant tests based on master test results

Post by Alex »

Hello

I apologize if similar question was answered before. I searched the forum and could not find anything related.
Here's the problem:
1. I need to query the DB for the IDs in a certain state. The number of IDs can be anything more or equal 0. If the number is 0 we are good, nothing needs to be done.
2. If the number is more than 0 then for each ID another SQL query needs to constructed (based on the ID) and the DB queried.
3. The results of the second query should be emailed (as email body or as an attachment, does not matter) for each ID again. There should be separate email for each ID.

Is this something that could be accomplished using hostmon? How?

Thanks,
Alex
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

HostMonitor cannot "construct" queries for you. However it allows you to use variable in the query. So if you need to change single variable in 2nd query, there is solution.
If you need to retrieve some list (not just single number) and use this list in 2d query, ODBC Query test method cannot do this. It executes SQL Query and checks single field. In such case I would suggest to create stored procedure and call this procedure using single ODBC test.

Then I am not sure what exactly is the result of 2nd query that should be e-mailed? Single field (number or text)? Some cursor (set of rows and columns)? ODBC Query test works (checks and displays) with single field only.
http://www.ks-soft.net/hostmon.eng/mfra ... s.htm#odbc

Regards
Alex
Post Reply