2015-10-15 51 views
1

我有以下的文件,我得到SNMP MIB ERROR標量的父節點必須是簡單的Node對象不導入

X-MIB.txt:26:標量的父節點必須是簡單的Node對象不 進口

X-MIB.txt:35:標量的父節點必須是簡單的節點客體不是 進口

X-MIB.txt:45:標量的父節點必須是簡單的節點客體不是 進口

X-MIB.txt:55:標量的父節點必須是簡單的Node對象不 進口

這裏的MIB文件(發射我的公司名稱,並用「X」和「Y」更換名稱後)

X-MIB DEFINITIONS ::= BEGIN 

IMPORTS 
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32 FROM SNMPv2-SMI 
    DisplayString       FROM RFC1213-MIB 
    OBJECT-GROUP, NOTIFICATION-GROUP  FROM SNMPv2-CONF 
    y          FROM Y-MIB; 

x MODULE-IDENTITY 
     LAST-UPDATED "201411060000Z" 
     ORGANIZATION "Y Corporation" 
     CONTACT-INFO 
     "Y Corporation 
     www.y.com" 
     DESCRIPTION 
     "The Structure of Management Information for the Y X enterprise." 
     REVISION  "201411060000Z" 
     DESCRIPTION 
     "Initial version of this MIB." 
     ::= { y 101 } 

-- 1.3.6.1.4.1.1139.101.1 
xAlert OBJECT IDENTIFIER ::= { x 1 } 

-- 1.3.6.1.4.1.1139.101.1.1 
xAlertSeverity OBJECT-TYPE 
     SYNTAX Integer32 
     MAX-ACCESS accessible-for-notify 
     STATUS current 
     DESCRIPTION 
     "Severity of the event" 
     ::= { xAlert 1 } 

-- 1.3.6.1.4.1.1139.101.1.2 
xAlertType OBJECT-TYPE 
     SYNTAX DisplayString (SIZE (0..255)) 
     MAX-ACCESS accessible-for-notify 
     STATUS current 
     DESCRIPTION 
     "Type of the alert" 
     ::= { xAlert 2 } 


-- 1.3.6.1.4.1.1139.101.1.3 
xAlertSourceObjectId OBJECT-TYPE 
     SYNTAX DisplayString (SIZE (0..255)) 
     MAX-ACCESS accessible-for-notify 
     STATUS current 
     DESCRIPTION 
     "Object id for which the alert was created" 
     ::= { xAlert 3 } 


-- 1.3.6.1.4.1.1139.101.1.4 
xAlertActionCode OBJECT-TYPE 
     SYNTAX DisplayString (SIZE (0..255)) 
     MAX-ACCESS accessible-for-notify 
     STATUS current 
     DESCRIPTION 
     "Action code of the alert" 
     ::= { scaleioAlert 4 } 

-- 1.3.6.1.4.1.1139.101.1.5 
     xGroups OBJECT IDENTIFIER ::= { xAlert 5 } 


     -- 1.3.6.1.4.1.1139.101.1.5.1 
     currentObjectGroup OBJECT-GROUP 
      OBJECTS { xAlertSeverity, 
       xAlertType, 
       xAlertSourceObjectId, 
       xAlertActionCode } 
      STATUS current 
      DESCRIPTION 
       "x-MIB-V2 OBJECT-GROUP." 
      ::= { xGroups 1 } 

     -- 1.3.6.1.4.1.1139.101.1.5.2 
     currentNotificationGroup NOTIFICATION-GROUP 
      NOTIFICATIONS { xAEAlert } 
      STATUS current 
      DESCRIPTION 
       "x-MIB-V2 NOTIFICATION-GROUP." 
      ::= { xGroups 2 } 


xAEAlert NOTIFICATION-TYPE 
     OBJECTS { xAlertSeverity, xAlertType, xAlertSourceObjectId, xAlertActionCode } 
     STATUS current 
     DESCRIPTION "x Alert" 
     ::= { x 1 } 
END 

回答

0
  1. 不要RFC1213-MIB導入DisplayString。您正在混合SMIv1SMIv2。改爲從SNMPv2-TC導入DisplayString
  2. 嘗試在模塊標識和xAlert之間添加中間值OBJECT IDENTIFIER。我能夠得到警告標量的父節點必須是簡單的節點通過這樣做離開。

    xMibObjects OBJECT IDENTIFIER ::= { x 1 } 
    xAlert OBJECT IDENTIFIER ::= { xMibObjects 1 } 
    

我沒有的文字作爲Y-MIB,所以我無法完成進口。