IBMPSG_PowerSupply Resource Model Documentation


This resource model monitors the IBMPSG_PowerSupply availability

General Info

Internal NameIBMPSG_PowerSupply
Descriptive NameIBMPSG_PowerSupply Monitor
Platformsw32-ix86
CategoryWizGenRM
Category DescriptionWizard Generated Resource Models
Cycle Time300
Version4.21

Dynamic Model

Class AliasROOT\ibmsd:IBMPSG_PowerSupply
Cim NameROOT\ibmsd:IBMPSG_PowerSupply
Numeric Attributes
    String Attributes
    • SystemCreationClassName
    • DeviceID
    • SystemName
    • CreationClassName
    • Status
    Collection TypeNon Sorted
    Sorting Field---
    Top---
    Every1
    Filtering

    Events

    Internal NameIBMPSG_PowerSupply_Error
    Descriptive NamePower Supply Error
    DescriptionThis event is generated when the status property of IBMPSG_PowerSupply does not equal "OK"
    MessageThe Device @DeviceID@ has reported a failure with possible loss of redundancy.
    Numeric Attributes
      String Attributes
      • SystemCreationClassName
      • DeviceID
      • SystemName
      • CreationClassName
      Keys
      • DeviceID
      Occurrences1
      Holes0
      Clearing EventTRUE
      Send to TECTRUE
      Send to TBSMFALSE
      SeverityCRITICAL

      Thresholds

      Internal NameDescriptive NameDescriptionDefault Value

      Parameters

      Internal NameDescriptive NameDescriptionTypeValues
      Par_Status_nesStatus mismatching valuesWhen the property Status is different from all the values of this parameter the event Ev_IBMPSG_PowerSupply_Status_unmatches is generated STRING LIST
      • OK

      Logging

      ContextResourceKeysNumeric AttributesString Attributes

      Decision Tree Script

      //''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
      //    IBM Tivoli Monitoring
      //    Decision Tree script
      //
      //    This file has been generated by IBM Tivoli Monitoring Workbench
      //
      //    10/06/2004 14:09:22
      
      //'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
      
      
      
      
      // This function is used to define the settings of the resource model
      // It is called only once, when the resource model is started.
      // Don't modify remarks containing tags like <<....>> ... <<\...>>
      // You can write additional initializing code in this function if required. 
      function SetDefaultConfiguration (Svc)
      {
      	// General info section
      	//<<GENERAL_INFO>>
      	Svc.SetModelName ("IBMPSG_PowerSupply");
      	Svc.SetProfileName ("4221140");
      	Svc.SetCycleTime (300);
      	//<<\GENERAL_INFO>>
      
      	// Thresholds section
      	//<<THRESHOLDS_INFO>>
      	//<<\THRESHOLDS_INFO>>
      
      	// Parameters section
      	//<<PARAMETERS_INFO>>
      	Svc.DefineStrParameter ("Par_Status_nes", "OK");
      	//<<\PARAMETERS_INFO>>
      
      	// Dynamic model section
      	//<<DATA_INFO>>
      	Svc.DefineClass ("CIM", "ROOT\\ibmsd:IBMPSG_PowerSupply", "ROOT\\ibmsd:IBMPSG_PowerSupply", "", "", "SystemCreationClassName,DeviceID,SystemName,CreationClassName,Status", "None", "", 0, 1);
      	//<<\DATA_INFO>>
      
      	// Event definition section
      	//<<EVENTS_INFO>>
      	Svc.DefineEvent ("IBMPSG_PowerSupply_Error", "", "SystemCreationClassName,DeviceID,SystemName,CreationClassName");
      	//<<\EVENTS_INFO>>
      
      	// Logging definition section
      	//<<LOGGING_INFO>>
      	//<<\LOGGING_INFO>>
      
      	// Place your additional intializing code below
      
      
      	return (0);
      
      }
      
      
      // This function is called by the DM For Windows Analyzer after that 
      // the resource model default settings have been overridden
      // It is called only once, when the resource model is started.
      // You can write additional initializing code in this function if required
      // to use the thresholds and parameters values
      function Init(Svc)
      {
      
      	return (0);
      
      }
      
      
      
      // This function contains the monitoring algorithm
      // It is called ciclically after a cycle time has elapsed
      // Implement the the monitoring code here
      function VisitTree(Svc)
      {
      
      	var curSystemCreationClassName;
      	var curDeviceID;
      	var curSystemName;
      	var curCreationClassName;
      	var curStatus;
      
      
      
      	var hPropTable;
      	var numOfInstances;
      	var idx;
      	var ParamCount;
      	var ParamIdx;
      	var Different;
      
      	hPropTable = Svc.CreateMap();
      
      	numOfInstances = Svc.GetNumOfInst("ROOT\\ibmsd:IBMPSG_PowerSupply");
      	for ( idx = 0; idx < numOfInstances; idx++) {
      
      		Svc.RemoveMapAll(hPropTable);
      
      
      		curSystemCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PowerSupply", idx, "SystemCreationClassName");
      		Svc.SetMapStrElement(hPropTable,"SystemCreationClassName",curSystemCreationClassName);
      		curDeviceID = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PowerSupply", idx, "DeviceID");
      		Svc.SetMapStrElement(hPropTable,"DeviceID",curDeviceID);
      		curSystemName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PowerSupply", idx, "SystemName");
      		Svc.SetMapStrElement(hPropTable,"SystemName",curSystemName);
      		curCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PowerSupply", idx, "CreationClassName");
      		Svc.SetMapStrElement(hPropTable,"CreationClassName",curCreationClassName);
      		curStatus = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PowerSupply", idx, "Status");
      		Svc.SetMapStrElement(hPropTable,"Status",curStatus);
      
      
      		Different = 1;
      		ParamCount = Svc.GetStrParameterCount("Par_Status_nes");
      		for (ParamIdx = 0; ParamIdx < ParamCount;  ParamIdx++) {
      			if ((curStatus.toLowerCase() + "") == (Svc.GetStrParameter("Par_Status_nes", ParamIdx).toLowerCase())) {
      				Different = 0;
      				break;
      			}
      		}
      		if (Different == 1) {
      			Svc.SendEventEx ("IBMPSG_PowerSupply_Error",hPropTable);
      		}
      	}
      
      	Svc.DestroyMap(hPropTable);
      
      	return (0);
      
      }
      
      

      Dependencies

      All
        w32-ix86


          This Html document has been generated by IBM Tivoli Monitoring Workbench