Here is what I've created to solve that problem. It's part of a bigger script that gives me an 'overview' of multiple WhatsUp monitoring stations.

Hope it helps,

Dave Habben
Network Specialist
Illinois Century Network
http://www.illinois.net

Anthony Valuikas wrote:
I'm trying to get a TOTAL_SERVICES_UP count and didn't see anything under
<%MAP% keyword-argument>. Is there any way to do this like in
TOTAL_DEVICES_UP? If not can I recommend a feature request.
<TABLE>
 <script language="JavaScript">
  <!--

  //////////////////////////////////////////
  // Begin region specific customizations //
  //////////////////////////////////////////
  
  var Region = "Region X";
  var URL = "http://127.0.0.1";;
  
  //////////////////////////////////////////
  // End region specific customizations ////
  //////////////////////////////////////////
  
  var Up = 0;
  var Down = 0;
  var Services = 0;

  <%START_LOADED_MAP_LIST%>
   Up = Up + <%MAP% TOTAL_DEVICES_UP>;
   Down = Down + <%MAP% TOTAL_DEVICES_DOWN>;
   Services = Services + <%MAP% TOTAL_SERVICES_DOWN>;
  <%END_LOADED_MAP_LIST%>
  
  document.write("<TR>");
  document.write("<TD><A HREF=" + URL + ">" + Region + "</A></TD>");

  if (Up == 0) {
    document.write("<TD align=right>" + Up + "</TD>"); }
   else {
    document.write("<TD bgcolor=#77ff77 align=right>" + Up + "</TD>"); }
  
  if (Down == 0) {
   document.write("<TD align=right>" + Down + "</TD>"); }
  else {
   document.write("<TD bgcolor=#ff7777 align=right>" + Down + "</TD>"); }
  
  if (Services == 0) {
   document.write("<TD align=right>" + Services + "</TD>"); }
  else {
   document.write("<TD bgcolor=#ff77ff align=right>" + Services + "</TD>"); }
  
  document.write("</TR>");
  
  // -->
 </script>
</TABLE>

Reply via email to