Active Script Library
We at Ipswitch would like to invite WhatsUp Professional users to share their Active Scripts with other users. With the launch of WhatsUp Professional 2006 we introduced the capability to create an Active Script monitor and/or action script. (Active Script Monitor) and actions (Action Script) let you create monitors or actions for specific devices using standard scripting syntax (VBScript/JScript).
Why not share your ideas with other WhatsUp users who are looking for help in writing a script to solve the same (or similar) problem.
The library rules are simple:
· Submit the script and its function.
· Tell how this procedure helps you.
How to submit your script:
Email your scripts as a plain text attachment to: whatsUp_Scripts@ipswitch.com
Note: These utilities are not supported by Ipswitch.
Disk Space Monitor Script – The problem I saw with the others scripts is, for each threshold that you wish to define, you must create a separate active monitor for each. That seemed rather tedious as well as messy, having that many active monitors just to monitor disk space. I know our organization requires many different thresholds which are generally unique to each server. If I have a server with 4GB free on C and 100GB free on D, I would want different thresholds per drive. And just that one device, would now require two active monitors to be created so you can have two different thresholds.
With that problem in mind, I’ve made it so you can create a single active monitor, for example ‘Disk Space Free’. Then you define an attribute on the device called ‘Drive_Space’. The value is in the form of ‘DriveLetter=Threshold’. For example, to set a 1GB threshold on the C drive and a 40GB threshold on the D drive, you would set the ‘Drive_Space’ value to ‘C=1000;D=40000;’. Apply the active monitor to the device and you are good to go.
The only problem some may have with this script is that it’s a little harder to report which drive letter is low and by how much. Our mind set is one that if we receive a drive space down alert, we need to check it out anyway, so it’s not a big deal to know right away which drive letter is low. ‘Of course one way to solve that problem would be to have the script create/update additional attributes like ‘Drive_C’, ‘Drive_D’. You could set the values to something like ‘Used Space / Total Space’ or any other combo you wish. Obviously this has not been done in this revision, but is something I may do in the near future.
Contributed by: Brad GibsonMBSA Check Script – Parses MBSA (Microsoft Baseline Security Analyzer) files and sets the monitored device's status according to the severity of the security issues found in the report. Note: You may need to up the script timeout to allow the script to do the file search.
Contributed by: Pete MourfieldReduce unwanted alerts sent by WUP
Scripts-Description: Purpose of the script and how-to
MD-Alerter and MD-AlertLauncher: The two parts of the script
Contributed by: Ric Granados, CTO, Calldesk
End-to-End Email Monitoring Script – This script can be used for monitoring our end-to-end email functionality with WUP. Allows you to know about an email problem before the users notice. Once this sends an alert you can start checking each component of the mail system until you find the problem. The script can send AND receive from WUP. It works without needing to schedule anything within the windows scheduler.
Contributed by: Al Blake, Director, Technology Improvement Unit, Knowledge Management and Education Branch, Department of the Environment and HeritageBasic Oracle SQL Query Script – This script connects to an Oracle Database to issue a SQL Query.
Contributed by: Tim Schreyack, Dynamics Research CorporationSet Acknowledge Field to True Script – This Jscript will set the Acknowledge field to true for all devices. If this field is false, the name of device displays with a black bar behind it, making the maps look messy. The script is used in an Action, which can then be used to create a Recurring Action that could run every morning, so you can start off with nice clean maps every day.
Contributed by: Tim Schreyack, Dynamics Research CorporationDatabase Availability – This script queries a database and if it returns more than 0 rows it reports the database as being up, if it returns 0 rows it reports the database as being down.
Contributed by: Dean Langenfeld, Technical Support, Duncan Solutions, Inc.Disk Space Script - Disk space check for less than a specified amount of disk space. Uses device credentials so it can be deployed easily across numerous domains for MSP environments.
Contributed by: Justin Hannan, Systems Administrator, Netstore PLCDisk Space Check (Free Mbytes) – This script allows for a user defined alert threshold, “Warning_Threshold”, and triggers a down condition when the free disk space falls below that threshold. Since this script uses the WMI_Win32 class it works for both W2K and W2K3 servers.
Contributed by: Marshall Frank, Healthcare Quality Solutions
Disk Space Check (Free Space Percentage) – This is a variation of the above script and calculates the percentage of free disk space.
Contributed by: Marshall Frank, Healthcare Quality SolutionsThese scripts have been updated so that the Disk Space Check (Free Mbytes) and the Disk Space Check (Free Space Percentage) now properly use the credentials specified by the client.
Contributed by Stephen Wheet, Network Engineer, Dey L.P.Event Log Monitor – I wrote this so I could pick up general error and warning events in the event log monitors. I created a passive eventlog monitor for errors and warnings, then use this to detect when theres a flood of errors. Its tunable to the server. I have it running against my blackberry server and know there should not be any more then 5 errors or warnings in a 5 minute period, if there is, there’s a good chance something is up with the server. I didn’t see an easy way to do this with whatsup, but I might have missed it.
Contributed by: Brad Ketler, Network Manager, Audax Management Company, LLC, 617-859-1521File Exists Script – This script checks for the presence of a file in a directory. It can be useful if you simply need to know if a certain directory is empty or not.
Contributed by: Michelle Jacobs, Communications Analyst, Federal Reserve Board of GovernorsIncoming Faxes check – We receive a little over 2000 image files per day via FTP and a Fax server; these files are deposited in the folder “IncomingImages” until they are processed by an automated Forms Reader/ OCR package. The script monitors this folder and test for files older than 30 minutes and alerts if that threshold is exceeded. This gives us a pro-active monitor on that automated process.
Contributed by: Marshall Frank, Healthcare Quality SolutionsInterface Monitor Script [WhatsUp Professional 2006 version] – Purpose: To check the individual interface utilization of all interfaces on a given switch or router. Usage: We use this script to make sure that no one interface on any given device is running above 80% utilization. If it is, set an alarm, with the name of the interface and the inbound and outbound rate percentages on that interface. This allows us to try and stop a network performance decrease or outage before it becomes critical. Change the value on line 15 to the level that you want to alarm at.
Ping Response Time Monitor - This script can monitor the ping response time of a device and alerts if the threshold is attempted. You can modify the threshold in the script and create other monitors with differents thresholds.
Contributed by: Landry Dubois, RMI InformatiqueProcess Checker - Here is a VBScript monitor that will check the existence of a process on a remote machine. Configure the process you want to look for by changing the sProcess value in the script. The monitor will pull the Windows credentials from the device that it is applied to. Please note that the script will not work if applied to the WUP device, as WMI does not allow for a local connection to contain credentials.
Contributed by: Jason Williams, Technical Support Specialist, IpswitchSQL Script - An general active monitor for SQL server (although could be adapted for other databases easily). Based on a specified query, the results are checked for an expected value or result and then alert accordingly.
Contributed by Justin Hannan, Systems Administrator, Netstore PLCUpdate Name - This small script provides some functionality that I found missing in WhatsUp. The script changes device name to system name retrived by snmp.
Contributed by: Aleksandr Kotelovich, Systems engineer, SIA "Unistars"Uptime Check - The function of the script is to check a WMI-compatible device and evaluate the time since last reboot (aka "uptime"). It currently assumes that 15 days is the desired maximum, but this can be reconfigured. Uptimes beyond 15 days are reported as down.
Contributed by: Matthew DoddWhatsUp Ticketing System - This set of scripts is part of a system to extend the functionality of WhatsUp Alerting to include ticketing and alert escalations. [script description][advanced email parser][all rules]
Contributed by: Derek Small, Senior Network Engineer, Student Loan Xpress, Inc.
