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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

Example Active Script Performance Monitors<br />

These scripts demonstrate a few potential uses of Active Script Performance Monitors. To<br />

view other Active Script Performance Monitors created by other <strong>WhatsUp</strong> <strong>Gold</strong> users, visit the<br />

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

Graphing printer ink level percent utilization (on page 931)<br />

Poll a reference variable and perform a calculation (on page 932)<br />

Graph a temperature monitor (on page 933)<br />

Poll the storage table using SNMP GetNext (on page 934)<br />

Poll multiple reference variables (on page 935)<br />

Graphing printer ink level utilization<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 performance monitor uses two reference variables to poll and compute the ink level<br />

percent utilization of a printer for later graphing.<br />

Note: This was tested on an HP MIB.<br />

Run the SNMP MIB Walker net tool to check the OIDs of the two reference variables and<br />

eventually adjust their instance (1.1 in this example):<br />

1.3.6.1.2.1.43.11.1.1.8.1.1 and 1.3.6.1.2.1.43.11.1.1.9.1.1.<br />

// prtMarkerSuppliesLevel is an snmp reference variable defined with an OID or 1.3.6.1.2.1.43.11.1.9 and an instance of 1.1<br />

// prtMarkerSuppliesMaxCapacity is an snmp reference variable defined with an OID or 1.3.6.1.2.1.43.11.1.8 and an instance of<br />

1.1<br />

Context.LogMessage("Print the current marker level");<br />

var prtMarkerSuppliesLevel = Context.GetReferenceVariable("prtMarkerSuppliesLevel");<br />

Context.LogMessage("Print the maximum marker level");<br />

var prtMarkerSuppliesMaxCapacity = Context.GetReferenceVariable("prtMarkerSuppliesMaxCapacity");<br />

931

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

Saved successfully!

Ooh no, something went wrong!