SNMP4J-LOG-MIB DEFINITIONS ::= BEGIN

IMPORTS
        snmp4jAgentModules
                FROM SNMP4J-AGENT-REG
        DateAndTime,
        DisplayString,
        RowStatus,
        StorageType,
        TestAndIncr,
        TruthValue,
        TEXTUAL-CONVENTION
                FROM SNMPv2-TC
        SnmpAdminString
                FROM SNMP-FRAMEWORK-MIB
        MODULE-IDENTITY,
        OBJECT-IDENTITY,
        OBJECT-TYPE,
        Integer32,
        Unsigned32
                FROM SNMPv2-SMI
        OBJECT-GROUP
                FROM SNMPv2-CONF;

snmp4jLogMIB MODULE-IDENTITY
        LAST-UPDATED "200511232358Z"    -- Nov 23, 2005 11:58:00 PM
        ORGANIZATION "SNMP4J.org"
        CONTACT-INFO
                "Frank Fock
                http://www.snmp4j.org
                fock@snmp4j.org"
        DESCRIPTION
                "The SNMP4J-LOG-MIB defines objects for the
                management of the logging system of a
                SNMP4J-Agent enabled system."
        REVISION "200511232358Z"        -- Nov 23, 2005 11:58:00 PM
        DESCRIPTION
                "Initial version."
        -- 1.3.6.1.4.1.4976.10.1.1.1
        ::= { snmp4jAgentModules 1 }


FileName ::= TEXTUAL-CONVENTION
        DISPLAY-HINT "255t"
        STATUS current
        DESCRIPTION
                "A file name in native system representation encoded
                as UTF-8 string."
        SYNTAX OCTET STRING (SIZE (1..512))


LogLevel ::= TEXTUAL-CONVENTION
        STATUS current
        DESCRIPTION
                "Specifies the log levels (possibly) recognized
                by a logging system for SNMP4J."
        SYNTAX INTEGER {
                        notSpecified(0),        -- no level has been specified
                        off(1),
                        all(2),
                        trace(3),
                        debug(4),
                        info(5),
                        warn(6),
                        error(7),
                        fatal(8) }


Snmp4jLoggerIndex ::= TEXTUAL-CONVENTION
        STATUS current
        DESCRIPTION
                "The logger index is a consecutive numbered unsigned
                integer."
        SYNTAX Integer32 (0..2147483647)


-- Scalars and Tables
--

snmp4jLogObjects OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1
        ::= { snmp4jLogMIB 1 }

snmp4jLogSystem OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.1
        ::= { snmp4jLogObjects 1 }

snmp4jLogSysDescr OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
                "A textual description of the logging system used."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.1.1
        ::= { snmp4jLogSystem 1 }


snmp4jLogFactory OBJECT-TYPE
        SYNTAX  SnmpAdminString
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
                "The Java class name of the log factory configured
                for SNMP4J (which should be identical to the log
                factory used by the system/application)."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.1.2
        ::= { snmp4jLogSystem 2 }


snmp4jLogConfig OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2
        ::= { snmp4jLogObjects 2 }

snmp4jLogRootLevel OBJECT-TYPE
        SYNTAX  LogLevel
        MAX-ACCESS read-write
        STATUS current
        DESCRIPTION
                "Defines the log level of the root logger."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.1
        ::= { snmp4jLogConfig 1 }


snmp4jLogLoggerTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF Snmp4jLogLoggerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "The logger table lists all available loggers."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2
        ::= { snmp4jLogConfig 2 }


snmp4jLogLoggerEntry OBJECT-TYPE
        SYNTAX  Snmp4jLogLoggerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "Each entry in the logger list represents a logger
                for which the logging level can be specified."
        INDEX {
                IMPLIED snmp4jLogLoggerName }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1
        ::= { snmp4jLogLoggerTable 1 }


