Beispiel #1
0
 static {
   nMaxCounters = 60;
   nMaxCounters =
       TextUtils.toInt(
           TextUtils.getValue(MasterConfig.getMasterConfig(), "_browsableContentMaxCounters"));
   if (nMaxCounters == 0) {
     nMaxCounters = 60;
   }
   pHostName = new StringProperty("_server", "");
   pHostName.setDisplayText("Server name", "the IPMI server name or IP address");
   pHostName.setParameterOptions(false, 1, false);
   pPortNumber = new StringProperty("_port", "623");
   pPortNumber.setDisplayText(
       "Port number", "the port number of the IPMI server (default is 623)");
   pPortNumber.setParameterOptions(false, 2, false);
   pUserName = new StringProperty("_user", "");
   pUserName.setDisplayText("User name", "user name to connect the IPMI server");
   pUserName.setParameterOptions(false, 3, false);
   pPassword = new StringProperty("_password", "");
   pPassword.setDisplayText("Password", "password to connect the IPMI server");
   pPassword.setParameterOptions(false, 4, false);
   pPassword.isPassword = true;
   chassisMericsMap = new Hashtable();
   chassisMericsMap.put("ChassisPowerOn", "Power On");
   chassisMericsMap.put("ChassisPowerOverload", "Power Overload");
   chassisMericsMap.put("ChassisPowerInterlock", "Power Interlock");
   chassisMericsMap.put("ChassisPowerFault", "Power Fault");
   chassisMericsMap.put("ChassisPowerControlFault", "Power Control Fault");
   chassisMericsMap.put("ChassisDriveFault", "Drive Fault");
   chassisMericsMap.put("ChassisCoolingFanFault", "Cooling Fan Fault");
   chassisMericsMap.put("ChassisIntrusion", "Chassis Intrusion");
   chassisMericsMap.put("ChassisFrontPanelLockout", "Front-Panel Lockout");
   pStatus = new StringProperty("status", "n/a");
   String s = (COM.dragonflow.StandardMonitor.IPMIMonitor.class).getName();
   StringProperty astringproperty[] = BrowsableBase.staticInitializer(nMaxCounters, true);
   StringProperty astringproperty1[] = new StringProperty[astringproperty.length + 5];
   System.arraycopy(astringproperty, 0, astringproperty1, 0, astringproperty.length);
   astringproperty1[astringproperty.length] = pHostName;
   astringproperty1[astringproperty.length + 1] = pPortNumber;
   astringproperty1[astringproperty.length + 2] = pUserName;
   astringproperty1[astringproperty.length + 3] = pPassword;
   astringproperty1[astringproperty.length + 4] = pStatus;
   addProperties(s, astringproperty1);
   setClassProperty(s, "description", "Collect IPMI data");
   setClassProperty(s, "help", "IPMIMonitor.htm");
   setClassProperty(s, "title", "IPMI");
   setClassProperty(s, "class", "IPMIMonitor");
   setClassProperty(s, "topazType", "IPMI");
   setClassProperty(s, "classType", "application");
   addClassElement(s, Rule.stringToClassifier("status == 'Error'\terror"));
   addClassElement(s, Rule.stringToClassifier("status == 'Warning'\twarning"));
   addClassElement(s, Rule.stringToClassifier("status == 'OK'\tgood"));
   setClassProperty(s, "target", "_server");
 }
Beispiel #2
0
  static {
    Array array = new Array();
    pSAPServer = new StringProperty("_server", "");
    pSAPServer.setDisplayText("Server", "SAP server name.");
    pSAPServer.setParameterOptions(false, true, BrowsableBase.COUNTER_PROPERTY_INDEX + 1, false);
    array.add(pSAPServer);
    pSystem = new StringProperty("_system", "00");
    pSystem.setDisplayText("System", "Enter the System number for SAP");
    pSystem.setParameterOptions(false, true, BrowsableBase.COUNTER_PROPERTY_INDEX + 2, false);
    array.add(pSystem);
    pClient = new StringProperty("_client");
    pClient.setDisplayText("Client", "Enter the Client for SAP, leave blank for default");
    pClient.setParameterOptions(false, true, BrowsableBase.COUNTER_PROPERTY_INDEX + 3, false);
    array.add(pClient);
    pUsername = new StringProperty("_username");
    pUsername.setDisplayText("Username", "Enter the Username for SAP");
    pUsername.setParameterOptions(false, true, BrowsableBase.COUNTER_PROPERTY_INDEX + 4, false);
    array.add(pUsername);
    pPassword = new StringProperty("_password");
    pPassword.setDisplayText("Password", "Enter the Password for SAP");
    pUsername.setParameterOptions(false, true, BrowsableBase.COUNTER_PROPERTY_INDEX + 5, false);
    pPassword.isPassword = true;
    array.add(pPassword);
    StringProperty astringproperty[] = new StringProperty[array.size()];
    for (int i = 0; i < array.size(); i++) {
      astringproperty[i] = (StringProperty) array.at(i);
    }

    String s = (com.dragonflow.StandardMonitor.SAPMonitor.class).getName();
    addProperties(s, astringproperty);
    addClassElement(s, Rule.stringToClassifier("countersInError > 0\terror", true));
    addClassElement(s, Rule.stringToClassifier("always\tgood"));
    setClassProperty(s, "description", "Monitor statistics from a SAP application server");
    setClassProperty(s, "help", "SAPMon.htm");
    setClassProperty(s, "title", "SAP");
    setClassProperty(s, "class", "SAPMonitor");
    setClassProperty(s, "target", "_server");
    setClassProperty(s, "topazName", "SAP");
    setClassProperty(s, "classType", "application");
    setClassProperty(s, "topazType", "ERP");
    if (!Platform.isWindows()) {
      setClassProperty(s, "loadable", "false");
    }
  }