Start a Conversation

Unsolved

This post is more than 5 years old

815

September 29th, 2009 06:00

Troubles with dynamic modeling

I´m trying to do an dynamic model of UPS APC.


1_First, I made the Dynamic Model of an class called "UPS".

interface UPS : UnitaryComputerSystem
"UPS Class created by me"
{
}

2_Second, create an instrument class called "VoltageSensor_Fault_APC"

interface VoltageSensor_Fault_APC : VoltageSensor_Fault
{

instrument SNMP {

RMS_Vmin = "1.3.6.1.4.1.318.1.1.1.9.2.3.1.3.1.1.",
RMS_Vmax = "1.3.6.1.4.1.318.1.1.1.9.2.3.1.4.1.1.",
RMS_Vout = "1.3.6.1.4.1.318.1.1.1.9.3.3.1.3.1.1.",
RMS_Freq = "1.3.6.1.4.1.318.1.1.1.3.2.4.",
RMS_PctWout = "1.3.6.1.4.1.318.1.1.1.9.3.3.1.16.1.1.",
RMS_PctCap = "1.3.6.1.4.1.318.1.1.1.2.2.1.",
RMS_Vbat = "1.3.6.1.4.1.318.1.1.1.2.2.8.",
RMS_TupsC = "1.3.6.1.4.1.318.1.1.1.2.2.2.",
RMS_TIambC = "1.3.6.1.4.1.318.1.1.10.2.3.2.1.4."
};


instrumented attribute int RMS_Vmin
"comentario";

instrumented attribute int RMS_Vmax
"comentario";

instrumented attribute int RMS_Vout
"comentario2";

instrumented attribute unsigned int RMS_Freq
"comentario3";

instrumented attribute int RMS_PctWout;

instrumented attribute unsigned int RMS_PctCap;

instrumented attribute int RMS_Vbat;

instrumented attribute unsigned int RMS_TupsC;

instrumented attribute int RMS_TIambC;

}


3_Add the OID of APC device to "oid2type_Misc".

.1.3.6.1.4.1.318.1.3.5.1 {
TYPE = UPS
VENDOR = APC
MODEL = AP605
CERTIFICATION = CERTIFIED

INSTRUMENTATION:
Environment = APC:DeviceID
Interface-Fault = MIB2
Interface-Performance = MIB2

My comnet is achieving the following:

Class UPS -> Instance[Name of UPS device] ->ComposedOf ->VoltageSensor ->Instance[VoltageSensor_Name of UPS device_x] -> InstrumentedBy VoltageSensor_Fault_APC

But I tried differents ways and nothing, I´m loss in this.

2 Intern

 • 

138 Posts

September 29th, 2009 07:00

Hi Boss,

1) What about the Discovery script for creating Voltage Sensors for your UPS and the UPS instance itself?
2) Where do you set - refine the "Status" field in instrumentation class ?
3) What about Thresholds fields ?
a) VoltageSensorHighThreshold =
b) VoltageSensorLowThreshold =
c) HighThreshold =
4) Look in to health/env-setting.asl script file that make instrumentation classes and enter OIDs to SNMP Accessor.

Take my example for same environment module "Fan"

Boss, look, there are 2 ways to implement the checks in APM, attached 2 examples:

First example is create event in Instrumentation class itself
Second example is refine status field in instrumentation class and propagate the status field or some other key field to Setting class.


interface Fan_Fault_xHuawei : Fan_Fault
{
        instrument SNMP {
        xHuaweiFanStatus = ".1.3.6.1.4.1.2011.6.1.1.1.1.8"
        };
 
        readonly instrumented attribute int xHuaweiFanStatus;
 
        refine computed Status =
        case (xHuaweiFanStatus) {
                key 1 : "OK";
                key 2 : "CRITICAL";
                default :"UNKNOWN";
        };
}
 


//Second example

interface TemperatureSensor_Fault_xHuawei : TemperatureSensor_Fault
{
        instrument SNMP {
                xHuaweiTempVal = ".1.3.6.1.4.1.2011.6.1.1.5.1.7"
        };
 
        readonly instrumented attribute int xHuaweiTempVal
        "Huawei 5600 Temperature value";
 
        readonly computed attribute float xHuaweiTempVal_C
        "Calculated value in C"
        = xHuaweiTempVal / 100;
 
        refine computed CurrentValue
        = xHuaweiTempVal_C;
 
        refine computed HighThreshold
        = TemperatureHighThreshold;
 
        refine event OutOfRange
        = CurrentValue >= HighThreshold;
 
        export OutOfRange;
 
        refine computed Status
        = case (xHuaweiTempVal) {
                key -1 : "CRITICAL";
                default : "OK";
        };
}


Enjoy.
No Events found!

Top