Question
WUG v15 Active Scripts
Offline

Hi Guys,
I'm not sure if this is the right place, but here goes anyway.
We are having issues with Critical Monitors, which is a known issue in v15. I was wondering (to overcome this issue) if it's possible (using vbs/jscript) to disable active monitors when Ping goes down, then re-enable then when the monitor comes back up. My theory is this could be a work around for critical monitors until it is fixed in v16 (which isn't due out until July time).
Does anyone know if this is possible or the best way to go about trying this?
Cheers,
Simon
-----
- 883 views
- 1 version
- 9 replies
- 3 followers
Labels:
- Post Date:
- February 27, 2012
- Posted By:
- Simon Fisher
About this forum
- 145k views
- 2243 topics
- 55 followers
Post questions and find answers for all things related to the Standard and Premium Editions of WhatsUp gold.
Viewed 883 times
Page Options
9 Replies
I am sure it is possible. I would be worried about needing to restart the service for it to take affect. The reason woudl be is you have to modify the database directly and unless the application relizes it (restart of services) it will never take affect. I had this issues when attempting to runa a script and put things in maintenance.
Paul: In this thread http://community.whatsupgold.com/script_library/actions/advanced-device-maintenance-mode
(comments) you will find a script that sends a "change event" notification to WUG. The same change event WUG uses when changing stuff in the web UI.
Simon: Following Paul's mindset of modifing the database directly, this shouldnt be too hard. What exactly is it that you want under what circumstances? I'll see if I get time to write you a script that does what you want (So.. Give me exact what you need)
Edit: Added link (Thanks Jason)
@Robin - I think you forgot the link to the thread.
@ Robin - Thanks for your reply. In essence I want to achieve what the critical monitor should do, but doesn't. When the "PING" active monitor goes down, I want to run a script that can then disable any other active monitor on the device, thus achieving the same result as the critical monitor, then when ping comes back up, it can re-enable the active monitors and return to normal.
In my head this would be a simpler fix until V16 is released than going round and adding a new "ping" device for every server to do a device level dependancy.
If you need to know any device specific ID's, please let me know.
Cheers,
Simon
Hello Simon, I've finished v1.0 of the script :)
How it works:
You apply an action policy to a ping monitor (on state down & on state up when down has been reached)
What it does:
If device goes down, it checks a field called sStatus on device. This will now have "<MonitorStateID>|Ping". By default, 3 is the monitorstateID for "down". if this field contains "Ping" the script will diable everything but the monitor called "ping" which have a monitorstateID of 3. (Why: So you can have several ping monitors on a device but only the ping with the action policy will stay up/be critical).
If the ping monitor goes up, the script will check the field for "Ping" again. If nothing is returned, the script will update all active monitors on the device to enable.
General warning: Ipswitch does not recommend you to modify the database directly.
Hope it works! Please report back when you've tried it :)
//Robin
Script:
Needs to be changed so it works in your enviroment:
SQLServer
SqlDB (if non-default DB name is used)
SQLLoginID
and
SQLLoginPW
Be sure to post this in the Script Library Robin. And we appreciate your disclosure regarding making changes directly to the database.
On a side note, what is the actual issue you are having with Critical Monitors @Simon? Have you spoken with support?
@Robin - Sorry for the late reply. Thanks a lot for the script. Initial tests look as though this does exactly what I wanted - Will report back once I've tested it a bit further.
@Jason - I have spoken to support and they couldn't offer a fix. The issue I have is critical monitors don't work - they seem to be ignored (in certain circumstances which I have still not isolated). I was told by support it can be when you have 2 or more of the same type of monitor (ie SNMP) which I do. There is no fix for this - but apparently it is sorted out in v16 (which isn't out until atleast July).
I'll report back once I've done some more testing.
Thanks for all the help!
Would you like to comment?
You must be a member. Sign In if you are already a member.