Skip to main content

 

Cisco IP SLA Monitor (rtr)

7 months ago
OfflineRich Makris
Rich Makris
Description:  Performance monitor for Cisco IP SLA Monitor (rtr)
Language: VB Script/JScript
Code:

 The script was modified from one of the scripts here that Ambar had provided - it just needed to be modified to use a GetNext instead of Get. It is JScript - the attached document contains instructions and the script.

-------------------------------

// Sending log message to the WhatsUp Event Viewer
Context.LogMessage("Checking Address=" + Context.GetProperty("Address"));

// ---This is the OID of the statistics table we want to monitor. We will use a GetNext as the
// IP SLA format is <operation-number><Capture Start Time> which will change every hour. This script
//assumes that the device is only keeping the most recent statistics as we are storing them in
//WhatsUp Gold. Refer to the CISCO-RTTMON-MIB at
// http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&mibName=CISCO-RTTMON-MIB
var sOidRTTMon = "1.3.6.1.4.1.9.9.42.1.3.1.1.10"

var nValueToGraph = 0;
var nDeviceID = Context.GetProperty("DeviceID");

// Initialize the SNMP object
var oSnmp = new ActiveXObject("CoreAsp.SnmpRqst");

// SNMP OID and instance to poll
var oSnmpResponse = oSnmp.GetNext(sOidRTTMon);
var oResult = oSnmp.Initialize(nDeviceID);

if(!oResult.Failed)
{
    // Now poll
    var oSnmpResponse = oSnmp.GetNext(sOidRTTMon);
    if(!oSnmpResponse.Failed)
    {
        ValueToGraph = parseInt(oSnmpResponse.GetPayload);
    }
    else
    {
        Context.SetResult(1, oSnmpResponse.GetPayload);
    }
}
else
{
    Context.SetResult(1, "Unable to initialize SNMP");
}

// Set the performance monitor value to graph
Context.SetValue(ValueToGraph);


 
-----
You liked this too1 person likes this discussion.
 
Concluded

0 Conclusions:

0 Replies

Would you like to comment?

You must be a member. Sign In if you are already a member.

  • 874 views
  • $obj.VersionIndex versions
  • 0 replies
  • 0 followers
     
Post Date:
September 20, 2011
Posted By:
Rich Makris

About this forum

  • 18,824 views
  • 14 topics
  • 3 followers
     

Viewed 874 times