WizRM_IBMPSG_PortableBattery Resource Model Documentation


This resource model monitors the IBMPSG_PortableBattery availability

General Info

Internal NameWizRM_IBMPSG_PortableBattery
Descriptive NameIBMPSG_PortableBattery Monitor
Platformsw32-ix86
CategoryWizGenRM
Category DescriptionWizard Generated Resource Models
Cycle Time300
Version1.0

Dynamic Model

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

Events

Internal NameIBMPSG_PortableBattery_BatteryStatus_is_critical
Descriptive NameBatteryStatus is critical
DescriptionThis event is generated when the BatteryStatus has been determined to be critical.
MessageThe Battery @DeviceID@ has Critical status.
Numeric Attributes
  • BatteryStatus
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityCRITICAL

Internal NameIBMPSG_PortableBattery_CriticalLow
Descriptive NameEstimatedChargeRemaining is below the defined threshold
DescriptionThis event is generated when the Current Reading has dropped below the defined threshold.
MessageThe Battery @DeviceID@ has dropped below the Critical Threshold. Its current reading is @EstimatedChargeRemaining@.
Numeric Attributes
  • EstimatedChargeRemaining
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityCRITICAL

Internal NameIBMPSG_PortableBattery_BatteryStatus_is_low
Descriptive NameBatteryStatus is low
DescriptionThis event is generated when the BatteryStatus has been determined to be low.
MessageThe Battery @DeviceID@ has Low status.
Numeric Attributes
  • BatteryStatus
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityWARNING

Internal NameIBMPSG_PortableBattery_FullChargeCapacity_too_low
Descriptive NameFullChargeCapacity too low, battery is near end of life
DescriptionThis event is generated when the counter FullChargeCapacity is lower than the threshold 'FullChargeCapacity lower bound'
MessageThe Battery @DeviceID@ has dropped below the Critical Threshold. Its current full charge capacity is @FullChargeCapacity@.
Numeric Attributes
  • FullChargeCapacity
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityCRITICAL

Thresholds

Internal NameDescriptive NameDescriptionDefault Value
Thr_FullChargeCapacity_ltFullChargeCapacity lower boundWhen the counter FullChargeCapacity is lower than this threshold the event Ev_IBMPSG_PortableBattery_FullChargeCapacity_too_low is generated80
Thr_EstimatedChargeRemaining_ltEstimatedChargeRemaining lower boundWhen the counter EstimatedChargeRemaining is lower than this threshold the event Ev_IBMPSG_PortableBattery_EstimatedChargeRemaining_too_low is generated10
Thr_BatteryStatus_eq_lowBatteryStatus matching valueThreshold for BatteryStatus=Low4
Thr_BatteryStatus_eqBatteryStatus matching valueWhen the counter BatteryStatus is equal to this threshold the event Ev_IBMPSG_PortableBattery_BatteryStatus_is_equal is generated5

Parameters

Internal NameDescriptive NameDescriptionTypeValues

Logging

ContextResourceKeysNumeric AttributesString Attributes
IBMPSG_PortableBattery_AvailabilityIBMPSG_PortableBatterySystemCreationClassName,DeviceID,SystemName,CreationClassNameBatteryStatus,FullChargeCapacity,EstimatedChargeRemainingSystemCreationClassName,DeviceID,SystemName,CreationClassName

Decision Tree Script

//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//    IBM Tivoli Monitoring
//    Decision Tree script
//
//    This file has been generated by IBM Tivoli Monitoring Workbench
//
//    02/28/2003 10:40:12

//'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''




