General
Maintenance
- SQL Command to show table disk usage:
EXEC Whatsup.dbo.TableUsage
- SQL Command to trim down database:
ALTER DATABASE WhatsUp SET RECOVERY SIMPLE; DBCC SHRINKDATABASE (WhatsUp, 10); DBCC SHRINKFILE (WhatsUp, 10); DBCC SHRINKFILE (WhatsUp_log, 1); ALTER DATABASE WhatsUp SET RECOVERY FULL;
- Rename Server
- WhatsUp Gold forum discuss on rename server (WUG 14.4) (Tested ok at WUG 2016)
- 1919: Database connection errors after renaming WhatsUp Gold machine / Could not find server ‘[SERVERNAME]’ in sys.servers error (Official way to rename WUG server)
- 1908: How To: Executing SQL statements against the WhatsUp Gold database (Another support KB link)
Active Script Action
- Idea: although can use script to change device status, it must have way to check how a device is up again. (e.g. should have a resume normal Passive Monitor)
- Moreover, it may confuse if multiple device status are received. (if the multiple down status were triggered by Passive Monitor, it don’t know when is really called “resume normal" – multiple resume passive monitor update? Or only 1 resume passive monitor update?)
- To have Context.GetProperty(“DisplayName") supported for Active Script Monitor
DeviceID can be obtained by the general Context object with: Context.GetProperty(“DeviceID")
- Trigger device maintenance mode automatically
Use script function EventHelper.SendChangeEvent to change the device status by a certain event
- Using Powershell to update the state (send state change event) of a device
Example to use PowerShell to call the SendChangeEvent function (require to use the 32bit PowerShell)