Snmp4jLogLoggerEntry ::= SEQUENCE {

        snmp4jLogLoggerName           SnmpAdminString,
        snmp4jLogLoggerIndex          Snmp4jLoggerIndex,
        snmp4jLogLoggerLevel          LogLevel,
        snmp4jLogLoggerEffectiveLevel LogLevel,
        snmp4jLogLoggerStorageType    StorageType,
        snmp4jLogLoggerRowStatus      RowStatus }


snmp4jLogLoggerName OBJECT-TYPE
        SYNTAX  SnmpAdminString (SIZE (1..127))
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "The name of the logger."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.1
        ::= { snmp4jLogLoggerEntry 1 }


snmp4jLogLoggerLevel OBJECT-TYPE
        SYNTAX  LogLevel
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The log level specifies the logging priority for this
                logger and all dependend loggers."
        DEFVAL { off }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.3
        ::= { snmp4jLogLoggerEntry 3 }


snmp4jLogLoggerEffectiveLevel OBJECT-TYPE
        SYNTAX  LogLevel
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
                "The effective log level is the last level that is different
                from notSpecified(0) on the path to the root logger."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.4
        ::= { snmp4jLogLoggerEntry 4 }


snmp4jLogLoggerStorageType OBJECT-TYPE
        SYNTAX  StorageType
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The storage type for this log level configuration."
        DEFVAL { volatile }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.5
        ::= { snmp4jLogLoggerEntry 5 }


snmp4jLogLoggerRowStatus OBJECT-TYPE
        SYNTAX  RowStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION ""
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.6
        ::= { snmp4jLogLoggerEntry 6 }


snmp4jLogLoggerIndex OBJECT-TYPE
        SYNTAX  Snmp4jLoggerIndex
        MAX-ACCESS read-only
        STATUS current
        DESCRIPTION
                "Reports the system assigned index for this logger."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.2.1.2
        ::= { snmp4jLogLoggerEntry 2 }


snmp4jLogLoggerToHandlerTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF Snmp4jLogLoggerToHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "This table associates loggers with log handlers
                and allows to define a log threshold for the
                association."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.3
        ::= { snmp4jLogConfig 3 }


snmp4jLogLoggerToHandlerEntry OBJECT-TYPE
        SYNTAX  Snmp4jLogLoggerToHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "Each entry associates a handler with a logger."
        INDEX {
                snmp4jLogLoggerIndex,
                snmp4jLogHandlerName }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.3.1
        ::= { snmp4jLogLoggerToHandlerTable 1 }


Snmp4jLogLoggerToHandlerEntry ::= SEQUENCE {

        snmp4jLogLoggerToHandlerThreshold   LogLevel,
        snmp4jLogLoggerToHandlerStorageType StorageType,
        snmp4jLogLoggerToHandlerRowStatus   RowStatus }


snmp4jLogLoggerToHandlerThreshold OBJECT-TYPE
        SYNTAX  LogLevel
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The threshold defines the minimum log level that
                is logged on behalf of the loggers sub-tree."
        DEFVAL { all }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.3.1.1
        ::= { snmp4jLogLoggerToHandlerEntry 1 }


snmp4jLogLoggerToHandlerStorageType OBJECT-TYPE
        SYNTAX  StorageType
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The storage type for this entry."
        DEFVAL { volatile }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.3.1.2
        ::= { snmp4jLogLoggerToHandlerEntry 2 }


snmp4jLogLoggerToHandlerRowStatus OBJECT-TYPE
        SYNTAX  RowStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The RowStatus column for handler associations.

                "
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.3.1.3
        ::= { snmp4jLogLoggerToHandlerEntry 3 }


snmp4jLogHandlerConfig OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5
        ::= { snmp4jLogConfig 5 }

snmp4jLogHandlerTypes OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.1
        ::= { snmp4jLogHandlerConfig 1 }

snmp4jLogOtherHandler OBJECT-IDENTITY
        STATUS current
        DESCRIPTION
                "This handler type denotes any handler which
                cannot be specifically identified."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.1.1
        ::= { snmp4jLogHandlerTypes 1 }

snmp4jLogLog4JHandlers OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.1.2
        ::= { snmp4jLogHandlerTypes 2 }

