-- =================================================================
-- Copyright (C) 2002 by  HUAWEI TECHNOLOGIES. All rights reserved.
--
-- Description: the rmon event&log group mib
-- Reference: extracted from RFC1757
-- Version: V1.0
-- History:
--	
-- =================================================================

RMON-MIB DEFINITIONS ::= BEGIN

              IMPORTS
                  Counter                FROM RFC1155-SMI
                  TimeTicks              FROM RFC1155-SMI
                  DisplayString          FROM RFC1213-MIB
                  mib-2                  FROM RFC1213-MIB
                  OBJECT-TYPE            FROM RFC-1212
                  TRAP-TYPE              FROM RFC-1215;

          --  Remote Network Monitoring MIB

              rmon    OBJECT IDENTIFIER ::= { mib-2 16 }


              -- textual conventions

              OwnerString ::= DisplayString
              -- This data type is used to model an administratively
              -- assigned name of the owner of a resource. This
              -- information is taken from the NVT ASCII character
              -- set.  It is suggested that this name contain one or
              -- more of the following: IP address, management station
              -- name, network manager's name, location, or phone
              -- number.
              -- In some cases the agent itself will be the owner of
              -- an entry.  In these cases, this string shall be set
              -- to a string starting with 'monitor'.
              --
              -- SNMP access control is articulated entirely in terms
              -- of the contents of MIB views; access to a particular
              -- SNMP object instance depends only upon its presence
              -- or absence in a particular MIB view and never upon
              -- its value or the value of related object instances.
              -- Thus, objects of this type afford resolution of
              -- resource contention only among cooperating managers;
              -- they realize no access control function with respect
              -- to uncooperative parties.
              --
              -- By convention, objects with this syntax are declared as
              -- having
              --
              --      SIZE (0..127)

              EntryStatus ::= INTEGER
                         { valid(1),
                           createRequest(2),
                           underCreation(3),
                           invalid(4)
                         }
              -- The status of a table entry.
              --
              -- Setting this object to the value invalid(4) has the
              -- effect of invalidating the corresponding entry.
              -- That is, it effectively disassociates the mapping
              -- identified with said entry.
              -- It is an implementation-specific matter as to whether
              -- the agent removes an invalidated entry from the table.
              -- Accordingly, management stations must be prepared to
              -- receive tabular information from agents that
              -- corresponds to entries currently not in use.  Proper
              -- interpretation of such entries requires examination
              -- of the relevant EntryStatus object.
              --
              -- An existing instance of this object cannot be set to
              -- createRequest(2).  This object may only be set to
              -- createRequest(2) when this instance is created.  When
              -- this object is created, the agent may wish to create
              -- supplemental object instances with default values
              -- to complete a conceptual row in this table.  Because
              -- the creation of these default objects is entirely at
              -- the option of the agent, the manager must not assume
              -- that any will be created, but may make use of any that
              -- are created. Immediately after completing the create
              -- operation, the agent must set this object to
              -- underCreation(3).
              --
              -- When in the underCreation(3) state, an entry is
              -- allowed to exist in a possibly incomplete, possibly
              -- inconsistent state, usually to allow it to be
              -- modified in mutiple PDUs.  When in this state, an
              -- entry is not fully active.  Entries shall exist in
              -- the underCreation(3) state until the management
              -- station is finished configuring the entry and sets
              -- this object to valid(1) or aborts, setting this
              -- object to invalid(4).  If the agent determines that
              -- an entry has been in the underCreation(3) state for
              -- an abnormally long time, it may decide that the
              -- management station has crashed.  If the agent makes
              -- this decision, it may set this object to invalid(4)
              -- to reclaim the entry.  A prudent agent will
              -- understand that the management station may need to
              -- wait for human input and will allow for that
              -- possibility in its determination of this abnormally
              -- long period.
              --
              -- An entry in the valid(1) state is fully configured and
              -- consistent and fully represents the configuration or
              -- operation such a row is intended to represent.  For
              -- example, it could be a statistical function that is
              -- configured and active, or a filter that is available
              -- in the list of filters processed by the packet capture
              -- process.
              --
              -- A manager is restricted to changing the state of an
              -- entry in the following ways:
              --
              --                       create   under
              --      To:       valid  Request  Creation  invalid
              -- From:
              -- valid             OK       NO        OK       OK
              -- createRequest    N/A      N/A       N/A      N/A
              -- underCreation     OK       NO        OK       OK
              -- invalid           NO       NO        NO       OK
              -- nonExistent       NO       OK        NO       OK
              --
              -- In the table above, it is not applicable to move the
              -- state from the createRequest state to any other
              -- state because the manager will never find the
              -- variable in that state.  The nonExistent state is
              -- not a value of the enumeration, rather it means that
              -- the entryStatus variable does not exist at all.
              --
              -- An agent may allow an entryStatus variable to change
              -- state in additional ways, so long as the semantics
              -- of the states are followed.  This allowance is made
              -- to ease the implementation of the agent and is made
              -- despite the fact that managers should never
              -- excercise these additional state transitions.


              statistics        OBJECT IDENTIFIER ::= { rmon 1 }
              history           OBJECT IDENTIFIER ::= { rmon 2 }
              alarm             OBJECT IDENTIFIER ::= { rmon 3 }
              hosts             OBJECT IDENTIFIER ::= { rmon 4 }
              hostTopN          OBJECT IDENTIFIER ::= { rmon 5 }
              matrix            OBJECT IDENTIFIER ::= { rmon 6 }
              filter            OBJECT IDENTIFIER ::= { rmon 7 }
              capture           OBJECT IDENTIFIER ::= { rmon 8 }
              event             OBJECT IDENTIFIER ::= { rmon 9 }



          -- The Event Group

          -- Implementation of the Event group is optional.
          --
          -- The Event group controls the generation and notification
          -- of events from this device.  Each entry in the eventTable
          -- describes the parameters of the event that can be
          -- triggered. Each event entry is fired by an associated
          -- condition located elsewhere in the MIB.  An event entry
          -- may also be associated- with a function elsewhere in the
          -- MIB that will be executed when the event is generated.  For
          -- example, a channel may be turned on or off by the firing
          -- of an event.
          --
          -- Each eventEntry may optionally specify that a log entry
          -- be created on its behalf whenever the event occurs.
          -- Each entry may also specify that notification should
          -- occur by way of SNMP trap messages.  In this case, the
          -- community for the trap message is given in the associated
          -- eventCommunity object.  The enterprise and specific trap
          -- fields of the trap are determined by the condition that
          -- triggered the event.  Two traps are defined: risingAlarm
          -- and fallingAlarm.  If the eventTable is triggered by a
          -- condition specified elsewhere, the enterprise and
          -- specific trap fields must be specified for traps
          -- generated for that condition.

          eventTable OBJECT-TYPE
              SYNTAX SEQUENCE OF EventEntry
              ACCESS not-accessible
              STATUS mandatory
              DESCRIPTION
                  "A list of events to be generated."
              ::= { event 1 }

          eventEntry OBJECT-TYPE
              SYNTAX EventEntry
              ACCESS not-accessible
              STATUS mandatory
              DESCRIPTION
                  "A set of parameters that describe an event to be
                  generated when certain conditions are met.  As an
                  example, an instance of the eventLastTimeSent object
                  might be named eventLastTimeSent.6"
              INDEX { eventIndex }
              ::= { eventTable 1 }

          EventEntry ::= SEQUENCE {
              eventIndex          INTEGER (1..65535),
              eventDescription    DisplayString (SIZE (0..127)),
              eventType           INTEGER,
              eventCommunity      OCTET STRING (SIZE (0..127)),
              eventLastTimeSent   TimeTicks,
              eventOwner          OwnerString,
              eventStatus         EntryStatus
          }

          eventIndex OBJECT-TYPE
              SYNTAX INTEGER (1..65535)
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "An index that uniquely identifies an entry in the
                  event table.  Each such entry defines one event that
                  is to be generated when the appropriate conditions
                  occur."
              ::= { eventEntry 1 }

          eventDescription OBJECT-TYPE
              SYNTAX DisplayString (SIZE (0..127))
              ACCESS read-write
              STATUS mandatory
              DESCRIPTION
                  "A comment describing this event entry."
              ::= { eventEntry 2 }

          eventType OBJECT-TYPE
              SYNTAX INTEGER {
                      none(1),
                      log(2),
                      snmp-trap(3),    -- send an SNMP trap
                      log-and-trap(4)
              }
              ACCESS read-write
              STATUS mandatory
              DESCRIPTION
                  "The type of notification that the probe will make
                  about this event.  In the case of log, an entry is
                  made in the log table for each event.  In the case of
                  snmp-trap, an SNMP trap is sent to one or more
                  management stations."
              ::= { eventEntry 3 }

          eventCommunity OBJECT-TYPE
              SYNTAX OCTET STRING (SIZE (0..127))
              ACCESS read-write
              STATUS mandatory
              DESCRIPTION
                  "If an SNMP trap is to be sent, it will be sent to
                  the SNMP community specified by this octet string.
                  In the future this table will be extended to include
                  the party security mechanism.  This object shall be
                  set to a string of length zero if it is intended that
                  that mechanism be used to specify the destination of
                  the trap."
              ::= { eventEntry 4 }

          eventLastTimeSent OBJECT-TYPE
              SYNTAX TimeTicks
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "The value of sysUpTime at the time this event
                  entry last generated an event.  If this entry has
                  not generated any events, this value will be
                  zero."
              ::= { eventEntry 5 }

          eventOwner OBJECT-TYPE
              SYNTAX OwnerString
              ACCESS read-write
              STATUS mandatory
              DESCRIPTION
                  "The entity that configured this entry and is
                  therefore using the resources assigned to it.

                  If this object contains a string starting with
                  'monitor' and has associated entries in the log
                  table, all connected management stations should
                  retrieve those log entries, as they may have
                  significance to all management stations connected to
                  this device"
              ::= { eventEntry 6 }

          eventStatus OBJECT-TYPE
              SYNTAX EntryStatus
              ACCESS read-write
              STATUS mandatory
              DESCRIPTION
                  "The status of this event entry.

                  If this object is not equal to valid(1), all
                  associated log entries shall be deleted by the
                  agent."
              ::= { eventEntry 7 }

          --
          logTable OBJECT-TYPE
              SYNTAX SEQUENCE OF LogEntry
              ACCESS not-accessible
              STATUS mandatory
              DESCRIPTION
                  "A list of events that have been logged."
              ::= { event 2 }

          logEntry OBJECT-TYPE
              SYNTAX LogEntry
              ACCESS not-accessible
              STATUS mandatory
              DESCRIPTION
                  "A set of data describing an event that has been
                  logged.  For example, an instance of the
                  logDescription object might be named
                  logDescription.6.47"
              INDEX { logEventIndex, logIndex }
              ::= { logTable 1 }

          LogEntry ::= SEQUENCE {
              logEventIndex           INTEGER (1..65535),
              logIndex                INTEGER (1..2147483647),
              logTime                 TimeTicks,
              logDescription          DisplayString (SIZE (0..255))
          }

          logEventIndex OBJECT-TYPE
              SYNTAX INTEGER (1..65535)
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "The event entry that generated this log
                  entry.  The log identified by a particular
                  value of this index is associated with the same
                  eventEntry as identified by the same value
                  of eventIndex."
              ::= { logEntry 1 }

          logIndex OBJECT-TYPE
              SYNTAX INTEGER (1..2147483647)
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "An index that uniquely identifies an entry
                  in the log table amongst those generated by the
                  same eventEntries.  These indexes are
                  assigned beginning with 1 and increase by one
                  with each new log entry.  The association
                  between values of logIndex and logEntries
                  is fixed for the lifetime of each logEntry.
                  The agent may choose to delete the oldest
                  instances of logEntry as required because of
                  lack of memory.  It is an implementation-specific
                  matter as to when this deletion may occur."
              ::= { logEntry 2 }

          logTime OBJECT-TYPE
              SYNTAX TimeTicks
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "The value of sysUpTime when this log entry was
                  created."
              ::= { logEntry 3 }

          logDescription OBJECT-TYPE
              SYNTAX DisplayString (SIZE (0..255))
              ACCESS read-only
              STATUS mandatory
              DESCRIPTION
                  "An implementation dependent description of the
                  event that activated this log entry."
              ::= { logEntry 4 }


          END
          
          