Definitions for Application-Specific MIBs

The following sample MIB definitions from the sample application show how you might define your own MIBs.

--
-- Juniper Enterprise specific MIB: Example MIB
--
-- Copyright (c) 2006, 2008, Juniper Networks, Inc.
-- All rights reserved.
--
-- The contents of this document are subject to change without notice.
--

JUNIPER-EXAMPLE-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE
        FROM SNMPv2-SMI

    SnmpAdminString
        FROM SNMP-FRAMEWORK-MIB

    MODULE-COMPLIANCE,
    OBJECT-GROUP
        FROM SNMPv2-CONF

    jnxExampleMibRoot
        FROM JUNIPER-EXPERIMENT-MIB;


jnxExampleMIB MODULE-IDENTITY
    LAST-UPDATED "200701120000Z" -- Jan 12 00:00:00 2007 UTC
    ORGANIZATION "Juniper Networks, Inc."
    CONTACT-INFO
            "        Juniper Technical Assistance Center
                     Juniper Networks, Inc.
                     1194 N. Mathilda Avenue
                     Sunnyvale, CA 94089
                     E-mail: support@juniper.net"
    DESCRIPTION
        "The MIB modules for Example data."
    REVISION    "200701120000Z" -- Jan 12 00:00:00 2007 UTC
    DESCRIPTION
            "Added jnxExampleStartup trap."

    ::= { jnxExampleMibRoot 1 }

jnxExampleNotifications OBJECT IDENTIFIER ::= {jnxExampleMIB 0}

jnxExampleDataObjects OBJECT IDENTIFIER ::= {jnxExampleMIB 1}

jnxExampleDataConformance OBJECT IDENTIFIER ::= { jnxExampleMIB 3 }

   --
   -- The jnxExampleDataObjects group
   --
   --

jnxExampleDataTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF JnxExampleDataEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "This table is used to select example data entries." 
    ::= { jnxExampleDataObjects 1 }
                    
jnxExampleDataEntry OBJECT-TYPE
    SYNTAX      JnxExampleDataEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION 
        "An entry in this example table" 
    INDEX { jnxExampleDataName }
    ::= { jnxExampleDataTable 1 }

JnxExampleDataEntry ::= SEQUENCE {
    jnxExampleDataName        SnmpAdminString,
    jnxExampleDataDescription SnmpAdminString,
    jnxExampleDataType        INTEGER,
    jnxExampleDataValue       SnmpAdminString
}

jnxExampleDataName OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(1..127))
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "Example Data identifier"
    ::= { jnxExampleDataEntry 1 }

jnxExampleDataDescription OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(1..127))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "General description of data"
    ::= { jnxExampleDataEntry 2 }

jnxExampleDataType OBJECT-TYPE
    SYNTAX      INTEGER { none(1), fat(2), skinny(3) }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Example data type"
    ::= { jnxExampleDataEntry 3 }

jnxExampleDataValue OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(1..127))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Example data value"
    ::= { jnxExampleDataEntry 4 }

jnxExampleNetSnmpVersion OBJECT-TYPE
    SYNTAX      SnmpAdminString (SIZE(1..127))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "Net-SNMP version"
    ::= { jnxExampleDataObjects 2 }
    
--
-- Example Notification definitions
--

jnxExampleStartup NOTIFICATION-TYPE
    OBJECTS { jnxExampleNetSnmpVersion }
    STATUS  current
    DESCRIPTION
        "The trap will be sent when exampled first starts up"
    ::= { jnxExampleNotifications 1 }

--
--
-- Conformance information
--
--
jnxExampleDataCompliances OBJECT IDENTIFIER ::= 
                                           { jnxExampleDataConformance 1 }
jnxExampleDataGroups OBJECT IDENTIFIER ::=
                                           { jnxExampleDataConformance 2 }

jnxExampleDataBasicCompliance MODULE-COMPLIANCE
    STATUS      current
    DESCRIPTION
        "The compliance statement for Example entities which implement
         example data"
    MODULE -- This Module
    MANDATORY-GROUPS { jnxExampleGroup }
    ::= { jnxExampleDataCompliances 2 }

jnxExampleGroup OBJECT-GROUP
    OBJECTS {
        jnxExampleDataDescription,
        jnxExampleDataType,
        jnxExampleDataValue,
        jnxExampleNetSnmpVersion
    }
    STATUS      current
    DESCRIPTION
        "A collection of objects for example data."
    ::= { jnxExampleDataGroups 1 }
        
END

Return to Using SNMP.


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5