--------------------------------------------------------------------------------
-- APSYSLOG-MIB.txt:  Acme Packet syslog message MIB file
--
-- August 2001, pzhou
--
-- Copyright (c) by Acme Packet, Inc.
-- All rights reserved.
--------------------------------------------------------------------------------

-- This MIB provides a means to gather syslog messages generated
-- Acme Packet Session Router and Media Router
-- 
-- syslog is the system logger objects that is used to send a log message 
-- to the System Manager component. 
--
-- All syslog messages have the following attributes:
--	Process-name  (where the message came from),
--	Log-Level, Log-Type, Timestamp, Content
--

APSYSLOG-MIB  DEFINITIONS ::= BEGIN

IMPORTS
	MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
	Integer32, Counter32
				FROM SNMPv2-SMI
	TEXTUAL-CONVENTION, DisplayString, TimeStamp,
	TruthValue
				FROM SNMPv2-TC
       	MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
				FROM SNMPv2-CONF
	acmepacketMgmt		FROM ACMEPACKET-SMI;
     
apSyslogModule	 MODULE-IDENTITY
               LAST-UPDATED "201207160000Z"
               ORGANIZATION "Acme Packet, Inc"
               CONTACT-INFO
			  "       Customer Service
                        Postal: Acme Packet, Inc
                                100 Crosby Drive
                                Bedford, MA 01730
                                US
                        Tel:    1-781-328-4400
                        E-mail: support@acmepacket.com"	
        DESCRIPTION
			" The syslog MIB for Acme Packet"
        REVISION "201207160000Z"	
        DESCRIPTION     "Updated contact info"

		::= { acmepacketMgmt 1 }


apSyslogMIBObjects OBJECT IDENTIFIER ::= { apSyslogModule 1 }


-- Textual Conventions

SyslogLevel ::= TEXTUAL-CONVENTION
	STATUS	current
	DESCRIPTION
	      "The log-level of a syslog message."
	SYNTAX	INTEGER {
			 emergency(1),
			 critical(2),
			 major(3),
			 minor(4),
			 warning(5),
			 notice(6),
			 info(7),
			 trace(8),
			 debug(9),
			 detail(10)
			}


-- Basic syslog objects

apSyslogBasic	OBJECT IDENTIFIER ::= { apSyslogMIBObjects 1 }

apSyslogNotificationsSent OBJECT-TYPE
      SYNTAX          Counter32
      UNITS	     "notifications"
      MAX-ACCESS      read-only
      STATUS	      current
      DESCRIPTION
	       "The number of apSyslogMessageGenerated notifications that
              	have been sent. This number may include notifications 
		that were prevented from being transmitted due to 
		reasons such as resource limitations and/or 
		non-connectivity.  If one is receiving notifications,
		one can periodically poll this object to determine if
		any notifications were missed.  If so, a poll of the
		apSyslogHistoryTable might be appropriate."
	::= { apSyslogBasic 1 }

apSyslogNotificationsEnabled OBJECT-TYPE
        SYNTAX          TruthValue
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
	      	"Indicates whether apSyslogMessageGenerated 
		notifications will or will not be sent when a syslog 
		message is generated by the device. Disabling notifications
		does not prevent syslog messages from being added to the 
		apSyslogHistoryTable."
	DEFVAL { false }
	::= { apSyslogBasic 2 }

apSyslogMaxLevel OBJECT-TYPE
        SYNTAX          SyslogLevel
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
               "Indicates which syslog severity levels will be
		processed. Any syslog message with a Log-level value
		greater than this value will be ignored by the agent.
		note: severity numeric values increase as their
		severity decreases, e.g. major(3) is more severe than
		debug(8)."
	DEFVAL { warning }
	::= { apSyslogBasic 3 }

apSyslogMsgIgnores OBJECT-TYPE
        SYNTAX      Counter32
        UNITS	   "messages"
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
	      	"The number of syslog messages which were ignored, means 
		no need to send apSyslog apSyslogMessageGenerated 
		notification. A message will be ignored if it has a 
		Log-Level value greater than apSyslogMaxSeverity."
	::= { apSyslogBasic 4 }

apSyslogMsgDrops OBJECT-TYPE
        SYNTAX        Counter32
        UNITS	     "messages"
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION
               "The number of syslog messages which could not be
		processed due to lack of system resources.  Most
		likely this will occur at the same time that syslog
		messages are generated to indicate this lack of
		resources.  Increases in this object's value may serve
		as an indication that system resource levels should be
		examined via other mib objects.  A message that is
		dropped will not appear in the history table and
		no notification will be sent for this message."
	::= { apSyslogBasic 5 }


-- Syslog message history table

apSyslogHistory	OBJECT IDENTIFIER 
	::= { apSyslogMIBObjects 2 }

apSyslogHistTableMaxLength 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
		apSyslogHistoryTable may contain. A value of 0 will
		prevent any history from being retained. When this
		table is full, the oldest entry will be deleted and
		a new one will be created."
        DEFVAL  { 1 }
	::= { apSyslogHistory 1 }

