-- =============================================================
-- Copyright (c) 2004-2022 New H3C Tech. Co., Ltd. All rights reserved.
--
-- Description: Traffic Statistics mib
-- Reference:
-- Version: V1.0
-- History:
--   V1.0 2022-03-30
--        Initial Version by chenzhouhui
-- =============================================================

HH3C-TRAFFIC-STAT-MIB DEFINITIONS ::= BEGIN
IMPORTS
        hh3cCommon
    FROM HH3C-OID-MIB
        Integer32, Unsigned32,
        OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE
    FROM SNMPv2-SMI
        CounterBasedGauge64
    FROM HCNUM-TC;

hh3cTrafficStat  MODULE-IDENTITY
        LAST-UPDATED    "202203301911Z"
        ORGANIZATION
            "New H3C Technologies Co., Ltd."
        CONTACT-INFO
            "Platform Team New H3C Technologies Co., Ltd.
            Hai-Dian District Beijing P.R. China
            http://www.h3c.com
            Zip:100085
            "
        DESCRIPTION
             "This MIB provides traffic statistics information."
        REVISION        "202203301911Z"
        DESCRIPTION
                "Initial version of this MIB module,
                 including hh3cTSSlotStatTable, hh3cTSSlotMonStatTable,hh3cTSSlotMonThresholdTable,
                 hh3cTSSlotMonActionTable,hh3cTSSlotMonTrapPrex"
        ::= { hh3cCommon 222 }

hh3cTSGroup OBJECT IDENTIFIER ::= { hh3cTrafficStat 1 }
-- =================================================================
hh3cTSSlotStat OBJECT IDENTIFIER ::= { hh3cTSGroup 1 }

hh3cTSSlotStatTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF Hh3cTSSlotStatEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is about some types of statistics."
    ::= { hh3cTSSlotStat 1 }

hh3cTSSlotStatEntry OBJECT-TYPE
    SYNTAX      Hh3cTSSlotStatEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Entry items."
    INDEX
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex
        }
    ::= { hh3cTSSlotStatTable 1 }

Hh3cTSSlotStatEntry ::= SEQUENCE
    {
        hh3cTSFrameIndex               Integer32,
        hh3cTSSlotIndex                Integer32,
        hh3cTSPacketDropStatistics     CounterBasedGauge64
    }

hh3cTSFrameIndex OBJECT-TYPE
    SYNTAX      Integer32 (0..65535)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "Frame index."
    ::= { hh3cTSSlotStatEntry 1 }

hh3cTSSlotIndex OBJECT-TYPE
    SYNTAX      Integer32 (0..65535)
    MAX-ACCESS  accessible-for-notify
    STATUS      current
    DESCRIPTION
        "Slot index."
    ::= { hh3cTSSlotStatEntry 2 }

hh3cTSPacketDropStatistics OBJECT-TYPE
    SYNTAX      CounterBasedGauge64
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Statistics about the number of dropped packets."
    ::= { hh3cTSSlotStatEntry 3 }

hh3cTSMonGroup OBJECT IDENTIFIER ::= { hh3cTrafficStat 2 }
-- =================================================================
hh3cTSSlotMonStat OBJECT IDENTIFIER ::= { hh3cTSMonGroup 1 }

hh3cTSSlotMonStatTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF Hh3cTSSlotMonStatEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is about some types of statistics."
    ::= { hh3cTSSlotMonStat 1 }

hh3cTSSlotMonStatEntry OBJECT-TYPE
    SYNTAX      Hh3cTSSlotMonStatEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Entry items."
    INDEX
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex
        }
    ::= { hh3cTSSlotMonStatTable 1 }

Hh3cTSSlotMonStatEntry ::= SEQUENCE
    {
        hh3cTSSlotMonPacketDropStatistics  CounterBasedGauge64
    }

hh3cTSSlotMonPacketDropStatistics OBJECT-TYPE
    SYNTAX      CounterBasedGauge64
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Statistics about the number of dropped packets when the interval is reached."
    ::= { hh3cTSSlotMonStatEntry 1 }

-- =================================================================
hh3cTSSlotMonControl  OBJECT IDENTIFIER ::= { hh3cTSMonGroup 2 }

hh3cTSSlotMonThresholdTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF Hh3cTSSlotMonThresholdEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is about the upper threshold, lower threshold, and inspection interval of dropped packets.
         The upper threshold and lower threshold must be bound together. After modification, the table hh3cSlotMonAlarmActionTable
         will be changed."

    ::= { hh3cTSSlotMonControl 1 }

hh3cTSSlotMonThresholdEntry OBJECT-TYPE
    SYNTAX      Hh3cTSSlotMonThresholdEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Entry items."
    INDEX
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex
        }
    ::= { hh3cTSSlotMonThresholdTable 1 }

Hh3cTSSlotMonThresholdEntry ::= SEQUENCE
    {
        hh3cTSSlotMonPacketDropLowThres              Unsigned32,
        hh3cTSSlotMonPacketDropHighThres             Unsigned32,
        hh3cTSSlotMonPacketDropInterval              Unsigned32
    }

hh3cTSSlotMonPacketDropLowThres OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Lower threshold for the number of dropped packets."
    DEFVAL { 100 }
    ::= { hh3cTSSlotMonThresholdEntry 1 }

hh3cTSSlotMonPacketDropHighThres OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Upper threshold for the number of dropped packets."
    DEFVAL { 1000000 }
    ::= { hh3cTSSlotMonThresholdEntry 2 }

hh3cTSSlotMonPacketDropInterval OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Inspection interval for the number of dropped packets."
    DEFVAL { 30 }
    ::= { hh3cTSSlotMonThresholdEntry 3 }

-- =================================================================
hh3cTSSlotMonActionTable   OBJECT-TYPE
    SYNTAX      SEQUENCE OF Hh3cTSSlotMonActionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table can set or get whether to enable the slot shutdown or reboot function."
    ::= { hh3cTSSlotMonControl 2 }

hh3cTSSlotMonActionEntry OBJECT-TYPE
    SYNTAX      Hh3cTSSlotMonActionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Entry items"
    INDEX
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex
        }
    ::= { hh3cTSSlotMonActionTable 1 }

Hh3cTSSlotMonActionEntry ::= SEQUENCE
    {
        hh3cTSSlotMonPacketDropAction        INTEGER
    }

hh3cTSSlotMonPacketDropAction OBJECT-TYPE
    SYNTAX      INTEGER
        {
            noAction(0),
            shutdown(1),
            reboot(2)
        }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Always return noAction(0) when read.
        Return shutdown(1) the slot when the number of dropped packets exceeds the upper threshold.
        Rerurn reboot(2) the slot when the timer times out."
    DEFVAL { 0 }
    ::= { hh3cTSSlotMonActionEntry 1 }

-- =================================================================
-- Traps are defined below.

hh3cTSSlotMonTrap OBJECT IDENTIFIER ::= { hh3cTrafficStat 3 }
hh3cTSSlotMonTrapPrex OBJECT IDENTIFIER ::= { hh3cTSSlotMonTrap 0 }
-- All trap definitions should be placed under this object.

hh3cTSSlotMonPacketDropRising NOTIFICATION-TYPE
    OBJECTS
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex,
            hh3cTSSlotMonPacketDropStatistics,
            hh3cTSSlotMonPacketDropLowThres,
            hh3cTSSlotMonPacketDropHighThres,
            hh3cTSSlotMonPacketDropInterval
        }
    STATUS current
    DESCRIPTION
        "The notification is generated when the number of dropped packets exceeds the
         upper threshold."
    ::= { hh3cTSSlotMonTrapPrex 1 }

hh3cTSSlotMonPacketDropResume NOTIFICATION-TYPE
    OBJECTS
        {
            hh3cTSFrameIndex,
            hh3cTSSlotIndex,
            hh3cTSSlotMonPacketDropStatistics,
            hh3cTSSlotMonPacketDropLowThres,
            hh3cTSSlotMonPacketDropHighThres,
            hh3cTSSlotMonPacketDropInterval
        }
    STATUS current
    DESCRIPTION
        "The notification is generated when the number of dropped packets drops from
         above the upper threshold to below the lower threshold."
    ::= { hh3cTSSlotMonTrapPrex 2 }


END