snmp4jLog4JFileHandler OBJECT-IDENTITY
        STATUS current
        DESCRIPTION
                "Identifies a Log4J FileHandler."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.1.2.1
        ::= { snmp4jLogLog4JHandlers 1 }

snmp4jLogRollingFileHandler OBJECT-IDENTITY
        STATUS current
        DESCRIPTION
                "Identifies a Log4J RollingFileAppender."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.1.2.2
        ::= { snmp4jLogLog4JHandlers 2 }

snmp4jLogHandlerTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF Snmp4jLogHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "The log handler table can be used to view
                and configure the handlers for each logger
                (if supported by the log system)."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2
        ::= { snmp4jLogHandlerConfig 2 }


snmp4jLogHandlerEntry OBJECT-TYPE
        SYNTAX  Snmp4jLogHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "Each row in the log handler table represents
                an abstract log handler."
        INDEX {
                snmp4jLogHandlerName }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2.1
        ::= { snmp4jLogHandlerTable 1 }


Snmp4jLogHandlerEntry ::= SEQUENCE {

        snmp4jLogHandlerName        SnmpAdminString,
        snmp4jLogHandlerType        OBJECT IDENTIFIER,
        snmp4jLogHandlerStorageType StorageType,
        snmp4jLogHandlerRowStatus   RowStatus }


snmp4jLogHandlerName OBJECT-TYPE
        SYNTAX  SnmpAdminString
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "The name of the log handler."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2.1.1
        ::= { snmp4jLogHandlerEntry 1 }


snmp4jLogHandlerType OBJECT-TYPE
        SYNTAX  OBJECT IDENTIFIER
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION ""
        DEFVAL { snmp4jLog4JFileHandler }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2.1.2
        ::= { snmp4jLogHandlerEntry 2 }


snmp4jLogHandlerStorageType OBJECT-TYPE
        SYNTAX  StorageType
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The storage type this log handler configuration."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2.1.3
        ::= { snmp4jLogHandlerEntry 3 }


snmp4jLogHandlerRowStatus OBJECT-TYPE
        SYNTAX  RowStatus
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "To create a log handler set this value to createAndWait(5)
                or createAndGo(4) and specify the type of the handler
                with snmp4jLogHandlerType."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.2.1.4
        ::= { snmp4jLogHandlerEntry 4 }


snmp4jLogHandlers OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3
        ::= { snmp4jLogHandlerConfig 3 }

snmp4jLogFileHandlerTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF Snmp4jLogFileHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "This table contains the log handlers that log
                to a file (like Log4Js FileAppender )."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1
        ::= { snmp4jLogHandlers 1 }


snmp4jLogFileHandlerEntry OBJECT-TYPE
        SYNTAX  Snmp4jLogFileHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION ""
        INDEX {
                snmp4jLogHandlerName }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1.1
        ::= { snmp4jLogFileHandlerTable 1 }


Snmp4jLogFileHandlerEntry ::= SEQUENCE {

        snmp4jLogFileHandlerPath       FileName,
        snmp4jLogFileHandlerAppend     TruthValue,
        snmp4jLogFileHandlerBufferedIO TruthValue,
        snmp4jLogFileHandlerBufferSize Unsigned32 }


snmp4jLogFileHandlerPath OBJECT-TYPE
        SYNTAX  FileName
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The file where the log output for this handler is
                written to."
        DEFVAL { "snmp4j.log" }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1.1.1
        ::= { snmp4jLogFileHandlerEntry 1 }


snmp4jLogFileHandlerAppend OBJECT-TYPE
        SYNTAX  TruthValue
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "Specifies whether output should be appended to
                an existing file or if it should be truncated instead."
        DEFVAL { true }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1.1.2
        ::= { snmp4jLogFileHandlerEntry 2 }


snmp4jLogFileHandlerBufferedIO OBJECT-TYPE
        SYNTAX  TruthValue
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "Specifies whether this log handler uses buffered
                IO or not."
        DEFVAL { true }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1.1.3
        ::= { snmp4jLogFileHandlerEntry 3 }