apSyslogHistMsgsFlushed OBJECT-TYPE
        SYNTAX        Counter32
        UNITS	     "messages"
        MAX-ACCESS    read-only
        STATUS        current
        DESCRIPTION
               "The number of entries that have been removed from
		the apSyslogHistoryTable in order to make room for new
		entries.  This object can be utilized to determine
		whether your polling frequency on the history table
		is fast enough and/or the size of your history table
		is large enough such that you are not missing
		messages."
	::= { apSyslogHistory 2 }

apSyslogHistoryTable OBJECT-TYPE
	SYNTAX        SEQUENCE OF ApSyslogHistoryEntry
	MAX-ACCESS    not-accessible
	STATUS        current
	DESCRIPTION
	       "A table of syslog messages generated by this device.
		All 'interesting' syslog messages (i.e. Log-Level <=
		apSyslogMaxLevel) are entered into this table."
	::= { apSyslogHistory 3 }

apSyslogHistoryEntry OBJECT-TYPE
	SYNTAX        ApSyslogHistoryEntry
	MAX-ACCESS    not-accessible
	STATUS        current
	DESCRIPTION
               "A syslog message that was previously generated by this
		device.  Each entry is indexed by a message index."
	INDEX	{ apSyslogHistIndex }
	::= { apSyslogHistoryTable 1 }

ApSyslogHistoryEntry ::=
    SEQUENCE {
	apSyslogHistIndex		
		Integer32,
	apSyslogHistFrom
		DisplayString,
	apSyslogHistLevel
		SyslogLevel,
	apSyslogHistType
		DisplayString,
	apSyslogHistContent
		DisplayString,
	apSyslogHistTimestamp
		TimeStamp
    }

apSyslogHistIndex OBJECT-TYPE
        SYNTAX               Integer32 (1..2147483647)
        MAX-ACCESS           read-only 
        STATUS               current
        DESCRIPTION
	       "A monotonically increasing integer for the sole
		purpose of indexing messages.  When it reaches the
		maximum value the agent wraps the value back to 1."
	::= { apSyslogHistoryEntry 1 }

apSyslogHistFrom OBJECT-TYPE
        SYNTAX          DisplayString (SIZE (1..20))
        MAX-ACCESS      read-only
        STATUS          current
        DESCRIPTION
	       "The process name and host of the sending client.
		For example: 'anyclient@sr.acme.com'."
	::= { apSyslogHistoryEntry 2 }

apSyslogHistLevel OBJECT-TYPE
        SYNTAX          SyslogLevel
        MAX-ACCESS      read-only
        STATUS          current
        DESCRIPTION
	       "The Log-Level of the message."
	::= { apSyslogHistoryEntry 3 }

apSyslogHistType OBJECT-TYPE
        SYNTAX          DisplayString (SIZE (1..30))
        MAX-ACCESS      read-only
        STATUS          current
        DESCRIPTION
	      "A textual identification for the Log-Type, which 
 	       categorizes the log message."
	::= { apSyslogHistoryEntry 4 }

apSyslogHistContent 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
		255 bytes. "
	::= { apSyslogHistoryEntry 5 }

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


-- notifications

apSyslogMIBNotificationPrefix OBJECT IDENTIFIER ::= { apSyslogModule 2 }
apSyslogMIBNotifications OBJECT IDENTIFIER 
				::= { apSyslogMIBNotificationPrefix 0 }

apSyslogMessageGenerated NOTIFICATION-TYPE
	OBJECTS  { apSyslogHistFrom,
		   apSyslogHistLevel,
		   apSyslogHistType,
	           apSyslogHistContent,
		   apSyslogHistTimestamp
		  }
	STATUS	   current
	DESCRIPTION
	       "When a syslog message is generated by the device a
		apSyslogMessageGenerated notification is sent.  The
		sending of these notifications can be enabled/disabled
		via the apSyslogNotificationsEnabled object."
	::= { apSyslogMIBNotifications 1 }

-- conformance information

apSyslogMIBConformance OBJECT IDENTIFIER ::= { apSyslogModule 3 }
apSyslogMIBCompliances OBJECT IDENTIFIER ::= { apSyslogMIBConformance 1 }
apSyslogMIBGroups      OBJECT IDENTIFIER ::= { apSyslogMIBConformance 2 }


-- compliance statements

-- units of conformance

apSyslogGroup OBJECT-GROUP
      OBJECTS {
		apSyslogNotificationsSent,
		apSyslogNotificationsEnabled,
		apSyslogMaxLevel,
		apSyslogMsgIgnores,
		apSyslogMsgDrops,
		apSyslogHistTableMaxLength,
		apSyslogHistMsgsFlushed,
		apSyslogHistIndex,
		apSyslogHistFrom,
		apSyslogHistLevel,
		apSyslogHistType,
		apSyslogHistContent,
		apSyslogHistTimestamp
	         }
      STATUS	current
      DESCRIPTION
	"A collection of objects providing the syslog MIB capability."
      ::= { apSyslogMIBGroups 1 }

apSyslogNotificationsGroup NOTIFICATION-GROUP
	NOTIFICATIONS  {
		apSyslogMessageGenerated
		}
	STATUS   current
        DESCRIPTION
                 "A collection of notifications describing license violation."
	::= { apSyslogMIBGroups 2 }
	
END

