Index: mibs/APNL-MODULAR-PDU-MIB
===================================================================
--- mibs/APNL-MODULAR-PDU-MIB	(revision 0)
+++ mibs/APNL-MODULAR-PDU-MIB	(revision 0)
@@ -0,0 +1,1048 @@
+
+-- Last edit: Thu Jan 24 13:00:00 2013
+-- Jeroen Verheul
+-- 
+-- File: apnl-modular-pdu-v2.0.mib
+-- 
+-- Contact
+-- Vincent Veltens <v.veltens@apnederland.nl>
+-- Release version V2.0
+
+APNL-MODULAR-PDU-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+	NOTIFICATION-TYPE, OBJECT-TYPE, MODULE-IDENTITY, 
+	enterprises, IpAddress, Unsigned32, Integer32
+		FROM SNMPv2-SMI
+	DateAndTime, DisplayString
+		FROM SNMPv2-TC;
+
+apNederland MODULE-IDENTITY
+	LAST-UPDATED "201301241000Z"
+	ORGANIZATION 
+		"AP Nederland"
+	CONTACT-INFO 
+		"Vincent Veltens <v.veltens@apnederland.nl>"
+	DESCRIPTION 
+		"This MIB module defines the modular PDU version of AP Nederland."
+
+	REVISION "201301241305Z"
+	DESCRIPTION 
+		"Initial Version"
+::= { enterprises 29640 }
+
+
+-- Tue Mar 20 2012.
+-- 
+
+apnlDirectory        OBJECT IDENTIFIER ::= { apNederland 1 }
+apnlMib              OBJECT IDENTIFIER ::= { apNederland 2 }
+apnlTmp              OBJECT IDENTIFIER ::= { apNederland 3 }
+apnlModules          OBJECT IDENTIFIER ::= { apNederland 4 }
+
+-- Blackbox CM Communication module (mib definition is in apnl-mib.mib).
+
+cm                   OBJECT IDENTIFIER ::= { apnlModules 1 }
+cmTraps              OBJECT IDENTIFIER ::= { apnlModules 2 }
+
+-- Modular PDU Communication module
+
+pdu                  OBJECT IDENTIFIER ::= { apnlModules 3 }
+pduTraps             OBJECT IDENTIFIER ::= { apnlModules 4 }
+apnlTest             OBJECT IDENTIFIER ::= { apNederland 5 }
+apnlDemo             OBJECT IDENTIFIER ::= { apNederland 6 }
+apnlMIBConformance   OBJECT IDENTIFIER ::= { apNederland 7 }
+
+pduType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		pduModular (0),
+		pduGateway1 (1),
+		pduGateway2 (2)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Type of the Pdu.
+		PduModular     (0) Modulaire OEC2 PDU communication through SNMPV3, MOD-BUS or AP-BUS in emulation mode.
+		PduGateway1 (1) Gateway to connect OEC1 products with external AP-BUS protocol to OEC2 Manager (SNMPV3).
+		PduGateway2 (2) Gateway to connect OEC2 products with external MOD-BUS to OEC Manager (SNMPV3).
+		"
+	::= { pdu 1 }
+
+-- Product serial number
+
+pduProductIdentifier  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Unique serial number to identify a pdu, the  number is between 1 and 65535. "
+	::= { pdu 2 }
+
+pduSerialNumber  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..16))
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"PDU onboard Serial Number."
+	::= { pdu 3 }
+
+pduStatus  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		pduBusy (0),
+		pduReady1 (1),
+		pduAlarm (2),
+		pduError (3)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Status of the Pdu.
+		pduBusy        (0) Indicates that an admin command is in progress.
+		pduReady     (1) The execution of  an admin command was successfull.
+		pduAlarm       (2) This state is not in use. 
+		pduError         (3) The execution of an admin command failed."
+	::= { pdu 4 }
+
+pduPower  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"kiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured pdu power in Kilo Watt's*Hour."
+	::= { pdu 5 }
+
+pduPowerL1  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"kiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured pdu power in Kilo Watt's*Hour for phase 1."
+	::= { pdu 6 }
+
+pduPowerL2  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"kiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured pdu power in Kilo Watt's*Hour for phase 2."
+	::= { pdu 7 }
+
+pduPowerL3  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"kiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured pdu power in Kilo Watt's*Hour for phase 3."
+	::= { pdu 8 }
+
+pduKvar  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"KiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total Reactive Power of the pdu. It is the power that magnetic  equipment 
+		(transformer, motor and relay) needs to produce the magnetizing flux."
+	REFERENCE 
+		"http://standby.iea-4e.org/files/otherfiles/0000/0059/PowerFactorBasics.pdf"
+	::= { pdu 9 }
+
+pduKvarL1  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"KiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total Reactive Power of the pdu for phase 1. It is the power that magnetic  equipment 
+		(transformer, motor and relay) needs to produce the magnetizing flux."
+	REFERENCE 
+		"http://standby.iea-4e.org/files/otherfiles/0000/0059/PowerFactorBasics.pdf"
+	::= { pdu 10 }
+
+pduKvarL2  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"KiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total Reactive Power of the pdu for phase 2. It is the power that magnetic  equipment 
+		(transformer, motor and relay) needs to produce the magnetizing flux."
+	REFERENCE 
+		"http://standby.iea-4e.org/files/otherfiles/0000/0059/PowerFactorBasics.pdf"
+	::= { pdu 11 }
+
+pduKvarL3  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"KiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total Reactive Power of the pdu for phase 3. It is the power that magnetic  equipment 
+		(transformer, motor and relay) needs to produce the magnetizing flux."
+	REFERENCE 
+		"http://standby.iea-4e.org/files/otherfiles/0000/0059/PowerFactorBasics.pdf"
+	::= { pdu 12 }
+
+pdulAcurrent  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured ac current for the pdu (in 1/10th Amperes) ."
+	::= { pdu 13 }
+
+pduAcurrentL1  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured ac current for phase 1 (in 1/10th Amperes)."
+	::= { pdu 14 }
+
+pduAcurrentL2  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured ac current for phase 2 (in 1/10th Amperes)."
+	::= { pdu 15 }
+
+pduAcurrentL3  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The total measured ac current for phase 3 (in 1/10th Amperes)."
+	::= { pdu 16 }
+
+pduCurIpAddress  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The current PDU IPv4 Address by which TCP/IP access is available. 
+		        "
+	::= { pdu 17 }
+
+pduCurSubNetMask  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The current PDU IPv4 Subnet Mask used by the Ipstack (e.g: 255.255.255.0)."
+	::= { pdu 18 }
+
+pduCurDefGwAddress  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The current PDU IPv4 default gateway address used by the Ipstack (e.g: 192.168.1.1)."
+	::= { pdu 19 }
+
+-- Number of items in the node table.
+
+pduNumberOfNodes  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Number of items in the node table."
+	::= { pdu 20 }
+
+-- Number of items in the sensor table.
+-- 
+
+pduNumberOfSensors  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Number of items in the sensor table."
+	::= { pdu 21 }
+
+-- apnl upper level scalars
+-- 
+
+pduSoftwareVersion  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..10))
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"PDU software version number."
+	::= { pdu 22 }
+
+pduFirmwareVersion  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..10))
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"PDU firmware version number."
+	::= { pdu 23 }
+
+pduBusProtocol  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		apbus (0),
+		modbus (1)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Selected protocol used on the external bus of the pdu.
+		AP-BUS     (0) Protocol used by OEC1 products or by OEC2 products in emulation mode.
+		MOD-BUS (1) Protocol used by OEC2 products."
+	::= { pdu 24 }
+
+pduAdminCommand  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		noOp (0),
+		rebootPdu (1),
+		rediscover (2),
+		updateSofware (3),
+		resetConfig (4),
+		resetSNMPv3Config (5),
+		resetNetworkSetting (6),
+		readDataFromBusPdu (7),
+		writeDataToBusPdu (8)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"PDU admin management Commands:
+		        noOp                                    (0)  No operation.
+		        rebootPdu                          (1)  Reboot the PDU (to execute new settings). 
+		        rediscover                         (2)   Not supported.
+		        updateSofware                (3)   Not supported.
+		        resetConfig                        (4)   Node  and group tables will be cleared .
+		        resetSNMPv3Config       (5)  Not supported.
+		        resetNetworkSetting       (6)  Reset network params: ip address, defualt gatewy, subnet mask.
+		        readDataFromBusPdu  (7)  Read data from a PDU connected to the external bus (address is set in pduBusAddress).
+		        writeDataToBusPdu       (8)  With this command modified data is writen back to the bus PDU (address is set in pduBusAddress).
+		        "
+	::= { pdu 25 }
+
+pduStartupIpAddress  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Not supported.
+		        "
+	::= { pdu 26 }
+
+pduStartupSubNetMask  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Not supported."
+	::= { pdu 27 }
+
+pduStartupDefGwAddress  OBJECT-TYPE
+	SYNTAX     IpAddress
+	UNITS 	"IPv4 Addr"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Not supported."
+	::= { pdu 28 }
+
+pduRealTimeClock  OBJECT-TYPE
+	SYNTAX     DateAndTime
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"PDU Real-Time Clock. Maybe set by the manager."
+	::= { pdu 29 }
+
+pduEnableFeatures  OBJECT-TYPE
+	SYNTAX     BITS {
+		globalWebEnabled (0),
+		globalUsbEnabled (1),
+		globalSwitchEnabled (2),
+		displaySwitchEnabled (3),
+		webSwitchEnabled (4)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Array of bits each one an specific feature within the pdu:
+		globalWebEnabled       (0) This bit enables the PDU webpages.
+		globalUsbEnabled        (1) This bit enables the USB menu.
+		globalSwitchEnabled    (2) This bit enables switching in general.
+		displaySwitchEnabled  (3) This bit enables switching through the presentation module. 
+		webSwitchEnabled        (4) This bit enables switching throuhg the web inteface.
+		
+		"
+	::= { pdu 30 }
+
+pduBusAddress  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Address used to access this PDU via the external bus.
+		When MOD-BUS protocol is used the address is valid between 1-247.
+		When AP-BUS protocol is used the address is valid between 1-65535.
+		"
+	::= { pdu 31 }
+
+pduName  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..32))
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Name of the PDU."
+	::= { pdu 32 }
+
+-- The port table. 
+
+nodeTable  OBJECT-TYPE
+	SYNTAX SEQUENCE OF NodeEntry
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"A table of the modules on the PDU.
+		Each entry represents an module unit.
+		            "
+	::= { pdu 33 }
+
+nodeEntry  OBJECT-TYPE
+	SYNTAX 	NodeEntry
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"An port entry in the port table."
+	INDEX { nodeIndex }
+	::= { nodeTable 1 }
+
+NodeEntry ::= SEQUENCE {
+	nodeIndex
+		Unsigned32,
+	nodeType
+		INTEGER,
+	nodeOutlet
+		Unsigned32,
+	nodeAlarmStatus
+		BITS,
+	nodePower
+		Unsigned32,
+	nodeAcurrent
+		Unsigned32,
+	nodePeakCurrent
+		Unsigned32,
+	nodeVoltage
+		Unsigned32,
+	nodeMinVoltage
+		Unsigned32,
+	nodeKvar
+		Unsigned32,
+	nodeFrequency
+		Unsigned32,
+	nodePowerFactor
+		Unsigned32,
+	nodeSwitchOperStatus
+		INTEGER,
+	nodeSwitchAdminStatus
+		INTEGER,
+	nodeCurrHiThresh
+		Unsigned32,
+	nodeCurrLoThresh
+		Unsigned32,
+	nodeVoltHiThresh
+		Unsigned32,
+	nodeVoltLoThresh
+		Unsigned32,
+	nodeAlarmSelector
+		BITS,
+	nodeName
+		DisplayString,
+	nodePhase
+		INTEGER
+}
+
+nodeIndex  OBJECT-TYPE
+	SYNTAX     Unsigned32 (1..30)
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"The node table Index."
+	::= { nodeEntry 1 }
+
+nodeType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		typeUnknown (0),
+		typePresModChar (1),
+		typePresModMono (2),
+		typePresModGraph (3),
+		typePowerMeter (4),
+		typePowerMeterSwitch (5),
+		typeSwitch (6)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Type of the node.
+		TypeUnknown                   (0) Unknown node.
+		TypePresModChar          (1) PM LCD Character Module.
+		TypePresModMono        (2) PM Mono Graphics Module.
+		TypePresModGraph       (3) PM Color Graphics Module.
+		TypePowerMeter              (4) Power meter.
+		TypePowerMeterSwitch (5) Switchable power meter.
+		TypeSwitch                         (6) Switch only.
+		
+		
+		
+		"
+	::= { nodeEntry 2 }
+
+nodeOutlet  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The number associated with the physical outlet of the node. 
+		The special value of 0 indicates that this entry is not associated with a physical port."
+	::= { nodeEntry 3 }
+
+nodeAlarmStatus  OBJECT-TYPE
+	SYNTAX     BITS {
+		trapCurrHi (0),
+		trapCurrLo (1),
+		trapVoltHi (2),
+		trapVoltLo (3),
+		switchOn (4),
+		switchOff (5)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Array of bits each one indicates an alarm activated in the alarm selector value.
+		TrapCurrHi  (0) The current is to high against the high current threshold.
+		TrapCurrLo (1) The current is to low against the low current threshold.
+		TrapVoltHi  (2) The voltage is to high against the high voltage threshold.
+		TrapVoltLo (3) The volage is to low against the low voltage threshold.
+		SwitchOn     (4) The switch is on against the switch on bitfield.
+		SwitchOff     (5) The switch is off against the switch off bitfield.
+		"
+	::= { nodeEntry 4 }
+
+nodePower  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"kiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured node power in Kilo Watt's*Hour."
+	::= { nodeEntry 5 }
+
+nodeAcurrent  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured ac current at the node (in 1/10th Amperes)."
+	::= { nodeEntry 6 }
+
+nodePeakCurrent  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured max current since last reset of the node  (in 1/10th Amperes)."
+	::= { nodeEntry 7 }
+
+nodeVoltage  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Volts"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured voltage on the node."
+	::= { nodeEntry 8 }
+
+nodeMinVoltage  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Volts"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured minimum voltage at the node since last reset."
+	::= { nodeEntry 9 }
+
+nodeKvar  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"KiloWattHours"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The Reactive Power. It is the power that magnetic  equipment 
+		(transformer, motor and relay) needs to produce the magnetizing flux."
+	REFERENCE 
+		"http://standby.iea-4e.org/files/otherfiles/0000/0059/PowerFactorBasics.pdf"
+	::= { nodeEntry 10 }
+
+nodeFrequency  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Hertz"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The frequency of alternating current in Hertz. e.g 50 in Europe or 60 in USA."
+	REFERENCE 
+		"http://en.wikipedia.org/wiki/Hertz"
+	::= { nodeEntry 11 }
+
+nodePowerFactor  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Percent"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The effective power facton (Cosinus Phi) in percents of the node."
+	REFERENCE 
+		"http://en.wikipedia.org/wiki/Power_factor"
+	::= { nodeEntry 12 }
+
+nodeSwitchOperStatus  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		unknown (0),
+		off (1),
+		on (2)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The actual operational Status of the node.
+		Unknown (0) not known status.
+		Off              (1) switch is off.
+		On              (2) switch is on."
+	::= { nodeEntry 13 }
+
+nodeSwitchAdminStatus  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		unknown (0),
+		off (1),
+		on (2)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The desired admin Status of the switch.
+		Unknown (0) not known.
+		Off              (1) switch is off.
+		On              (2) switch is on."
+	::= { nodeEntry 14 }
+
+nodeCurrHiThresh  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The current high threshold (in 1/10th Amperes)."
+	::= { nodeEntry 15 }
+
+nodeCurrLoThresh  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"DeciAmpers"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The current low threshold (in 1/10th Amperes)."
+	::= { nodeEntry 16 }
+
+nodeVoltHiThresh  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Volts"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The voltage high threshold."
+	::= { nodeEntry 17 }
+
+nodeVoltLoThresh  OBJECT-TYPE
+	SYNTAX     Unsigned32
+	UNITS 	"Volts"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The voltage low threshold."
+	::= { nodeEntry 18 }
+
+nodeAlarmSelector  OBJECT-TYPE
+	SYNTAX     BITS {
+		trapCurrHi (0),
+		trapCurrLo (1),
+		trapVoltHi (2),
+		trapVoltLo (3),
+		switchOn (4),
+		switchOff (5)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Array of bits each one controls one alarm.
+		TrapCurrHi  (0) Enable/disable the high current alarm.
+		TrapCurrLo (1) Enable/disable the low current alarm.
+		TrapVoltHi  (2) Enable/disable the high voltage alarm.
+		TrapVoltLo  (3) Enable/disable the low voltage alarm.
+		SwitchOn     (4) Enable/disable the specific switch on alarm.
+		SwitchOff     (5) Enable/disable the specific switch off alarm."
+	::= { nodeEntry 19 }
+
+nodeName  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..14))
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The node name. My be set by manager."
+	::= { nodeEntry 20 }
+
+nodePhase  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		phaseUnknown (0),
+		phaseL1 (1),
+		phaseL2 (2),
+		phaseL3 (3)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The measured phase of the node. 
+		Maybe assigned when not configured in production.
+		PhaseUnknown (0).
+		PhaseL1           (1).
+		PhaseL2           (2).
+		PhaseL3           (3).
+		"
+	::= { nodeEntry 21 }
+
+-- 
+-- The Sensors Table
+-- 
+
+sensorTable  OBJECT-TYPE
+	SYNTAX SEQUENCE OF SensorEntry
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"A table of the Sensors on the PDU.
+		                Each entry represents an an Sensor unit.
+		                "
+	::= { pdu 34 }
+
+sensorEntry  OBJECT-TYPE
+	SYNTAX 	SensorEntry
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"An Sensor Entry in the Sensor table"
+	INDEX { sensorIndex }
+	::= { sensorTable 1 }
+
+SensorEntry ::= SEQUENCE {
+	sensorIndex
+		Unsigned32,
+	sensorType
+		INTEGER,
+	sensorAlarmStatus
+		BITS,
+	sensorValue
+		Integer32,
+	sensorSwitchOperStatus
+		INTEGER,
+	sensorSwitchAdminStatus
+		INTEGER,
+	sensorHiThresh
+		Integer32,
+	sensorLoThresh
+		Integer32,
+	sensorAlarmSelector
+		BITS,
+	sensorName
+		DisplayString
+}
+
+sensorIndex  OBJECT-TYPE
+	SYNTAX     Unsigned32 (1..4)
+	MAX-ACCESS not-accessible
+	STATUS     current
+	DESCRIPTION 
+		"The Sensor table Index."
+	::= { sensorEntry 1 }
+
+sensorType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		other (0),
+		temperature (1),
+		humidity (2),
+		smoke (3),
+		co1 (4),
+		vibration (5),
+		doorStatus (6)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Sensor Typ:
+		Measured values are used according to sensor type.
+		Other (0) unknown sensor type.
+		Temperature (1) .
+		Humidity         (2).
+		Smoke            (3).
+		CO1                  (4).
+		Vibration         (5).
+		Doorstatus     (6)."
+	::= { sensorEntry 2 }
+
+sensorAlarmStatus  OBJECT-TYPE
+	SYNTAX     BITS {
+		trapHi (0),
+		trapLo (1),
+		switchOn (2),
+		switchOff (3),
+		beeperHi (4),
+		beeperLo (5)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"Array of bits each one indicates an alarm activated in the alarm selector value."
+	::= { sensorEntry 3 }
+
+sensorValue  OBJECT-TYPE
+	SYNTAX     Integer32
+	UNITS 	"by type"
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The measured value of the sensor, units are depending on sensor type."
+	::= { sensorEntry 4 }
+
+sensorSwitchOperStatus  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		unknown (0),
+		off (1),
+		on (2)
+	}
+	MAX-ACCESS read-only
+	STATUS     current
+	DESCRIPTION 
+		"The actual operational Status of the switch."
+	::= { sensorEntry 5 }
+
+sensorSwitchAdminStatus  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		unknown (0),
+		off (1),
+		on (2)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The desired admin Status of the switch."
+	::= { sensorEntry 6 }
+
+-- thresholds
+
+sensorHiThresh  OBJECT-TYPE
+	SYNTAX     Integer32
+	UNITS 	"by type"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"High threshold."
+	::= { sensorEntry 7 }
+
+sensorLoThresh  OBJECT-TYPE
+	SYNTAX     Integer32
+	UNITS 	"by type"
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Low threshold."
+	::= { sensorEntry 8 }
+
+sensorAlarmSelector  OBJECT-TYPE
+	SYNTAX     BITS {
+		trapHi (0),
+		trapLo (1),
+		switchOn (2),
+		switchOff (3),
+		beeperHi (4),
+		beeperLo (5)
+	}
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"Array of bits each one controls one alarm.
+		E.g trap, beeper etc."
+	::= { sensorEntry 9 }
+
+sensorName  OBJECT-TYPE
+	SYNTAX     DisplayString (SIZE(1..12))
+	MAX-ACCESS read-write
+	STATUS     current
+	DESCRIPTION 
+		"The sensor name. May be set by the manager."
+	::= { sensorEntry 10 }
+
+-- 
+-- PDU traps
+-- 
+-- Trap to inform the manager about:
+-- 1. voltage
+-- 2. current
+-- 4. sensor (temperature, humidity)
+-- 5. switch
+-- 6. startup
+-- 7. power 
+-- Trap Type enumration to indicate the kind of alarm that sent
+
+trapType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		voltageHiAlarm (0),
+		voltageLoAlarm (1),
+		currentHiAlarm (2),
+		currentLoAlarm (3),
+		tempHiAlarm (4),
+		tempLoAlarm (5),
+		humidityHiAlarm (6),
+		humidityLoAlarm (7),
+		switchOnAlarm (8),
+		switchOffAlarm (9),
+		powerHiAlarm (10),
+		blackBoxColdTrap (11)
+	}
+	MAX-ACCESS accessible-for-notify
+	STATUS     current
+	DESCRIPTION 
+		"An enumation value to indicate an Alarm trap: pduPduAlarm."
+	::= { pduTraps 1 }
+
+pduTableType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		pduNodeTable (0),
+		pduSensorTable (1)
+	}
+	MAX-ACCESS accessible-for-notify
+	STATUS     current
+	DESCRIPTION 
+		"The table type."
+	::= { pduTraps 2 }
+
+-- 
+-- The Index of the table entry for which the trap is made. 
+-- It has the same value of the table index (which is not-accessible 
+-- 
+
+trapTableIndex  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS accessible-for-notify
+	STATUS     current
+	DESCRIPTION 
+		"The index of the table entry for which the trap is issued."
+	::= { pduTraps 3 }
+
+-- The thershold type which the trap is made. 
+-- 
+
+trapThreshHoldType  OBJECT-TYPE
+	SYNTAX     INTEGER {
+		trapThresholdOther (0),
+		trapThresholdHi (1),
+		trapThresholdLo (2)
+	}
+	MAX-ACCESS accessible-for-notify
+	STATUS     current
+	DESCRIPTION 
+		"The threshold type for which the trap is made."
+	::= { pduTraps 4 }
+
+-- The reference threshold value
+-- 
+
+trapThreshHold  OBJECT-TYPE
+	SYNTAX     Integer32
+	MAX-ACCESS accessible-for-notify
+	STATUS     current
+	DESCRIPTION 
+		"The threshold reference value."
+	::= { pduTraps 5 }
+
+-- 
+-- traps definitions
+-- 
+
+pduVoltageAlarm  NOTIFICATION-TYPE
+	OBJECTS { trapType, 
+		trapTableIndex, 
+		trapThreshHoldType, 
+		trapThreshHold }
+	STATUS     current
+	DESCRIPTION 
+		"Voltage alarm."
+	::= { pduTraps 6 }
+
+pduCurrentAlarm  NOTIFICATION-TYPE
+	OBJECTS { trapType, 
+		trapTableIndex, 
+		trapThreshHoldType, 
+		trapThreshHold }
+	STATUS     current
+	DESCRIPTION 
+		"Current alaram."
+	::= { pduTraps 7 }
+
+pduPowerAlarm  NOTIFICATION-TYPE
+	OBJECTS { trapType, 
+		trapTableIndex, 
+		trapThreshHoldType, 
+		trapThreshHold }
+	STATUS     current
+	DESCRIPTION 
+		"Power alarm."
+	::= { pduTraps 8 }
+
+sensorAlarm  NOTIFICATION-TYPE
+	OBJECTS { trapType, 
+		trapTableIndex, 
+		trapThreshHoldType, 
+		trapThreshHold }
+	STATUS     current
+	DESCRIPTION 
+		"Sensor Alarm: 
+		Temperature, Humidity or another type. 
+		The sensorType indicates the type of alarm. 
+		The sensorValue indicate the measured value."
+	::= { pduTraps 9 }
+
+pduSwitchAlarm  NOTIFICATION-TYPE
+	OBJECTS { trapType, 
+		trapTableIndex }
+	STATUS     current
+	DESCRIPTION 
+		"Not supported."
+	::= { pduTraps 10 }
+END
+
+
+-- This MIB was created using NuDesign Team's Visual MIBuilder (Ver 4.9).
+
Index: html/images/os/oec.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: html/images/os/oec.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: includes/polling/os/oec.inc.php
===================================================================
--- includes/polling/os/oec.inc.php	(revision 0)
+++ includes/polling/os/oec.inc.php	(revision 0)
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage poller
+ * @copyright  (C) 2006-2014 Adam Armstrong
+ *
+ */
+
+# APNL-MODULAR-PDU-MIB::apnlModules.pdu.pduSoftwareVersion.0 = STRING: V2.23
+$version = trim(snmp_get($device, "apnlModules.pdu.pduSoftwareVersion.0", "-OQv", "APNL-MODULAR-PDU-MIB"),'" ');
+$serial = trim(snmp_get($device, "apnlModules.pdu.pduSerialNumber.0", "-OQv", "APNL-MODULAR-PDU-MIB"),'" ');
+$hardware = "OEC ".$poll_device['sysDescr'];
+
+// EOF
Index: includes/discovery/sensors/apnl-modular-pdu-mib.inc.php
===================================================================
--- includes/discovery/sensors/apnl-modular-pdu-mib.inc.php	(revision 0)
+++ includes/discovery/sensors/apnl-modular-pdu-mib.inc.php	(revision 0)
@@ -0,0 +1,105 @@
+<?php
+
+/**
+ * Observium
+ *
+ *   This file is part of Observium.
+ *
+ * @package    observium
+ * @subpackage discovery
+ * @copyright  (C) 2006-2014 Adam Armstrong
+ *
+ */
+
+// APNL-MODULAR-PDU-MIB
+
+echo(" APNL-MODULAR-PDU-MIB ");
+
+// Power
+
+$scale = 1;
+echo("pdu.nodeTable.nodeEntry.nodePower");
+$oids_power = array();
+$oids_power = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodePower", $oids_power, "APNL-MODULAR-PDU-MIB");
+
+if (is_array($oids_power))
+{
+  foreach ($oids_power as $index => $entry)
+  {
+    $pwr_oid = '.1.3.6.1.4.1.29640.4.3.33.1.5.' . $index;
+    $descr = "Node $index";
+    $power = $entry['nodePower'];
+    if (is_numeric($power) && $power > 0) {
+// Disabled due to the fact thats it's Kwh instead of just Watt
+//      discover_sensor($valid['sensor'], 'power', $device, $pwr_oid, $index, 'oec', $descr, $scale, $power * $scale);
+    }
+  }
+}
+
+// Frequency
+
+$scale = 0.1;
+echo("pdu.nodeTable.nodeEntry.nodeFrequency");
+$oids_freq = array();
+$oids_freq = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodeFrequency", $oids_freq, "APNL-MODULAR-PDU-MIB");
+
+if (is_array($oids_freq))
+{
+  foreach ($oids_freq as $index => $entry)
+  {
+    $freq_oid = '.1.3.6.1.4.1.29640.4.3.33.1.11.' . $index;
+    $descr = "Node $index";
+    $frequency = $entry['nodeFrequency'];
+    if (is_numeric($frequency) && $frequency > 0) {
+      discover_sensor($valid['sensor'], 'frequency', $device, $freq_oid, $index, 'oec', $descr, $scale, $frequency * $scale);
+    }
+  }
+}
+
+// Voltage
+
+$scale = 1;
+$oids_volt = array();
+echo("pdu.nodeTable.nodeEntry.nodeVoltage");
+$oids_volt = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodeVoltage", $oids_volt, "APNL-MODULAR-PDU-MIB");
+echo("pdu.nodeTable.nodeEntry.nodeMinVoltage");
+$oids_volt = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodeMinVoltage", $oids_volt, "APNL-MODULAR-PDU-MIB");
+
+if (is_array($oids_volt))
+{
+  foreach ($oids_volt as $index => $entry)
+  {
+    $volt_oid = '.1.3.6.1.4.1.29640.4.3.33.1.8.' . $index;
+    $descr = "Node $index";
+    $voltage = $entry['nodeVoltage'];
+    $limits = array('limit_low' => $entry['nodeMinVoltage']);
+    if (is_numeric($voltage) && $voltage > 0) {
+      discover_sensor($valid['sensor'], 'voltage', $device, $volt_oid, $index, 'oec', $descr, $scale, $voltage * $scale, $limits);
+    }
+  }
+}
+
+// Amperes
+
+$scale = 0.1;
+$oids_curr = array();
+echo("pdu.nodeTable.nodeEntry.nodeAcurrent");
+$oids_curr = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodeAcurrent", $oids_curr, "APNL-MODULAR-PDU-MIB");
+echo("pdu.nodeTable.nodeEntry.nodePeakCurrent");
+$oids_curr = snmpwalk_cache_multi_oid($device, "pdu.nodeTable.nodeEntry.nodePeakCurrent", $oids_curr, "APNL-MODULAR-PDU-MIB");
+
+if (is_array($oids_curr))
+{
+  foreach ($oids_curr as $index => $entry)
+  {
+    $curr_oid = '.1.3.6.1.4.1.29640.4.3.33.1.6.' . $index;
+    $descr = "Node $index";
+    $current = $entry['nodeAcurrent'];
+    $limits = array('limit_high' => $entry['nodePeakCurrent']);
+    if (is_numeric($current) && $current > 0) {
+      discover_sensor($valid['sensor'], 'current', $device, $curr_oid, $index, 'oec', $descr, $scale, $current * $scale, $limits);
+    }
+  }
+}
+
+// EOF
Index: includes/discovery/os/oec.inc.php
===================================================================
--- includes/discovery/os/oec.inc.php	(revision 0)
+++ includes/discovery/os/oec.inc.php	(revision 0)
@@ -0,0 +1,8 @@
+<?php
+
+if (!$os)
+{
+  if (preg_match("/^Modular PDU/", $sysDescr)) { $os = "oec"; }
+}
+
+// EOF
Index: includes/definitions/os.inc.php
===================================================================
--- includes/definitions/os.inc.php	(revision 5360)
+++ includes/definitions/os.inc.php	(working copy)
@@ -1358,6 +1358,14 @@
 $config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.318";
 $config['os'][$os]['mibs'][]            = "PowerNet-MIB";
 
+$os = "oec";
+$config['os'][$os]['text']              = "OEC PDU";
+$config['os'][$os]['type']              = "power";
+$config['os'][$os]['over'][0]['graph']  = "device_uptime";
+$config['os'][$os]['over'][0]['text']   = "Uptime";
+$config['os'][$os]['sysObjectID'][]     = ".1.3.6.1.4.1.29640.1.2.4";
+$config['os'][$os]['mibs'][]            = "APNL-MODULAR-PDU-MIB";
+
 $os = "netbotz";
 $config['os'][$os]['text']              = "APC Netbotz";
 $config['os'][$os]['type']              = "environment";
