This resource model monitors the IBMPSG_TemperatureSensor availability
| Internal Name | WizRM_IBMPSG_TemperatureSensor |
| Descriptive Name | IBMPSG_TemperatureSensor Monitor |
| Platforms | w32-ix86 |
| Category | WizGenRM |
| Category Description | Wizard Generated Resource Models |
| Cycle Time | 300 |
| Version | 1.0 |
| Class Alias | ROOT\ibmsd:IBMPSG_TemperatureSensor |
| Cim Name | ROOT\ibmsd:IBMPSG_TemperatureSensor |
| Numeric Attributes |
|
| String Attributes |
|
| Collection Type | Non Sorted |
| Sorting Field | --- |
| Top | --- |
| Every | 1 |
| Filtering |
| Internal Name | IBMPSG_TemperatureSensor_CriticalHigh |
| Descriptive Name | Temperature above critical threshold |
| Description | This event is generated when the Current Reading has exceeded the defined critical threshold. |
| Message | The temperature sensor @DeviceID@ has risen above the Critical Threshold of @UpperThresholdCritical@. Its current reading is @CurrentReading@. |
| 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_TemperatureSensor_WarningHigh |
| Descriptive Name | Temperature above warning threshold |
| Description | This event is generated when the Current Reading has exceeded the defined noncritical threshold. |
| Message | The temperature sensor @DeviceID@ has risen above the warning threshold of @UpperThresholdNonCritical@. Its current reading is @CurrentReading@. |
| Numeric Attributes |
|
| String Attributes |
|
| Keys |
|
| Occurrences | 1 |
| Holes | 0 |
| Clearing Event | TRUE |
| Send to TEC | TRUE |
| Send to TBSM | FALSE |
| Severity | WARNING |
| Internal Name | Descriptive Name | Description | Default Value |
|---|
| Internal Name | Descriptive Name | Description | Type | Values |
|---|
| Context | Resource | Keys | Numeric Attributes | String Attributes |
|---|---|---|---|---|
| IBMPSG_TemperatureSensor_Availability | IBMPSG_TemperatureSensor | SystemCreationClassName,DeviceID,SystemName,CreationClassName | CurrentReading | SystemCreationClassName,DeviceID,SystemName,CreationClassName |
//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// IBM Tivoli Monitoring
// Decision Tree script
//
// This file has been generated by IBM Tivoli Monitoring Workbench
//
// 02/26/2003 13:11:42
//'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
// 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_TemperatureSensor");
Svc.SetProfileName ("252344546");
Svc.SetCycleTime (300);
//<<\GENERAL_INFO>>
// Thresholds section
//<<THRESHOLDS_INFO>>
//<<\THRESHOLDS_INFO>>
// Parameters section
//<<PARAMETERS_INFO>>
//<<\PARAMETERS_INFO>>
// Dynamic model section
//<<DATA_INFO>>
Svc.DefineClass ("CIM", "ROOT\\ibmsd:IBMPSG_TemperatureSensor", "ROOT\\ibmsd:IBMPSG_TemperatureSensor", "", "LowerThresholdNonCritical,CurrentReading,LowerThresholdFatal,UpperThresholdFatal,UpperThresholdNonCritical,UpperThresholdCritical,LowerThresholdCritical", "SystemCreationClassName,DeviceID,SystemName,CurrentState,CreationClassName", "None", "", 0, 1);
//<<\DATA_INFO>>
// Event definition section
//<<EVENTS_INFO>>
Svc.DefineEvent ("IBMPSG_TemperatureSensor_CriticalHigh", "CurrentReading,UpperThresholdCritical", "DeviceID");
Svc.DefineEvent ("IBMPSG_TemperatureSensor_WarningHigh", "CurrentReading,UpperThresholdNonCritical", "DeviceID");
//<<\EVENTS_INFO>>
// Logging definition section
//<<LOGGING_INFO>>
Svc.DefineLogInst ("IBMPSG_TemperatureSensor_Availability", "IBMPSG_TemperatureSensor", "SystemCreationClassName,DeviceID,SystemName,CreationClassName", "CurrentReading", "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 curLowerThresholdNonCritical;
var curCurrentReading;
var curLowerThresholdFatal;
var curUpperThresholdFatal;
var curUpperThresholdNonCritical;
var curUpperThresholdCritical;
var curLowerThresholdCritical;
var curSystemCreationClassName;
var curDeviceID;
var curSystemName;
var curCurrentState;
var curCreationClassName;
var hPropTable;
var numOfInstances;
var idx;
var ParamCount;
var ParamIdx;
var Different;
hPropTable = Svc.CreateMap();
numOfInstances = Svc.GetNumOfInst("ROOT\\ibmsd:IBMPSG_TemperatureSensor");
for ( idx = 0; idx < numOfInstances; idx++) {
Svc.RemoveMapAll(hPropTable);
curLowerThresholdNonCritical = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "LowerThresholdNonCritical");
Svc.SetMapNumElement(hPropTable,"LowerThresholdNonCritical",curLowerThresholdNonCritical);
curCurrentReading = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "CurrentReading");
Svc.SetMapNumElement(hPropTable,"CurrentReading",curCurrentReading);
curLowerThresholdFatal = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "LowerThresholdFatal");
Svc.SetMapNumElement(hPropTable,"LowerThresholdFatal",curLowerThresholdFatal);
curUpperThresholdFatal = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "UpperThresholdFatal");
Svc.SetMapNumElement(hPropTable,"UpperThresholdFatal",curUpperThresholdFatal);
curUpperThresholdNonCritical = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "UpperThresholdNonCritical");
Svc.SetMapNumElement(hPropTable,"UpperThresholdNonCritical",curUpperThresholdNonCritical);
curUpperThresholdCritical = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "UpperThresholdCritical");
Svc.SetMapNumElement(hPropTable,"UpperThresholdCritical",curUpperThresholdCritical);
curLowerThresholdCritical = Svc.GetNumProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "LowerThresholdCritical");
Svc.SetMapNumElement(hPropTable,"LowerThresholdCritical",curLowerThresholdCritical);
curSystemCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "SystemCreationClassName");
Svc.SetMapStrElement(hPropTable,"SystemCreationClassName",curSystemCreationClassName);
curDeviceID = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "DeviceID");
Svc.SetMapStrElement(hPropTable,"DeviceID",curDeviceID);
curSystemName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "SystemName");
Svc.SetMapStrElement(hPropTable,"SystemName",curSystemName);
curCurrentState = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "CurrentState");
Svc.SetMapStrElement(hPropTable,"CurrentState",curCurrentState);
curCreationClassName = Svc.GetStrProperty("ROOT\\ibmsd:IBMPSG_TemperatureSensor", idx, "CreationClassName");
Svc.SetMapStrElement(hPropTable,"CreationClassName",curCreationClassName);
if (curCurrentReading > curUpperThresholdCritical) {
Svc.SendEventEx ("IBMPSG_TemperatureSensor_CriticalHigh",hPropTable);
}
else if (curCurrentReading > curUpperThresholdNonCritical) {
Svc.SendEventEx ("IBMPSG_TemperatureSensor_WarningHigh",hPropTable);
}
Svc.LogInstEx ("IBMPSG_TemperatureSensor_Availability","IBMPSG_TemperatureSensor", hPropTable);
}
Svc.DestroyMap(hPropTable);
return (0);
}
|
| All | |
| w32-ix86 |
This Html document has been generated by IBM Tivoli Monitoring Workbench