---------------------------------------------------------------------------
--
-- Title: Systems Management Instrumentation MIB for the CG2400
--
--
-- Description: 
--   This MIB defines MIB objects that make system instrumentation
--   data available to SNMP management applications.
--
-- Version: Initial (2025/09/17)
--   Defines OIDs of the CG2400 BMC firmwares 2.17 and up (SUP 17)
--
-- Kontron copyright 2025
-- All Rights Reserved
---------------------------------------------------------------------------

---------------------------------------------------------------------------
-- Begin MIB
---------------------------------------------------------------------------

CG2400-KONTRON-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Integer32, enterprises
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, TruthValue
        FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
        FROM SNMPv2-CONF
;

kontron MODULE-IDENTITY
    LAST-UPDATED    "202509170000Z"
    ORGANIZATION    "Kontron Canada Inc"
    CONTACT-INFO    "support-na@kontron.com"
    DESCRIPTION
        "SNMP MIBs definition for Kontron CG2400 product.

        Version: Initial (2025/09/17)
        Defines OIDs of the BMC firmwares 2.17 and up (SUP 17)

        Kontron copyright 2025"
    ::= { enterprises 15000 }

--===============================
-- General definitions
--===============================
platformObjects           OBJECT IDENTIFIER ::= { kontron 554 }
platformSensors           OBJECT IDENTIFIER ::= { platformObjects 2 }

Float64 ::= TEXTUAL-CONVENTION
      STATUS       current
      DESCRIPTION  "This type represents a 64-bit (8-octet) IEEE
                    floating-point number in binary interchange format."
      REFERENCE    "IEEE Standard for Floating-Point Arithmetic,
                    Standard 754-2008"
      SYNTAX       Opaque (SIZE(8))

Degrees ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "Degrees Celsius"
    SYNTAX          Integer32

Voltage ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "Volt"
    SYNTAX          Float64

RPMS ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "RPM"
    SYNTAX          Integer32

Power ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "Watt"
    SYNTAX          Integer32

SensNumber ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "IPMI Number"
    SYNTAX          Integer32

SensorState ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION     "Actual state of sensor"
    SYNTAX          INTEGER {
                              absentOrUnknowned(0),
                              normal(1),
                              nonCriticalHigh(2),
                              criticalHigh(3),
                              nonRecoverableHigh(4),
                              nonCriticalLow(5),
                              criticalLow(6),
                              nonRecoverableLow(7)
                            }

--===============================
-- Host Name
--===============================
platformHostName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..64))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Name of the Host."
    ::= { platformObjects 1 }

--===============================
-- Temp sensors table
--===============================
tempSensorsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF TEMPSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of temperature sensors and their values."
    ::= { platformSensors 1 }

tempSensorsEntry OBJECT-TYPE
    SYNTAX      TEMPSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry containing a device and its statistics."
    INDEX       { tempSensorName }
    ::= { tempSensorsTable 1 }

TEMPSensorsEntry ::= SEQUENCE {
    tempSensorName             OCTET STRING,
    tempSensorIpmiNo           SensNumber,
    tempSensorValue            Degrees,
    tempSensorState            SensorState,
    tempSensorWarnLow          Degrees,
    tempSensorWarnHigh         Degrees,
    tempSensorCritLow          Degrees,
    tempSensorCritHigh         Degrees,
    tempSensorUnrecLow         Degrees,
    tempSensorUnrecHigh        Degrees
}

tempSensorName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..32))
    MAX-ACCESS  read-only
        -- smilint show warning if it have other access level
        -- If set read-only it will be shown in snmptable output,
        -- but with undefined '?' values.
    STATUS      current
    DESCRIPTION
        "The name of the temperature sensor."
    ::= { tempSensorsEntry 1 }

tempSensorIpmiNo OBJECT-TYPE
    SYNTAX      SensNumber
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IPMI number of the temperature sensor."
    ::= { tempSensorsEntry 2 }

tempSensorValue OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current temperature from sensor."
    ::= { tempSensorsEntry 3 }

tempSensorState OBJECT-TYPE
    SYNTAX      SensorState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current state of sensor"
    ::= { tempSensorsEntry 4 }

tempSensorWarnLow OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning low value of sensor."
    ::= { tempSensorsEntry 5 }

tempSensorWarnHigh OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning high value of sensor."
    ::= { tempSensorsEntry 6 }

tempSensorCritLow OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical low value of sensor."
    ::= { tempSensorsEntry 7 }

