-- *****************************************************************
-- MY-LOG-MIB.mib:  My Log MIB file
--
-- $Copyright$
-- 
-- *****************************************************************
--

DES7200-LOG-MIB DEFINITIONS ::= BEGIN

IMPORTS
        MODULE-IDENTITY,
        OBJECT-TYPE,
        NOTIFICATION-TYPE,
        Integer32,
        Counter32,
        IpAddress
                FROM SNMPv2-SMI
        TruthValue,
        DisplayString,
        RowStatus,
        DateAndTime,
        TimeStamp
                FROM SNMPv2-TC
        EnabledStatus 
                FROM P-BRIDGE-MIB
        ConfigStatus,
        IfIndex,
        MyTrapType
                FROM DES7200-TC
        MODULE-COMPLIANCE,
        OBJECT-GROUP,
        NOTIFICATION-GROUP
                FROM SNMPv2-CONF
        myMgmt
                FROM DES7200-SMI;

myLogMIB MODULE-IDENTITY
        LAST-UPDATED "200203200000Z"
        ORGANIZATION "$Company$"
        CONTACT-INFO
                " 
                Tel: $Telephone$ 

                E-mail: $E-mail$"
        DESCRIPTION
                "This module defines my event mibs."
        REVISION      "200203200000Z"
        DESCRIPTION
                "Initial version of this MIB module."
        ::= { myMgmt 4}

myLogMIBObjects OBJECT IDENTIFIER ::= { myLogMIB 1 }

       
LogSeverity ::= TEXTUAL-CONVENTION
	STATUS	current
	DESCRIPTION
	       "The severity of a log message."
	SYNTAX	INTEGER {
			emergency(0),
			alert(1),
			critical(2),
			error(3),
			warning(4),
			notice(5),
			info(6),
			debug(7)
		}      
LogTimeStamp ::= TEXTUAL-CONVENTION
	STATUS	current
	DESCRIPTION
	       "The timestamp of a log message."
	SYNTAX	INTEGER {
			disabled(1),
			datetime(2),
			uptime(3)
	
		}     

LogSyslogFacility ::= TEXTUAL-CONVENTION
	STATUS	current
	DESCRIPTION
	       "The facility of a syslog message."
	SYNTAX	INTEGER {
                        kernel(0),                            
			user(1),                        
			mail(2),                              
			system(3),     
			security(4),                                                
			syslogd(5),    
			lineprinter(6),                      
			network(7),                      
			uUCP(8),                              
			clockdaemon(9),                     
			authorization(10),  
			fTP(11),                                  
			nTP(12),                               
			logaudit(13),                         
			logalert(14),                       
			clockdaemon2(15),                   
			localuse0(16),                      
			localuse1(17),                     
			localuse2(18),                       
			localuse3(19),                       
			localuse4(20),                       
			localuse5(21),                       
			localuse6(22),                       
			localuse7(23)                     
		}   		
--
-- Log 
--

myLogGlobalStatus OBJECT-TYPE
        SYNTAX          EnabledStatus
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates whether the system logging feature is currently 
           running in the device."
	DEFVAL { enabled }
	::= { myLogMIBObjects 1 }

myLogSendConsoleStatus OBJECT-TYPE
        SYNTAX          EnabledStatus
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates whether the system log will be sent to console(out-band)."
        DEFVAL { enabled }
	::= { myLogMIBObjects 2 }	
	
myLogSendConsoleMaxSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which severity levels system log will be
      	  sent to console(out-band).  Any system log message with a severity value
      	  greater than this value will be ignored by the agent.Setting this value
      	  to 0 will prevent any log to send to console."
      	DEFVAL { debug }
	::= { myLogMIBObjects 3 }	

myLogSendMonitorStatus OBJECT-TYPE
        SYNTAX          EnabledStatus
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates whether the system log will be sent to monitor(telnet)."
        DEFVAL { disabled }
	::= { myLogMIBObjects 4 }
	
myLogSendMonitorMaxSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which severity levels system log will be
      	  sendt to monitor(telnet).  Any system log message with a severity value
      	  greater than this value will be ignored by the agent.Setting this value
      	  to 0 will prevent any log to send to telnet."
        DEFVAL { debug }
	::= { myLogMIBObjects 5 }
  
myLogSaveFileName OBJECT-TYPE
        SYNTAX DisplayString
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "Setting this value to a non-null string will save all entries of event log 
             table into file which name is assigned by this value. Setting this value 
             to a null string will not save log to file."
        DEFVAL { ""}
        ::= { myLogMIBObjects 6 }
			
myLogFileMaxSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which severity levels system log will be
      	  sent to monitor(telnet).  Any system log message with a severity value
      	  greater than this value will be ignored by the agent.Setting this value
      	  to 0 will prevent any log to send to telnet."
        DEFVAL { notice } 	  
	::= { myLogMIBObjects 7 }	
	
myLogFileMaxSize OBJECT-TYPE
        SYNTAX Integer32(4096..2000000)
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The size of log file in units of byte."
        DEFVAL { 4096 }    
   ::= { myLogMIBObjects 8 }      	
   
myLogSendBufferStatus OBJECT-TYPE
        SYNTAX          EnabledStatus
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates whether the system log will be sent to buffer for retaining."
        DEFVAL { enabled }
	::= { myLogMIBObjects 9 }
	
myLogSendBufferMaxSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which severity levels system log will be
      	  sendt to monitor(telnet).  Any system log message with a severity value
      	  greater than this value will be ignored by the agent.Setting this value
      	  to 0 will prevent any log to send to telnet."
        DEFVAL { debug }
	::= { myLogMIBObjects 10 }

myLogClearBuffer OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "It will clear logging buffer to set this object to any value but 0,
             Set its value to 0 will cause no action of agent,  
             when query always return value 0."
   ::= { myLogMIBObjects 11 }      
	
--
-- log history table
--            
myLogHisRecordMaxNum OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
               "The upper limit on the number of entries that the
                log history table may contain."
        ::= { myLogMIBObjects 12 }

myLogHisTable OBJECT-TYPE
        SYNTAX SEQUENCE OF MyLogHisEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "A list of log history record , and when the table is full 
             the oldest entry will be deleted and a new one will be created."
    ::= { myLogMIBObjects 13 }
    
myLogHisEntry OBJECT-TYPE
        SYNTAX MyLogHisEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "Entry obtains history information of each logging."
        INDEX { myLogHisIndex }
        ::= { myLogHisTable 1 }
        
MyLogHisEntry ::=
        SEQUENCE {
           myLogHisIndex Integer32,
           myLogHisSeverity LogSeverity,
           myLogHisMsgName DisplayString ,
           myLogHisDescription DisplayString,
           myLogHisTime DateAndTime,
           myLogHisStamps TimeStamp
        }
    
myLogHisIndex OBJECT-TYPE
        SYNTAX Integer32
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "A unique vlaue for each log Entry."
        ::= { myLogHisEntry 1 }
        
myLogHisSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-only
        STATUS          current
        DESCRIPTION
	       "The severity of the log message."
	::= { myLogHisEntry 2 }
    
myLogHisMsgName OBJECT-TYPE
        SYNTAX          DisplayString (SIZE (1..30))
        MAX-ACCESS      read-only
        STATUS          current
        DESCRIPTION
	       "A textual identification for the log message type.  A 
		     facility name  uniquely identifies a message type."
	::= { myLogHisEntry 3 }
        
myLogHisDescription OBJECT-TYPE
        SYNTAX DisplayString (SIZE(1..80))
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Text description for this log message."
        ::= { myLogHisEntry 4 }        

myLogHisTime OBJECT-TYPE
        SYNTAX DateAndTime
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "Date and time for this message was generated. "
        ::= { myLogHisEntry 5 }

myLogHisStamps OBJECT-TYPE
        SYNTAX TimeStamp
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "logʱ(0.01Sı)."
        ::= { myLogHisEntry 6 }   
        
myLogSequenceGlobalStatus OBJECT-TYPE
	SYNTAX          EnabledStatus
	MAX-ACCESS      read-write
	STATUS          current
	DESCRIPTION
	       "Indicates whether the  system log sequence  feature is currently 
	   running in the device."
	DEFVAL { disabled }
	::= { myLogMIBObjects 14 }    
	      
myLogTimeStampGlobalStatus OBJECT-TYPE
	SYNTAX          LogTimeStamp
	MAX-ACCESS      read-write
	STATUS          current
	DESCRIPTION
	       "Indicates whether the  system log timestamp date feature is currently 
	   running in the device."
	DEFVAL { datetime }
	::= { myLogMIBObjects 15}  	
	
	
