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 />

}<br />

oComResult = oSnmpRqst.Get(DOT1DTOFDBADDRESS_OID + "." + sInstance);<br />

if (oComResult.Failed)<br />

{<br />

}<br />

continue;<br />

var sMAC = oComResult.GetValue;<br />

var nError = CheckMacAddress(sMAC, nPort);<br />

switch (nError)<br />

{<br />

case ERR_NOTALLOWED:<br />

arrNotAllowedAddresses.push(sMAC + "(" + nPort + ")");<br />

break;<br />

case ERR_MISPLACED:<br />

arrMisplacedAddresses.push(sMAC + "(" + nPort + ")");<br />

break;<br />

case ERR_NOERROR:<br />

default:<br />

// no problem<br />

}<br />

//Write the status<br />

Context.LogMessage("Found " + i + " MAC addresses on your network.");<br />

if (arrMisplacedAddresses.length > 0)<br />

{<br />

Context.LogMessage("Warning: Found " + arrMisplacedAddresses.length + "<br />

misplaced addresses: " + arrMisplacedAddresses.toString());<br />

}<br />

if (arrNotAllowedAddresses.length > 0)<br />

{<br />

Context.SetResult(1, "ERROR: Found " + arrNotAllowedAddresses.length + "<br />

unknown MAC addresses on your network: " + arrNotAllowedAddresses.toString());<br />

}<br />

else<br />

{<br />

Context.SetResult(0, "SUCCESS. No anomaly detected on the network");<br />

}<br />

}<br />

Scripting Performance Monitors<br />

Active Script Performance Monitors let you write VBScript and JScript to easily poll one or<br />

more SNMP or WMI values, perform math or other operations on those values, and graph a<br />

single output value. You should only use the Active Script Performance Monitor when you<br />

need to perform calculations on the polled values. Keep in mind that although you can poll<br />

926

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

Saved successfully!

Ooh no, something went wrong!