KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

# of dependant tests based on master test results

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
Alex



Joined: 23 Aug 2006
Posts: 2

PostPosted: Wed Apr 28, 2010 7:46 pm    Post subject: # of dependant tests based on master test results Reply with quote

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
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12795
Location: USA

PostPosted: Wed Apr 28, 2010 8:35 pm    Post subject: Reply with quote

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/mframe.htm#tests.htm#odbc

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index