tempSensorCritHigh OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical high value of sensor."
    ::= { tempSensorsEntry 8 }

tempSensorUnrecLow OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable low value of sensor."
    ::= { tempSensorsEntry 9 }

tempSensorUnrecHigh OBJECT-TYPE
    SYNTAX      Degrees
    UNITS       "°C"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable high value of sensor."
    ::= { tempSensorsEntry 10 }

--===============================
-- Voltage Sensors table
--===============================
voltSensorsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF VOLTSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of voltage sensors and their values."
    ::= { platformSensors 2 }

voltSensorsEntry OBJECT-TYPE
    SYNTAX      VOLTSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry containing a device and its statistics."
    INDEX       { voltSensorName }
    ::= { voltSensorsTable 1 }

VOLTSensorsEntry ::= SEQUENCE {
    voltSensorName             OCTET STRING,
    voltSensorIpmiNo           SensNumber,
    voltSensorValue            Voltage,
    voltSensorState            SensorState,
    voltSensorWarnLow          Voltage,
    voltSensorWarnHigh         Voltage,
    voltSensorCritLow          Voltage,
    voltSensorCritHigh         Voltage,
    voltSensorUnrecLow         Voltage,
    voltSensorUnrecHigh        Voltage
}

voltSensorName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..32))
    MAX-ACCESS  read-only
        -- smilint show warning if it have other access level
        -- If set read-only it will be shown in snmptable output,
        -- but with undefined '?' values.
    STATUS      current
    DESCRIPTION
        "The name of the voltage sensor."
    ::= { voltSensorsEntry 1 }

voltSensorIpmiNo OBJECT-TYPE
    SYNTAX      SensNumber
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IPMI number of the voltage sensor."
    ::= { voltSensorsEntry 2 }

voltSensorValue OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current voltage from sensor."
    ::= { voltSensorsEntry 3 }

voltSensorState OBJECT-TYPE
    SYNTAX      SensorState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current state of sensor"
    ::= { voltSensorsEntry 4 }

voltSensorWarnLow OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning low value of sensor."
    ::= { voltSensorsEntry 5 }

voltSensorWarnHigh OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning high value of sensor."
    ::= { voltSensorsEntry 6 }

voltSensorCritLow OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical low value of sensor."
    ::= { voltSensorsEntry 7 }

voltSensorCritHigh OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical high value of sensor."
    ::= { voltSensorsEntry 8 }

voltSensorUnrecLow OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable low value of sensor."
    ::= { voltSensorsEntry 9 }

voltSensorUnrecHigh OBJECT-TYPE
    SYNTAX      Voltage
    UNITS       "V"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable high value of sensor."
    ::= { voltSensorsEntry 10 }

--===============================
-- Power Sensors table
--===============================
pwrSensorsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF PWRSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of Power sensors and their values."
    ::= { platformSensors 3 }

pwrSensorsEntry OBJECT-TYPE
    SYNTAX      PWRSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry containing a device and its statistics."
    INDEX       { pwrSensorName }
    ::= { pwrSensorsTable 1 }

PWRSensorsEntry ::= SEQUENCE {
    pwrSensorName             OCTET STRING,
    pwrSensorIpmiNo           SensNumber,
    pwrSensorValue            Power,
    pwrSensorState            SensorState,
    pwrSensorWarnLow          Power,
    pwrSensorWarnHigh         Power,
    pwrSensorCritLow          Power,
    pwrSensorCritHigh         Power,
    pwrSensorUnrecLow         Power,
    pwrSensorUnrecHigh        Power
}

pwrSensorName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..32))
    MAX-ACCESS  read-only
        -- smilint show warning if it have other access level
        -- If set read-only it will be shown in snmptable output,
        -- but with undefined '?' values.
    STATUS      current
    DESCRIPTION
        "The name of the power sensor."
    ::= { pwrSensorsEntry 1 }

pwrSensorIpmiNo OBJECT-TYPE
    SYNTAX      SensNumber
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IPMI number of the power sensor."
    ::= { pwrSensorsEntry 2 }

pwrSensorValue OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current power from sensor."
    ::= { pwrSensorsEntry 3 }

pwrSensorState OBJECT-TYPE
    SYNTAX      SensorState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current state of sensor"
    ::= { pwrSensorsEntry 4 }

pwrSensorWarnLow OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning low value of sensor."
    ::= { pwrSensorsEntry 5 }

