This resource model monitors the IBMPSG_PortableBattery availability
| Internal Name | WizRM_IBMPSG_PortableBattery |
| Descriptive Name | IBMPSG_PortableBattery Monitor |
| Platforms | w32-ix86 |
| Category | WizGenRM |
| Category Description | Wizard Generated Resource Models |
| Cycle Time | 300 |
| Version | 1.0 |
| Class Alias | ROOT\ibmsd:IBMPSG_PortableBattery |
| Cim Name | ROOT\ibmsd:IBMPSG_PortableBattery |
| Numeric Attributes |
|
| String Attributes |
|
| Collection Type | Non Sorted |
| Sorting Field | --- |
| Top | --- |
| Every | 1 |
| Filtering |
| Internal Name | IBMPSG_PortableBattery_BatteryStatus_is_critical |
| Descriptive Name | BatteryStatus is critical |
| Description | This event is generated when the BatteryStatus has been determined to be critical. |
| Message | The Battery @DeviceID@ has Critical status. |
| Numeric Attributes |
|
| String Attributes |
|
| Keys |
|
| Occurrences | 1 |
| Holes | 0 |
| Clearing Event | TRUE |
| Send to TEC | TRUE |
| Send to TBSM | FALSE |
| Severity | CRITICAL |
| Internal Name | IBMPSG_PortableBattery_CriticalLow |
| Descriptive Name | EstimatedChargeRemaining is below the defined threshold |
| Description | This event is generated when the Current Reading has dropped below the defined threshold. |
| Message | The Battery @DeviceID@ has dropped below the Critical Threshold. Its current reading is @EstimatedChargeRemaining@. |
| Numeric Attributes |
|
| String Attributes |
|
| Keys |
|
| Occurrences | 1 |
| Holes | 0 |
| Clearing Event | TRUE |
| Send to TEC | TRUE |
| Send to TBSM | FALSE |
| Severity | CRITICAL |
| Internal Name | IBMPSG_PortableBattery_BatteryStatus_is_low |
| Descriptive Name | BatteryStatus is low |
| Description | This event is generated when the BatteryStatus has been determined to be low. |
| Message | The Battery @DeviceID@ has Low status. |
| Numeric Attributes |
|
| String Attributes |
|
| Keys |
|
| Occurrences | 1 |
| Holes | 0 |
| Clearing Event | TRUE |
| Send to TEC | TRUE |
| Send to TBSM | FALSE |
| Severity | WARNING |
| Internal Name | IBMPSG_PortableBattery_FullChargeCapacity_too_low |
| Descriptive Name | FullChargeCapacity too low, battery is near end of life |
| Description | This event is generated when the counter FullChargeCapacity is lower than the threshold 'FullChargeCapacity lower bound' |
| Message | The Battery @DeviceID@ has dropped below the Critical Threshold. Its current full charge capacity is @FullChargeCapacity@. |
| Numeric Attributes |
|
| String Attributes |
|
| Keys |
|
| Occurrences | 1 |
| Holes | 0 |
| Clearing Event | TRUE |
| Send to TEC | TRUE |
| Send to TBSM | FALSE |
| Severity | CRITICAL |
| Internal Name | Descriptive Name | Description | Default Value |
|---|---|---|---|
| Thr_FullChargeCapacity_lt | FullChargeCapacity lower bound | When the counter FullChargeCapacity is lower than this threshold the event Ev_IBMPSG_PortableBattery_FullChargeCapacity_too_low is generated | 80 |
| Thr_EstimatedChargeRemaining_lt | EstimatedChargeRemaining lower bound | When the counter EstimatedChargeRemaining is lower than this threshold the event Ev_IBMPSG_PortableBattery_EstimatedChargeRemaining_too_low is generated | 10 |
| Thr_BatteryStatus_eq_low | BatteryStatus matching value | Threshold for BatteryStatus=Low | 4 |
| Thr_BatteryStatus_eq | BatteryStatus matching value | When the counter BatteryStatus is equal to this threshold the event Ev_IBMPSG_PortableBattery_BatteryStatus_is_equal is generated | 5 |
| Internal Name | Descriptive Name | Description | Type | Values |
|---|
| Context | Resource | Keys | Numeric Attributes | String Attributes |
|---|---|---|---|---|
| IBMPSG_PortableBattery_Availability | IBMPSG_PortableBattery | SystemCreationClassName,DeviceID,SystemName,CreationClassName | BatteryStatus,FullChargeCapacity,EstimatedChargeRemaining | SystemCreationClassName,DeviceID,SystemName,CreationClassName |
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// 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);
}
|
| All | |
| w32-ix86 |
This Html document has been generated by IBM Tivoli Monitoring Workbench