// 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 ("WizRM_IBMPSG_PortableBattery");
	Svc.SetProfileName ("25125781");
	Svc.SetCycleTime (300);
	//<<\GENERAL_INFO>>

	// Thresholds section
	//<<THRESHOLDS_INFO>>
	Svc.DefineThreshold ("Thr_FullChargeCapacity_lt", 80.000000);
	Svc.DefineThreshold ("Thr_EstimatedChargeRemaining_lt", 10.000000);
	Svc.DefineThreshold ("Thr_BatteryStatus_eq_low", 4.000000);
	Svc.DefineThreshold ("Thr_BatteryStatus_eq", 5.000000);
	//<<\THRESHOLDS_INFO>>

	// Parameters section
	//<<PARAMETERS_INFO>>
	//<<\PARAMETERS_INFO>>

	// Dynamic model section
	//<<DATA_INFO>>
	Svc.DefineClass ("CIM", "ROOT\\ibmsd:IBMPSG_PortableBattery", "ROOT\\ibmsd:IBMPSG_PortableBattery", "", "LowBatteryAlert,BatteryStatus,FullChargeCapacity,EstimatedChargeRemaining", "SystemCreationClassName,DeviceID,SystemName,CreationClassName,Status", "None", "", 0, 1);
	//<<\DATA_INFO>>

	// Event definition section
	//<<EVENTS_INFO>>
	Svc.DefineEvent ("IBMPSG_PortableBattery_BatteryStatus_is_critical", "BatteryStatus", "DeviceID");
	Svc.DefineEvent ("IBMPSG_PortableBattery_CriticalLow", "EstimatedChargeRemaining", "DeviceID");
	Svc.DefineEvent ("IBMPSG_PortableBattery_BatteryStatus_is_low", "BatteryStatus", "DeviceID");
	Svc.DefineEvent ("IBMPSG_PortableBattery_FullChargeCapacity_too_low", "FullChargeCapacity", "DeviceID");
	//<<\EVENTS_INFO>>

	// Logging definition section
	//<<LOGGING_INFO>>
	Svc.DefineLogInst ("IBMPSG_PortableBattery_Availability", "IBMPSG_PortableBattery", "SystemCreationClassName,DeviceID,SystemName,CreationClassName", "BatteryStatus,FullChargeCapacity,EstimatedChargeRemaining", "SystemCreationClassName,DeviceID,SystemName,CreationClassName");
	//<<\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 curLowBatteryAlert;
	var curBatteryStatus;
	var curFullChargeCapacity;
	var curEstimatedChargeRemaining;

	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_PortableBattery");
	for ( idx = 0; idx < numOfInstances; idx++) {

		Svc.RemoveMapAll(hPropTable);

		curLowBatteryAlert = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "LowBatteryAlert");
		Svc.SetMapNumElement(hPropTable,"LowBatteryAlert",curLowBatteryAlert);
		curBatteryStatus = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "BatteryStatus");
		Svc.SetMapNumElement(hPropTable,"BatteryStatus",curBatteryStatus);
		curFullChargeCapacity = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "FullChargeCapacity");
		Svc.SetMapNumElement(hPropTable,"FullChargeCapacity",curFullChargeCapacity);
		curEstimatedChargeRemaining = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "EstimatedChargeRemaining");
		Svc.SetMapNumElement(hPropTable,"EstimatedChargeRemaining",curEstimatedChargeRemaining);

		curSystemCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "SystemCreationClassName");
		Svc.SetMapStrElement(hPropTable,"SystemCreationClassName",curSystemCreationClassName);
		curDeviceID = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "DeviceID");
		Svc.SetMapStrElement(hPropTable,"DeviceID",curDeviceID);
		curSystemName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "SystemName");
		Svc.SetMapStrElement(hPropTable,"SystemName",curSystemName);
		curCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "CreationClassName");
		Svc.SetMapStrElement(hPropTable,"CreationClassName",curCreationClassName);
		curStatus = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_PortableBattery", idx, "Status");
		Svc.SetMapStrElement(hPropTable,"Status",curStatus);


		if ( (curFullChargeCapacity < Svc.GetThreshold("Thr_FullChargeCapacity_lt")) && (curFullChargeCapacity > 0) ) {
			Svc.SetMapNumElement(hPropTable,"LowerBound",Svc.GetThreshold("Thr_FullChargeCapacity_lt"));
			Svc.SendEventEx ("IBMPSG_PortableBattery_FullChargeCapacity_too_low",hPropTable);
		}
		if (curBatteryStatus == Svc.GetThreshold("Thr_BatteryStatus_eq") ) {
			Svc.SetMapNumElement(hPropTable,"MatchingValue",Svc.GetThreshold("Thr_BatteryStatus_eq"));
			Svc.SendEventEx ("IBMPSG_PortableBattery_BatteryStatus_is_critical",hPropTable);
		}
		if (curBatteryStatus == Svc.GetThreshold("Thr_BatteryStatus_eq_low") ) {
			Svc.SetMapNumElement(hPropTable,"MatchingValue",Svc.GetThreshold("Thr_BatteryStatus_eq_low"));
			Svc.SendEventEx ("IBMPSG_PortableBattery_BatteryStatus_is_low",hPropTable);
		}
		if ( curEstimatedChargeRemaining < Svc.GetThreshold("Thr_EstimatedChargeRemaining_lt") ) {
			Svc.SetMapNumElement(hPropTable,"LowerBound",Svc.GetThreshold("Thr_EstimatedChargeRemaining_lt"));
			Svc.SendEventEx ("IBMPSG_PortableBattery_CriticalLow",hPropTable);
		}
		Svc.LogInstEx ("IBMPSG_PortableBattery_Availability","IBMPSG_PortableBattery", hPropTable);
	}

	Svc.DestroyMap(hPropTable);

	return (0);

}

Dependencies

All
    w32-ix86


      This Html document has been generated by IBM Tivoli Monitoring Workbench