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

Using external scripts to compare HM test results.....help!

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list
View previous topic :: View next topic  
Author Message
Sean



Joined: 16 Dec 2003
Posts: 4

PostPosted: Tue Dec 16, 2003 9:16 am    Post subject: Using external scripts to compare HM test results.....help! Reply with quote

hi folks, not too sure if this is the correct forum for this but i have a question.

Scenario
You are running 30 ping tests to different devices and you want an alarm raised from HM only if 50% (15) of them fail the ping test for 5 mins or more. You only want one alert to be raised and sent to a pager/SMS/Mail.

Question
Is this actually possible? we have been trying to interrogate HM Via an external VBScript, but to no avail. At this time i cannot see how we could do this with the HMscript language, as from what i understand there is not really any way we can increment a counter when one site fails and then decrement it when the same site recovers.

hope this all makes sense..

Sean
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Tue Dec 16, 2003 11:56 am    Post subject: Reply with quote

IMHO you can implement this using database that is accessible thru ODBC driver. You can assign alert profile with "SQL Query" action to all ping tests. This "SQL Query" action will update status of the tests in the table.
Also you will need to setup single "ODBC Query" test that will check how many bad records in the table and start alerts when there are more than 50% of bad records.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Sean



Joined: 16 Dec 2003
Posts: 4

PostPosted: Wed Dec 17, 2003 1:52 am    Post subject: Reply with quote

Ahhh..I was rather hoping not to have to use OBDC for this as I was trying to get this to happen on a real-time basis. e.g

Code:
Site 1.......Alive
Site 2.......Alive
Site 3.......Alive
Site 4.......Down
Site 5.......Down
Site 6.......Down

50% Group fail Alarm = true

so that i could set the alarm to trigger at a 50% fail for that particular group of ping tests.

got any other ideas?
Back to top
View user's profile Send private message
Marcus



Joined: 18 Nov 2002
Posts: 367

PostPosted: Wed Dec 17, 2003 3:58 am    Post subject: Reply with quote

Quote:
I was trying to get this to happen on a real-time basis

In that case, you should log it to a sql server and create the correct triggers in the database (update triggers). The moment the test inserts data into the database, the trigger will be fired. Or set the test interval of the second test to a very short period (5 seconds).
Back to top
View user's profile Send private message
Sean



Joined: 16 Dec 2003
Posts: 4

PostPosted: Wed Dec 17, 2003 5:59 am    Post subject: Reply with quote

Ok cheers folks, It appears i have to "Bite the Bullet" and use SQL to resolve this. Now i have to convince the boss to buy a bigger faster harder machine to run all this....weee let the good time roll

Thanks

Sean
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Wed Dec 17, 2003 12:55 pm    Post subject: Reply with quote

Actually you don't need SQL server, you can use simple DBF (FoxPro) tables. Windows has DBF ODBC driver.
To make it real-time just add HMScript action with RefreshTest command to the same profile that updates table. E.g. "Refresh ODBCQueryTest".
If this case HostMonitor will check table statistics every time ping test performed.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Sean



Joined: 16 Dec 2003
Posts: 4

PostPosted: Mon Feb 02, 2004 1:52 am    Post subject: Reply with quote

Thanks for the replies folks, I've got it running through MySQL now. Got it doing queries something like this...

Ping test.
Ping Fails......make entry into DB (increment field +1)
Ping recovers...make entry into DB (decrement field -1)

Logical check
Select appropriate group field and check its value.
If the value is > X then alarm, else do nothing.

Watchdog
i had some issues here where the DB would step out of sync with HM so i made a little watchdog query...
Checks the Appropriate group fields for - numbers...if it finds one it resets it to 0 (MySQL probably has a function for no negative values but i couldnt find it, being a bit of a SQL noob)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Wish list 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