OS-SYSLOG-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY, NOTIFICATION-TYPE,
        OBJECT-TYPE, enterprises, Integer32,
        Counter32                            FROM SNMPv2-SMI

        TEXTUAL-CONVENTION, DisplayString,
        TimeStamp, TruthValue                FROM SNMPv2-TC

        MODULE-COMPLIANCE, OBJECT-GROUP,
        NOTIFICATION-GROUP                   FROM SNMPv2-CONF;

osSyslog MODULE-IDENTITY
        LAST-UPDATED    "201407061300Z"		-- July 06, 2014 at 13:00 GMT
        ORGANIZATION 
                        "MRV Communications, Inc."
        CONTACT-INFO 
				"MRV Communication, Inc
				http://www.mrv.com"

        DESCRIPTION
                "The MIB module to describe and store the syslog messages."

        REVISION        "201407061300Z"		-- July 06, 2014 at 13:00 GMT
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { oaOptiSwitch 32 }

--
-- Node definitions
--
	
oaccess OBJECT IDENTIFIER                ::= { enterprises 6926 }
oaOptiSwitch OBJECT IDENTIFIER           ::= { oaccess 2 }


osSyslogNotifications  OBJECT IDENTIFIER ::= { osSyslog 0 }
osSyslogObjects        OBJECT IDENTIFIER ::= { osSyslog 1 }

osLogGen               OBJECT IDENTIFIER ::= { osSyslogObjects 1 }
osLogTables            OBJECT IDENTIFIER ::= { osSyslogObjects 2 }

osSyslogConformance    OBJECT IDENTIFIER ::= { osSyslog 100 }
osLogCompliances       OBJECT IDENTIFIER ::= { osSyslogConformance 1 }
osLogGroups            OBJECT IDENTIFIER ::= { osSyslogConformance 2 }

SyslogSeverity ::= TEXTUAL-CONVENTION
       STATUS  current
       DESCRIPTION
         "The severity of a syslog message.  The enumeration
          values are equal to the values that syslog uses + 1.
          For example, with syslog, emergency=0.

           'emergency' : system is unusable
           'alert'     : action must be taken immediately
           'critical'  : critical conditions
           'error'     : error conditions
           'warning'   : warning conditions
           'notice'    : normal but significant condition
           'informational': informational messages 
           'debug'        : debug-level messages."
       REFERENCE
           "RFC 3164, Section 4.1 - syslog Message Parts"
       SYNTAX  INTEGER {    emergency(1),
                            alert(2),
                            critical(3),
                            error(4),
                            warning(5),
                            notice(6),
                            info(7),
                            debug(8)
                }

osLogHistTableMaxLength OBJECT-TYPE
        SYNTAX     Integer32 (0..500)
        UNITS      "entries"
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
          "The upper limit on the number of entries that the
           osLogHistoryTable may contain.  A value of 0 will
           prevent any history from being retained  and  any
           notificatiobs from sending.
           When this table is full, the oldest entry will be
           deleted and a new one will be created.
           In devices before OS-V the default is 300, begining from OS-V* - 0 (i.e. table is disabled)."
        ::= { osLogGen 1 }

osLogNotificationsEnabled OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
          "Indicates whether osLogMsgNotification notifications
           will or will not be sent when a syslog message is
           generated by the device."
        DEFVAL { false }
        ::= { osLogGen 2 }

osLogMaxSeverity   OBJECT-TYPE
        SYNTAX     SyslogSeverity
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
          "Indicates which syslog severity levels will be
           processed.  Any syslog message with a severity value
           greater than this value will be ignored by the agent.
           note: severity numeric values increase as their
           severity decreases, e.g. 'error' is more severe than
           'debug'."
        DEFVAL { info }
        ::= { osLogGen 3 }

osLogDataClear     OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
          "Allows to clear all tables and all statistics.
          On GET/GETNEXT requests always return 'false'."
        DEFVAL { false }
        ::= { osLogGen 4 }

osLogNotificationsSent OBJECT-TYPE
        SYNTAX     Counter32
        UNITS      "notifications"
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The number of osLogMsgNotification notifications that
           have been sent."
        ::= { osLogGen 7 }

osLogMsgIgnored    OBJECT-TYPE
        SYNTAX     Counter32
        UNITS      "messages"
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The number of syslog messages which were ignored.  A
           message will be ignored if it has a severity value
           greater than osLogMaxSeverity."
        ::= { osLogGen 8 }

osLogHistoryTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF OsLogHistoryEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "A table of syslog messages generated by this device."
        ::= { osLogTables 3 }

osLogHistoryEntry OBJECT-TYPE
        SYNTAX     OsLogHistoryEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "Contains an entry of the osLogHistoryTable."
        INDEX   { osLogHistIndex }
        ::= { osLogHistoryTable 1 }

