WizRM_IBMPSG_TemperatureSensor Resource Model Documentation


This resource model monitors the IBMPSG_TemperatureSensor availability

General Info

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

Dynamic Model

Class AliasROOT\ibmsd:IBMPSG_TemperatureSensor
Cim NameROOT\ibmsd:IBMPSG_TemperatureSensor
Numeric Attributes
  • LowerThresholdNonCritical
  • CurrentReading
  • LowerThresholdFatal
  • UpperThresholdFatal
  • UpperThresholdNonCritical
  • UpperThresholdCritical
  • LowerThresholdCritical
String Attributes
  • SystemCreationClassName
  • DeviceID
  • SystemName
  • CurrentState
  • CreationClassName
Collection TypeNon Sorted
Sorting Field---
Top---
Every1
Filtering

Events

Internal NameIBMPSG_TemperatureSensor_CriticalHigh
Descriptive NameTemperature above critical threshold
DescriptionThis event is generated when the Current Reading has exceeded the defined critical threshold.
MessageThe temperature sensor @DeviceID@ has risen above the Critical Threshold of @UpperThresholdCritical@. Its current reading is @CurrentReading@.
Numeric Attributes
  • CurrentReading
  • UpperThresholdCritical
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityCRITICAL

Internal NameIBMPSG_TemperatureSensor_WarningHigh
Descriptive NameTemperature above warning threshold
DescriptionThis event is generated when the Current Reading has exceeded the defined noncritical threshold.
MessageThe temperature sensor @DeviceID@ has risen above the warning threshold of @UpperThresholdNonCritical@. Its current reading is @CurrentReading@.
Numeric Attributes
  • CurrentReading
  • UpperThresholdNonCritical
String Attributes
  • DeviceID
Keys
  • DeviceID
Occurrences1
Holes0
Clearing EventTRUE
Send to TECTRUE
Send to TBSMFALSE
SeverityWARNING

Thresholds

Internal NameDescriptive NameDescriptionDefault Value

Parameters

Internal NameDescriptive NameDescriptionTypeValues

Logging

ContextResourceKeysNumeric AttributesString Attributes
IBMPSG_TemperatureSensor_AvailabilityIBMPSG_TemperatureSensorSystemCreationClassName,DeviceID,SystemName,CreationClassNameCurrentReadingSystemCreationClassName,DeviceID,SystemName,CreationClassName

Decision Tree Script

//''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//    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);

}

Dependencies

All
    w32-ix86


      This Html document has been generated by IBM Tivoli Monitoring Workbench