pwrSensorWarnHigh OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning high value of sensor."
    ::= { pwrSensorsEntry 6 }

pwrSensorCritLow OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical low value of sensor."
    ::= { pwrSensorsEntry 7 }

pwrSensorCritHigh OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical high value of sensor."
    ::= { pwrSensorsEntry 8 }

pwrSensorUnrecLow OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable low value of sensor."
    ::= { pwrSensorsEntry 9 }

pwrSensorUnrecHigh OBJECT-TYPE
    SYNTAX      Power
    UNITS       "W"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable high value of sensor."
    ::= { pwrSensorsEntry 10 }

--===============================
-- Fan Sensors table
--===============================
fanSensorsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FANSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of Fan sensors and their values."
    ::= { platformSensors 4 }

fanSensorsEntry OBJECT-TYPE
    SYNTAX      FANSensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry containing a device and its statistics."
    INDEX       { fanSensorName }
    ::= { fanSensorsTable 1 }

FANSensorsEntry ::= SEQUENCE {
    fanSensorName             OCTET STRING,
    fanSensorIpmiNo           SensNumber,
    fanSensorValue            RPMS,
    fanSensorState            SensorState,
    fanSensorWarnLow          RPMS,
    fanSensorWarnHigh         RPMS,
    fanSensorCritLow          RPMS,
    fanSensorCritHigh         RPMS,
    fanSensorUnrecLow         RPMS,
    fanSensorUnrecHigh        RPMS
}

fanSensorName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..32))
    MAX-ACCESS  read-only
        -- smilint show warning if it have other access level
        -- If set read-only it will be shown in snmptable output,
        -- but with undefined '?' values.
    STATUS      current
    DESCRIPTION
        "The name of the fan sensor."
    ::= { fanSensorsEntry 1 }

fanSensorIpmiNo OBJECT-TYPE
    SYNTAX      SensNumber
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IPMI number of the fan sensor."
    ::= { fanSensorsEntry 2 }

fanSensorValue OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current fan from sensor."
    ::= { fanSensorsEntry 3 }

fanSensorState OBJECT-TYPE
    SYNTAX      SensorState
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Current state of sensor"
    ::= { fanSensorsEntry 4 }

fanSensorWarnLow OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning low value of sensor."
    ::= { fanSensorsEntry 5 }

fanSensorWarnHigh OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The warning high value of sensor."
    ::= { fanSensorsEntry 6 }

fanSensorCritLow OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical low value of sensor."
    ::= { fanSensorsEntry 7 }

fanSensorCritHigh OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The critical high value of sensor."
    ::= { fanSensorsEntry 8 }

fanSensorUnrecLow OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable low value of sensor."
    ::= { fanSensorsEntry 9 }

fanSensorUnrecHigh OBJECT-TYPE
    SYNTAX      RPMS
    UNITS       "RPM"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The unrecoverable high value of sensor."
    ::= { fanSensorsEntry 10 }

--===============================
-- Discrete Sensors table
--===============================
discreteSensorsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF DISCRETESensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Table of Discrete sensors and their values."
    ::= { platformSensors 5 }

discreteSensorsEntry OBJECT-TYPE
    SYNTAX      DISCRETESensorsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "An entry containing a device and its statistics."
    INDEX       { discreteSensorName }
    ::= { discreteSensorsTable 1 }

DISCRETESensorsEntry ::= SEQUENCE {
    discreteSensorName             OCTET STRING,
    discreteSensorIpmiNo           SensNumber,
    discreteSensorValue            Discrete
}

discreteSensorName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..32))
    MAX-ACCESS  read-only
        -- smilint show warning if it have other access level
        -- If set read-only it will be shown in snmptable output,
        -- but with undefined '?' values.
    STATUS      current
    DESCRIPTION
        "The name of the Discrete sensor."
    ::= { discreteSensorsEntry 1 }

discreteSensorIpmiNo OBJECT-TYPE
    SYNTAX      SensNumber
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IPMI number of the Discrete sensor."
    ::= { discreteSensorsEntry 2 }

discreteSensorValue OBJECT-TYPE
    SYNTAX      Discrete
    UNITS       "Flags(IPMI offsets)"
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current Discrete from sensor."
    ::= { discreteSensorsEntry 3 }

--===============================
-- Platform Name
--===============================
platformName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..64))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "The server name"
    ::= { platformObjects 3 }

END