myLogSyslogRelayGlobalStatus OBJECT-TYPE
	SYNTAX          EnabledStatus
	MAX-ACCESS      read-write
	STATUS          current
	DESCRIPTION
	       "Indicates whether the  syslog relay feature is currently 
	   running in the device."
	DEFVAL { disabled }
	::= { myLogMIBObjects 16 }  


myLogSyslogFacility OBJECT-TYPE
        SYNTAX          LogSyslogFacility
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which Facility value syslog will be
      	  sent to syslog server. "
        DEFVAL { localuse7} 	  
	::= { myLogMIBObjects 17 }	
	
myLogSyslogSeverity OBJECT-TYPE
        SYNTAX          LogSeverity
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	       "Indicates which severity levels syslog will be
      	  sent to syslog server.  Any syslog message with a severity value
      	  greater than this value will be ignored."
      	DEFVAL { debug }
	::= { myLogMIBObjects 18 }
	
myLogSyslogServerTable OBJECT-TYPE
        SYNTAX SEQUENCE OF MyLogSyslogServerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION 
            "A list of the syslog server ."
        ::= { myLogMIBObjects 19 }	
        

myLogSyslogServerEntry OBJECT-TYPE
        SYNTAX MyLogSyslogServerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
            "Entry obtains information of each syslog server ."
        INDEX { myLogSyslogServerIpAddr }
        ::= { myLogSyslogServerTable 1 }        

MyLogSyslogServerEntry ::=
        SEQUENCE {
           myLogSyslogServerIpAddr IpAddress,
           myLogSyslogServerIpStatus ConfigStatus
        }   

myLogSyslogServerIpAddr OBJECT-TYPE
        SYNTAX IpAddress
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
            "A ip address of a syslog server."
        ::= { myLogSyslogServerEntry 1 }     
                                 
myLogSyslogServerIpStatus OBJECT-TYPE
        SYNTAX ConfigStatus
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "entry status. Setting this value to 'invalid' will remove this server"
        ::= { myLogSyslogServerEntry 2 }
        
myLogSyslogSendSrcIfindex OBJECT-TYPE
        SYNTAX IfIndex
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The source ifindex which syslog send ."
        ::= { myLogMIBObjects 20 }  
   
myLogSyslogSendSrcIp OBJECT-TYPE
        SYNTAX IpAddress
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
            "The source Ip which syslog send ."
        ::= { myLogMIBObjects 21}        
        

	  
        
myLogMIBConformance OBJECT IDENTIFIER ::= { myLogMIB 4 }
myLogMIBCompliances OBJECT IDENTIFIER ::= { myLogMIBConformance 1 }
myLogMIBGroups      OBJECT IDENTIFIER ::= { myLogMIBConformance 2 }


-- compliance statements

myLogMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the My Log MIB"
        MODULE  -- this module
                MANDATORY-GROUPS { myLogMIBGroup
                 }
		

		GROUP myLogHisStampsMIBGroup
		DESCRIPTION  
                     "ϵͳûRTCʱ."   


        ::= { myLogMIBCompliances 1 }
                
-- units of conformance
       
myLogMIBGroup OBJECT-GROUP
        OBJECTS {
           myLogGlobalStatus,
           myLogSendConsoleStatus,
           myLogSendConsoleMaxSeverity,
           myLogSendMonitorStatus,
           myLogSendMonitorMaxSeverity, 
           myLogSaveFileName,
           myLogFileMaxSeverity,
           myLogFileMaxSize,
           myLogSendBufferStatus,
           myLogSendBufferMaxSeverity,
           myLogClearBuffer,
           myLogHisRecordMaxNum,
           myLogHisIndex,
           myLogHisSeverity,
           myLogHisMsgName,
           myLogHisDescription,
           myLogHisTime,
           myLogSequenceGlobalStatus,
           myLogTimeStampGlobalStatus,
           myLogSyslogRelayGlobalStatus,
           myLogSyslogFacility,
           myLogSyslogSeverity,
           myLogSyslogServerIpAddr,
           myLogSyslogServerIpStatus,
           myLogSyslogSendSrcIfindex,
           myLogSyslogSendSrcIp           
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing logging to a
                 My agent."
        ::= { myLogMIBGroups 1 }                 
                
myLogHisStampsMIBGroup OBJECT-GROUP
        OBJECTS { 
           myLogHisStamps
        }
        STATUS  current
        DESCRIPTION
                "־ʱļ."
        ::= { myLogMIBGroups 2 }                 
       
END                  
  
