netdisco / netdisco-mibs

82 stars 88 forks source link

HWg-STE MIB #186

Closed rico666 closed 2 years ago

rico666 commented 2 years ago

https://www.hw-group.com/device/hwg-ste

Basically the single device here recognized by netdisco, but only rudimentary

vendor: enterprises.21796 model: enterprises.21796.4.1

Here's the OID description:

HWg-STE SNMP OID description
-------------------------------------------------------------------------

System Values:
----------------------------------------------------
.1.3.6.1.2.1.1.1.0             System Description   (string)
.1.3.6.1.2.1.1.2.0             System ObjectID      (objid)
.1.3.6.1.2.1.1.3.0             System UpTime        (timeticks)
.1.3.6.1.2.1.1.4.0             System Contact       (string)
.1.3.6.1.2.1.1.5.0             System Name          (string)
.1.3.6.1.2.1.1.6.0             System Location      (string)
.1.3.6.1.2.1.1.7.0             System Services      (integer)
.1.3.6.1.4.1.21796.4.1.70.1.0  System MAC address   (string)

Sensors Values, (n = 1..x)
----------------------------------------------------
.1.3.6.1.4.1.21796.4.1.3.1.1.n Sensor Index         (integer,  NUM  (1..x))
.1.3.6.1.4.1.21796.4.1.3.1.2.n Sensor Name          (string,   SIZE (0..16))
.1.3.6.1.4.1.21796.4.1.3.1.3.n Sensor State         (integer,  0=Invalid, 1=Normal, 2=OutOfRangeLo, 3=OutOfRangeHi, 4=AlarmLo, 5=AlarmHi)
.1.3.6.1.4.1.21796.4.1.3.1.4.n Sensor String Value  (string,   SIZE (0..10))
.1.3.6.1.4.1.21796.4.1.3.1.5.n Sensor Value         (integer,  current value *10)
.1.3.6.1.4.1.21796.4.1.3.1.6.n Sensor SN            (string,   SIZE (0..16))
.1.3.6.1.4.1.21796.4.1.3.1.7.n Sensor Unit          (integer,  0=unknown, 1=°C, 2=°F, 3=°K, 4=%)
.1.3.6.1.4.1.21796.4.1.3.1.8.n Sensor ID            (integer,  NUM  (0..x))

Here's the MIB:

--  HWg-STE MIB 1.02
--      History:
--
--      1.00     08.12.2008 Marek Hummel  - Created
--      1.01     03.08.2009 Marek Hummel  - Add SensorID, Change SensorState values
--      1.02     14.05.2010 Marek Hummel  - Fix Syntax
--

STE-MIB DEFINITIONS ::= BEGIN
IMPORTS
    OBJECT-TYPE             FROM RFC-1212
    enterprises             FROM RFC1155-SMI
    DisplayString,sysName   FROM RFC1213-MIB
    TRAP-TYPE               FROM RFC-1215;

--
-- Type Definitions
--
PositiveInteger ::= INTEGER (1..2147483647) -- 0x7FFF FFFF

UnitType ::= INTEGER {
        none (0),
        celsius (1),
        fahrenheit (2),
        kelvin (3),
        percent(4)
    }

SensorState ::= INTEGER {
        invalid (0),
        normal (1),
        outofrangelo (2),
        outofrangehi (3),
        alarmlo (4),
        alarmhi (5)
    }

SensorSN ::= DisplayString (SIZE (0..16))
SensorName ::= DisplayString (SIZE (0..16))
SensorValue ::= INTEGER
SensorID ::= INTEGER
SensorString ::= DisplayString (SIZE (0..10))

--
-- Node Definitions
--

hwgroup     OBJECT IDENTIFIER ::= { enterprises 21796 }
x390        OBJECT IDENTIFIER ::= { hwgroup 4 }
ste         OBJECT IDENTIFIER ::= { x390 1 }

-- Application Info
info        OBJECT IDENTIFIER ::= { ste 70 }

infoAddressMAC OBJECT-TYPE
    SYNTAX  DisplayString (SIZE (0..17))
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "MAC address in text form.
        It is here to distinguish devices in trap messages."
    ::= { info 1 }

-- Table has to be last in a branch to satisfy snmp walk engine implementation
sensTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF SensEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
        "A list of sensor table entries. The number
        of entries corresponds with number of detected sensors."
    ::= { ste 3 }

sensEntry OBJECT-TYPE
    SYNTAX  SensEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
        "An entry containing information applicable to a
        particular sensor."
    INDEX { sensIndex }
    ::= { sensTable 1 }

SensEntry ::= SEQUENCE {
    sensIndex   PositiveInteger,
    sensName    SensorName,
    sensState   SensorState,
    sensString  SensorString,
    sensValue   SensorValue,
    sensSN      SensorSN,
    sensUnit    UnitType,
    sensID      SensorID
}

sensIndex OBJECT-TYPE
    SYNTAX  PositiveInteger
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
        "The sensor index."
    ::= { sensEntry 1 }

sensName OBJECT-TYPE
    SYNTAX  SensorName
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The sensor name."
    ::= { sensEntry 2 }

sensState OBJECT-TYPE
    SYNTAX  SensorState
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The sensor state."
    ::= { sensEntry 3 }

sensString OBJECT-TYPE
    SYNTAX  SensorString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The string representation of sensor value."
    ::= { sensEntry 4 }

sensValue OBJECT-TYPE
    SYNTAX  SensorValue
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The integer (decimal * 10) representation
        of sensor value."
    ::= { sensEntry 5 }

sensSN OBJECT-TYPE
    SYNTAX  SensorSN
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The sensor Serial number."
    ::= { sensEntry 6 }

sensUnit OBJECT-TYPE
    SYNTAX  UnitType
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The sensor unit."
    ::= { sensEntry 7 }

sensID OBJECT-TYPE
    SYNTAX  UnitType
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
        "The sensor ID."
    ::= { sensEntry 8 }

END
ollyg commented 2 years ago

Hi @rico666 many thanks for this, I have now implemented support. If you download the latest netdisco-mibs and also update SNMP::Info (~/bin/localenv cpanm SNMP::Info) then rediscover, it should work properly.