﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Ipswitch Forums / Ipswitch Products / WhatsUp Gold  / Making a interface utilization alarm / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Ipswitch Forums</description><link>http://forums.ipswitch.com/</link><webMaster>forums@ipswitch.com</webMaster><lastBuildDate>Tue, 07 Oct 2008 01:15:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>I'm getting the same error under the same inconsistent circumstances.  I have been through the setups of all the routers and the single interface on each one that I need to monitor.  All the speeds are set.  The Perf Mons are collecting data and it can be seen in the interface util report.  All have the same creds.  ????????????</description><pubDate>Fri, 16 May 2008 13:55:26 GMT</pubDate><dc:creator>eebel49</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Hi, &lt;P&gt;i tried to used that script as an Active Monitor, but if i press the "Test" Button i get always an Error : "Error: The script timed out because it exceeded 10 seconds."&lt;/P&gt;&lt;P&gt;The Devices i am using for testing are our Routers with Perfomance Monitor "interface Utilisation" activated. The Devices are Running and iam using the right SNMP credentials&lt;/P&gt;&lt;P&gt;Using WU 11.0.3&lt;/P&gt;&lt;P&gt;Any Ideas?</description><pubDate>Fri, 16 May 2008 07:45:21 GMT</pubDate><dc:creator>Balrokk</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Has anyone tried this on v12?  I'm seeing that some of the variable names have changed.&lt;br&gt;&lt;br&gt;Also, I'm assuming that this is a AJScript, right?</description><pubDate>Thu, 15 May 2008 14:17:49 GMT</pubDate><dc:creator>eebel49</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>I started using the same script on a bunch of my router interfaces. It seems to work on some, but not on others. I've specified the appropriate speed for the interface...usually either 15440000 or 512000. &lt;/P&gt;&lt;P&gt;Does anyone have any thoughts as to why it wouldn't work on some interfaces? Below is script error that I get when testing it on a router that doesn't seem to work:&lt;/P&gt;&lt;P&gt;---------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Error: Source:'Microsoft OLE DB Provider for ODBC Drivers'&lt;BR&gt;Line:26  Char:2&lt;BR&gt;Error:0  '[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.'&lt;BR&gt;-v&lt;BR&gt;(null)&lt;BR&gt;---------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;I appreciate any help you all can provide.</description><pubDate>Tue, 26 Feb 2008 11:08:47 GMT</pubDate><dc:creator>clayman88</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Yes I'm afraid the script will only alert on 1 interface. To change this would require quite an extensive rewrite of the script. &lt;/P&gt;&lt;P&gt;Personally I found it better to make an individual device for all the interfaces you wish to alert for high utilization. That way you can easily see on your map what Interface has got high utilisation rather than having than the same red dot going red for many interfaces and then having to check which one it is.&lt;/P&gt;&lt;P&gt;Nick</description><pubDate>Wed, 02 Jan 2008 06:01:11 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>I have used this script but I my WUP just monitor the first interface of the device...&lt;/P&gt;&lt;P&gt;I have 6 interaces in the router, but just one of the fastethernet are show in the results. The script can't see other interfaces like serials on the router.&lt;/P&gt;&lt;P&gt;Any ideas?</description><pubDate>Fri, 21 Dec 2007 09:14:02 GMT</pubDate><dc:creator>LuizRicarte</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Ah good. I knew my code worked. Glad its helping you out.</description><pubDate>Wed, 11 Jul 2007 02:51:09 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Bingo!  That's fixed it.  Thanks for that.  This is an important feature that we've struggled to implement in WUG v11.&lt;br&gt;&lt;br&gt;Now it's just a case of manually setting all of our devices with interface speeds :(</description><pubDate>Tue, 10 Jul 2007 11:00:31 GMT</pubDate><dc:creator>jbrummell</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Ah.....just had a thought. Its not to do with the interface speeds is it?&lt;/P&gt;&lt;P&gt;If you havn't set interface speeds it won't know when to trigger the alarm, so it has to query them in the SQL. Can you check this please.</description><pubDate>Tue, 10 Jul 2007 08:19:15 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Interestingly - this works for me on 1 device (Cisco router), but fails on every other (Cisco switches) with this:  &lt;br&gt;&lt;br&gt;Error: Source:'Microsoft OLE DB Provider for ODBC Drivers'&lt;br&gt;Line:31  Char:2&lt;br&gt;Error:0  '[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '='.'&lt;br&gt;-v&lt;br&gt;(null)&lt;br&gt;&lt;br&gt;Line 31 of the script reads:&lt;br&gt;&lt;br&gt;var sSql3 = "SELECT nIfInOctets_AVG AS nInOctetsMax, nIfOutOctets_AVG AS nOutOctetsMax, nIfSpeedIn AS nIfSpeedInBps, nIfSpeedOut AS nIfSpeedOutBps FROM StatisticalInterfaceCache WHERE nStatisticalInterfaceIdentificationID = " + nStatisticalInterfaceIdentificationID;&lt;br&gt;&lt;br&gt;I have SNMP Interface Performance Monitors on every device.  Anyone else seen this issue and managed to resolve it?   I'll try and determine the differences between the working device and failing devices in the meantime.&lt;br&gt;&lt;br&gt;</description><pubDate>Tue, 10 Jul 2007 08:04:56 GMT</pubDate><dc:creator>jbrummell</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>all of our devices that we configure have SNMP working on them.</description><pubDate>Thu, 05 Jul 2007 17:35:29 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>And does this device have a working SNMP interface performance monitor?</description><pubDate>Thu, 28 Jun 2007 02:43:58 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>i have attached it to an exsisting device, device status shows down for the monitor, never seems to come up.</description><pubDate>Wed, 27 Jun 2007 13:38:28 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>Right,&lt;/P&gt;&lt;P&gt;I have tried the test button as well. If I select the device that has a performance monitor attached to it, everything works fine. However if I just select a random device with no performance monitor I get the same error as you. &lt;/P&gt;&lt;P&gt;Can you make sure there is a performance monitor (SNMP interface traffic) on the device you are testing? This script only checks the values written to the DB by the performance monitor.</description><pubDate>Mon, 25 Jun 2007 02:31:23 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>i do.&lt;/P&gt;&lt;P&gt;i'm not actually attaching the active monitor to a device yet.&lt;/P&gt;&lt;P&gt;This is how i get that error.&lt;/P&gt;&lt;P&gt;I create a new active script monitor in the active script monitor library, copy the script, select the script i just created and click the test button. it comes back with that error.</description><pubDate>Fri, 22 Jun 2007 14:30:53 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>I honestly don't have a clue why this is not working for you. &lt;/P&gt;&lt;P&gt;Can I just check that you do have a network interface performance monitor also on the device?</description><pubDate>Fri, 22 Jun 2007 12:54:50 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>i'm getting this error message when i test it.&lt;/P&gt;&lt;P&gt;Error: Source:'Microsoft OLE DB Provider for ODBC Drivers'&lt;BR&gt;Line:26  Char:2&lt;BR&gt;Error:0  '[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.'&lt;BR&gt;-v&lt;BR&gt;(null)&lt;BR&gt;</description><pubDate>Fri, 22 Jun 2007 11:05:22 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>thanx. i'll try that.</description><pubDate>Thu, 14 Jun 2007 11:47:13 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>No promises that this will work straight away for you, but here is the modified script which works fine for us&lt;/P&gt;&lt;P&gt;[code]&lt;BR&gt;// Get the Open DB connection from the Context NameSpace&lt;BR&gt;var oDb = Context.GetDB;&lt;BR&gt;if (null == oDb)&lt;BR&gt;{&lt;BR&gt;   Context.SetResult( 1, "  Problem creating the DB object");&lt;BR&gt;} &lt;BR&gt;else&lt;BR&gt;{&lt;/P&gt;&lt;P&gt;var oRs = new ActiveXObject("ADODB.Recordset");&lt;/P&gt;&lt;P&gt;// Get the device ID&lt;BR&gt;  var nDeviceID=0;&lt;BR&gt;  nDeviceID = Context.GetProperty("DeviceID");&lt;BR&gt;   &lt;BR&gt;// Definition  of Maximum allowable interface utilization percentage&lt;BR&gt;//   Change this value to what you want to alarm at.  We use 80%.&lt;BR&gt;  var nMaxUtilizationPercentage = 80;&lt;/P&gt;&lt;P&gt;// Retrieve the nPivotStatisticalMonitorTypeToDeviceID&lt;BR&gt;  var sSql = "SELECT nPivotStatisticalMonitorTypeToDeviceID from PivotStatisticalMonitorTypeToDevice WHERE bEnabled=1 AND nStatisticalMonitorTypeID = 1 AND nDeviceID = " + nDeviceID;&lt;BR&gt;  var oRs = oDb.Execute(sSql);&lt;BR&gt;  var nPivotStatisticalMonitorTypeToDeviceID = oRs("nPivotStatisticalMonitorTypeToDeviceID");&lt;/P&gt;&lt;P&gt;// Retrieve the nStatisticalInterfaceIdentificationID&lt;BR&gt;  var sSql = "SELECT nStatisticalInterfaceIdentificationID from StatisticalInterfaceIdentification WHERE nIfInSpeedCustom &amp;gt; 0 AND nPivotStatisticalMonitorTypeToDeviceID = " + nPivotStatisticalMonitorTypeToDeviceID;&lt;BR&gt;  var oRs = oDb.Execute(sSql);&lt;BR&gt;  var nStatisticalInterfaceIdentificationID = oRs("nStatisticalInterfaceIdentificationID");&lt;/P&gt;&lt;P&gt;// Retrieve the data for the device &lt;BR&gt;  var sSql3 = "SELECT nIfInOctets_AVG AS nInOctetsMax, nIfOutOctets_AVG AS nOutOctetsMax, nIfSpeedIn AS nIfSpeedInBps, nIfSpeedOut AS nIfSpeedOutBps FROM StatisticalInterfaceCache WHERE nStatisticalInterfaceIdentificationID = " + nStatisticalInterfaceIdentificationID;&lt;BR&gt;  oRs = oDb.Execute(sSql3);&lt;BR&gt;  oRs.moveFirst();&lt;/P&gt;&lt;P&gt;  var nInPercentage = 0;&lt;BR&gt;  var nOutPercentage = 0;&lt;/P&gt;&lt;P&gt;  while ( !oRs.EOF )&lt;BR&gt;  {&lt;BR&gt;    var nIfSpeedIn = oRs("nIfSpeedInBps");&lt;BR&gt;    var nIfSpeedOut = oRs("nIfSpeedOutBps");&lt;BR&gt;    var nIfIn_Avg = oRs("nInOctetsMax");&lt;BR&gt;    var nIfOut_Avg = oRs("nOutOctetsMax");&lt;BR&gt;    if ( nIfSpeedIn &amp;gt; 0 )&lt;BR&gt;    {&lt;BR&gt;      var nInPercentage = Math.round((nIfIn_Avg/(nIfSpeedIn / 10))*100);&lt;BR&gt;      var nOutPercentage = Math.round((nIfOut_Avg/(nIfSpeedOut / 10))*100);&lt;BR&gt;    }&lt;BR&gt;    else&lt;BR&gt;    {&lt;BR&gt;      nInPercentage = 0;&lt;BR&gt;      nOutPercentage = 0;&lt;BR&gt;    }&lt;BR&gt;    oRs.moveNext();&lt;/P&gt;&lt;P&gt;    if ( nInPercentage &amp;gt; nMaxUtilizationPercentage || nOutPercentage &amp;gt; nMaxUtilizationPercentage)&lt;BR&gt;    { &lt;BR&gt;      var oDisplay;&lt;BR&gt;      oDisplay = nDeviceID+" Failure: Interface ";&lt;BR&gt;      oDisplay += " is running at ";&lt;BR&gt;      oDisplay += nInPercentage;&lt;BR&gt;      oDisplay +=  "%/" + nOutPercentage;&lt;BR&gt;      oDisplay += "% utilization inbound/outbound (threshold is ";&lt;BR&gt;      oDisplay += nMaxUtilizationPercentage + "%).";&lt;BR&gt;      Context.SetResult( 1, oDisplay);&lt;BR&gt;    } &lt;BR&gt;    else&lt;BR&gt;    {&lt;BR&gt;      Context.SetResult(0, nDeviceID+"     Ok - Utilization Speed Normal"  + nOutPercentage +"% / " + nInPercentage+"%");&lt;BR&gt;    }&lt;BR&gt;  }&lt;BR&gt;  oRs.Close();&lt;BR&gt;}&lt;BR&gt;[/code]</description><pubDate>Thu, 14 Jun 2007 03:00:22 GMT</pubDate><dc:creator>NickF</dc:creator></item><item><title>RE: Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>how do i implement this script??</description><pubDate>Mon, 11 Jun 2007 14:31:27 GMT</pubDate><dc:creator>Darekn</dc:creator></item><item><title>Making a interface utilization alarm</title><link>http://forums.ipswitch.com/Topic33747-14-1.aspx</link><description>so after a few hours of reading documentation, i'm still confused as ever on how to create an active script.&lt;/P&gt;&lt;P&gt;This is what i need to accomplish.&lt;/P&gt;&lt;P&gt;i want a monitor in place to alert me via e-mail when my multilink starts spiking over 50%.&lt;/P&gt;&lt;P&gt;i found the script for it but i'm having a hard time trying to implement it.&lt;/P&gt;&lt;P&gt;here is the script that i have, it keeps giving me error messages.&lt;/P&gt;&lt;P&gt;any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;var oDb = Context.GetDB;&lt;BR&gt;if (null == oDb)&lt;BR&gt;{&lt;BR&gt;   Context.SetResult( 1, "  Problem creating the DB object");&lt;BR&gt;} &lt;BR&gt;else&lt;BR&gt;{&lt;/P&gt;&lt;P&gt;&lt;BR&gt;  var nDeviceID = Context.GetProperty("DeviceID");&lt;/P&gt;&lt;P&gt;  var nMaxUtilizationPercentage = 50;&lt;/P&gt;&lt;P&gt;  var sSql = "SELECT nPivotStatisticalMonitorTypeToDeviceID from PivotStatisticalMonitorTypeToDevice WHERE nDeviceID = " + nDeviceID;&lt;BR&gt;  var oRs = oDb.Execute(sSql);&lt;BR&gt;  var nPivotStatisticalMonitorTypeToDeviceID = oRs("nPivotStatisticalMonitorTypeToDeviceID");&lt;/P&gt;&lt;P&gt;  var sSql3 = "SELECT nIfInOctets_Max AS nInOctetsMax, nIfOutOctets_Max AS nOutOctetsMax, nIfSpeed AS nIfSpeedBps, sIfDescr FROM StatisticalInterface WHERE nPivotStatisticalMonitorTypeToDeviceID = " + nPivotStatisticalMonitorTypeToDeviceID;&lt;BR&gt;  oRs2 = oDb.Execute(sSql3);&lt;BR&gt;  oRs2.moveFirst();&lt;/P&gt;&lt;P&gt;  while ( !oRs2.EOF )&lt;BR&gt;  {&lt;BR&gt;    var nIfSpeed = oRs2("nIfSpeedBps");&lt;BR&gt;    var nIfIn_Avg = oRs2("nInOctetsMax");&lt;BR&gt;    var nIfOut_Avg = oRs2("nOutOctetsMax");&lt;BR&gt;    var nIfDescr = oRs2("sIfDescr");&lt;BR&gt;    if ( nIfSpeed &amp;gt; 0 )&lt;BR&gt;    {&lt;BR&gt;      var nInPercentage = Math.round((nIfIn_Avg / nIfSpeed * 100));&lt;BR&gt;      var nOutPercentage = Math.round((nIfOut_Avg / nIfSpeed * 100));&lt;BR&gt;    }&lt;BR&gt;    else&lt;BR&gt;    {&lt;BR&gt;      var nInPercentage = 0;&lt;BR&gt;      var nOutPercentage = 0;&lt;BR&gt;    }&lt;BR&gt;    oRs2.moveNext();&lt;/P&gt;&lt;P&gt;    if ( nInPercentage &amp;gt; nMaxUtilizationPercentage || nOutPercentage &amp;gt; nMaxUtilizationPercentage)&lt;BR&gt;    { &lt;BR&gt;      var oDisplay;&lt;BR&gt;      oDisplay = " Failure: Interface " + nIfDescr;&lt;BR&gt;      oDisplay += " is running at ";&lt;BR&gt;      oDisplay += nInPercentage;&lt;BR&gt;      oDisplay +=  "%/" + nOutPercentage;&lt;BR&gt;      oDisplay += "% utilization inbound/outbound (threshold is ";&lt;BR&gt;      oDisplay += nMaxUtilizationPercentage + "%).";&lt;BR&gt;      Context.SetResult( 1, oDisplay);&lt;BR&gt;    } &lt;BR&gt;    else&lt;BR&gt;    {&lt;BR&gt;      Context.SetResult(0, "     Ok");&lt;BR&gt;    }&lt;BR&gt;  }&lt;BR&gt;}</description><pubDate>Mon, 11 Jun 2007 14:02:16 GMT</pubDate><dc:creator>Darekn</dc:creator></item></channel></rss>