snmp4jLogFileHandlerBufferSize OBJECT-TYPE
        SYNTAX  Unsigned32
        UNITS
                "Bytes"
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The buffer size if buffered IO is enabled, otherwise
                zero is returned."
        DEFVAL { 16535 }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.1.1.4
        ::= { snmp4jLogFileHandlerEntry 4 }


snmp4jLogConsoleHandlerTable OBJECT-TYPE
        SYNTAX  SEQUENCE OF Snmp4jLogConsoleHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "This table represents the log handler that log
                to the console like Log4Js ConsoleAppender and
                SNMP4Js ConsoleLogAdapter."
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.2
        ::= { snmp4jLogHandlers 2 }


snmp4jLogConsoleHandlerEntry OBJECT-TYPE
        SYNTAX  Snmp4jLogConsoleHandlerEntry
        MAX-ACCESS not-accessible
        STATUS current
        DESCRIPTION
                "Each row represents a console log handler
                and extends the corresponding row of
                snmp4jLogHandlerTable."
        INDEX {
                snmp4jLogLoggerName }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.2.1
        ::= { snmp4jLogConsoleHandlerTable 1 }


Snmp4jLogConsoleHandlerEntry ::= SEQUENCE {

        snmp4jLogConsoleHandlerTarget INTEGER }


snmp4jLogConsoleHandlerTarget OBJECT-TYPE
        SYNTAX  INTEGER {
                        systemOut(1),
                        systemErr(2) }
        MAX-ACCESS read-create
        STATUS current
        DESCRIPTION
                "The target attribute specifies on which console
                logging output is written."
        DEFVAL { systemOut }
        -- 1.3.6.1.4.1.4976.10.1.1.1.1.2.5.3.2.1.1
        ::= { snmp4jLogConsoleHandlerEntry 1 }


-- Notification Types
--

snmp4jLogEvents OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.2
        ::= { snmp4jLogMIB 2 }

-- Conformance
--

snmp4jLogConf OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.3
        ::= { snmp4jLogMIB 3 }

-- Groups
--

snmp4jLogGroups OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.3.1
        ::= { snmp4jLogConf 1 }

-- Compliance
--

snmp4jLogCompls OBJECT IDENTIFIER 
        -- 1.3.6.1.4.1.4976.10.1.1.1.3.2
        ::= { snmp4jLogConf 2 }

snmp4jLogBasicGroup OBJECT-GROUP
        OBJECTS {
                snmp4jLogFactory,
                snmp4jLogLoggerEffectiveLevel,
                snmp4jLogLoggerIndex,
                snmp4jLogLoggerLevel,
                snmp4jLogLoggerRowStatus,
                snmp4jLogLoggerStorageType,
                snmp4jLogRootLevel,
                snmp4jLogSysDescr }
        STATUS current
        DESCRIPTION
                "Basic objects to control log levels and loggers.."
        -- 1.3.6.1.4.1.4976.10.1.1.1.3.1.1
        ::= { snmp4jLogGroups 1 }

snmp4jLogHandlerBasicGroup OBJECT-GROUP
        OBJECTS {
                snmp4jLogHandlerType,
                snmp4jLogHandlerStorageType,
                snmp4jLogHandlerRowStatus,
                snmp4jLogConsoleHandlerTarget,
                snmp4jLogFileHandlerPath,
                snmp4jLogFileHandlerAppend,
                snmp4jLogFileHandlerBufferedIO,
                snmp4jLogFileHandlerBufferSize,
                snmp4jLogLoggerToHandlerThreshold,
                snmp4jLogLoggerToHandlerStorageType,
                snmp4jLogLoggerToHandlerRowStatus }
        STATUS current
        DESCRIPTION
                "Basic objects for log handler configuration."
        -- 1.3.6.1.4.1.4976.10.1.1.1.3.1.2
        ::= { snmp4jLogGroups 2 }

END
