16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Ipswitch</strong> <strong>WhatsUp</strong> <strong>Gold</strong> <strong>User</strong> <strong>Guide</strong><br />

Acknowledge all devices<br />

Note: This example is provided as an illustration only and is not supported. Technical support<br />

is available for the Context object, SNMP API, and scripting environment, but <strong>Ipswitch</strong> does<br />

not provide support for JScript, VBScript, or developing and debugging Active Script<br />

monitors or actions. For assistance with this example or with writing your own scripts, visit<br />

the <strong>WhatsUp</strong> <strong>Gold</strong> user community (http://www.whatsupgold.com/wugspace).<br />

This action resets the acknowledge flag on all devices. When a device is unacknowledged, the<br />

label on its icon renders as white text on black. If you don't use the acknowledge feature, this<br />

action can be used to make sure that icons always show as acknowledged.<br />

// This JScript action sets the acknowledge flag to true for all devices.<br />

// Written by Tim Schreyack of Dynamics Research Corporation<br />

// Get the database info<br />

var oDb = Context.GetDB;<br />

if (null == oDb) {<br />

Context.SetResult( 1, "Problem creating the DB object");<br />

}<br />

else {<br />

var sSql = "UPDATE ActiveMonitorStateChangeLog SET bAcknowledged = 1 WHERE<br />

bAcknowledged = 0";<br />

var oRs = oDb.Execute(sSql);<br />

var sSql = "UPDATE Device SET nUnAcknowledgedActiveMonitors = 0 WHERE<br />

nUnAcknowledgedActiveMonitors = 1";<br />

var oRs = oDb.Execute(sSql);<br />

var sSql = "UPDATE Device SET nUnAcknowledgedPassiveMonitors = 0 WHERE<br />

nUnAcknowledgedPassiveMonitors = 1";<br />

var oRs = oDb.Execute(sSql);<br />

}<br />

941

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!