OsLogHistoryEntry ::=
    SEQUENCE {
        osLogHistIndex     Integer32,
        osLogHistFacility  DisplayString,
        osLogHistSeverity  SyslogSeverity,
        osLogHistMessage   DisplayString,
        osLogHistUpTime    TimeStamp
    }

osLogHistIndex OBJECT-TYPE
        SYNTAX     Integer32 (1..2147483647)
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "When it reaches the maximum value the agent flushes
          the table and wraps the value back to 1."
        ::= { osLogHistoryEntry 1 }

osLogHistFacility OBJECT-TYPE
        SYNTAX     DisplayString (SIZE (1..20))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "Name of the facility that generated this message.
           For example: 'ethsrv'."
        ::= { osLogHistoryEntry 2 }

osLogHistSeverity OBJECT-TYPE
        SYNTAX     SyslogSeverity
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The severity of the message."
        ::= { osLogHistoryEntry 3 }

osLogHistMessage OBJECT-TYPE
        SYNTAX     DisplayString (SIZE (1..255))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The text of the message.  If the text of the message
           exceeds 255 bytes, the message will be truncated to
           254 bytes and a '*' character will be appended -
           indicating that the message has been truncated."
        ::= { osLogHistoryEntry 5 }

osLogHistUpTime OBJECT-TYPE
        SYNTAX     TimeStamp
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The value of sysUpTime when this message was
           generated."
        ::= { osLogHistoryEntry 6 }

osLogLastSevTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF OsLogLastSevEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "A table of last stored syslog messages by severities."
        ::= { osLogTables 5 }


osLogLastSevEntry OBJECT-TYPE
        SYNTAX     OsLogLastSevEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "Contains an entry of the osLogHistoryTable."
        INDEX   { osLogHistSeverity }
        ::= { osLogLastSevTable 1 }

OsLogLastSevEntry ::=
    SEQUENCE {
        osLogLastSevIndex     Integer32,
        osLogLastSevFacility  DisplayString,
        osLogLastSevMessage   DisplayString,
        osLogLastSevUpTime    TimeStamp
    }

osLogLastSevIndex OBJECT-TYPE
        SYNTAX     Integer32 (1..2147483647)
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
          "Index in osLogHistoryTable."
        ::= { osLogLastSevEntry 1 }

osLogLastSevFacility OBJECT-TYPE
        SYNTAX     DisplayString (SIZE (1..20))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "Name of the facility that generated this message.
           For example: 'VTYSH'."
        ::= { osLogLastSevEntry 2 }

osLogLastSevMessage OBJECT-TYPE
        SYNTAX     DisplayString (SIZE (1..255))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The text of the message.  If the text of the message
           exceeds 255 bytes, the message will be truncated to
           254 bytes and a '*' character will be appended -
           indicating that the message has been truncated."
        ::= { osLogLastSevEntry 5 }

osLogLastSevUpTime OBJECT-TYPE
        SYNTAX     TimeStamp
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
          "The value of sysUpTime when this message was
           generated."
        ::= { osLogLastSevEntry 6 }


-- notifications

osLogMsgAlarm NOTIFICATION-TYPE
        OBJECTS { osLogHistFacility,
                  osLogHistSeverity,
                  osLogHistMessage,
                  osLogHistUpTime
        }
        STATUS     current
        DESCRIPTION
          "When the device generates a syslog message, it sends a
           osLogMsgAlarm notification.  The
           sending of these notifications can be enabled/disabled
           via the osLogNotificationsEnabled object."
        ::= { osSyslogNotifications 1 }

-- *******************************************************************
--  Conformance Information 
-- ******************************************************************* 

osLogCompliance MODULE-COMPLIANCE
    STATUS current
    DESCRIPTION
        "The core compliance statement for all the implementations." 

    MODULE -- this module 
        MANDATORY-GROUPS { osSyslogMandatoryGroup,
                           osSyslogNotificationsGroup
                         }

    ::= { osLogCompliances 1 }

-- ...................................................................
-- Conformance Groups 
-- ................................................................... 
 
osSyslogMandatoryGroup  OBJECT-GROUP
    OBJECTS { 
      osLogHistTableMaxLength, osLogNotificationsEnabled,
      osLogMaxSeverity, osLogDataClear,
      osLogNotificationsSent, osLogMsgIgnored,
      osLogHistFacility, osLogHistSeverity, osLogHistMessage, osLogHistUpTime,
      osLogLastSevFacility, osLogLastSevMessage, osLogLastSevUpTime
    }
    STATUS current 
    DESCRIPTION 
        "."
    ::= { osLogGroups 1 }

osSyslogNotificationsGroup NOTIFICATION-GROUP
   NOTIFICATIONS {
                  osLogMsgAlarm
                 }
   STATUS        current
   DESCRIPTION
       "The notification which are required to be supported by
       implementations of this MIB."
   ::= { osLogGroups 2 }


END
