Page 1 of 2

Error when adding MIB.

Posted: Thu Mar 28, 2013 10:05 am
by BanditBBS
Whenever I add a new MIB via XI admin page, I get an error:

Code: Select all

Failed to convert uploaded file to snmptt mib. (rc: 13)
I see the MIB now listed on the manage mibs page, but everything is still showing up as unknown and I see no mention of the MIB in snmptt.conf.

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 10:13 am
by slansing
Can you show an example of a MIB you are trying to upload when it gives this error?

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 10:44 am
by BanditBBS
slansing wrote:Can you show an example of a MIB you are trying to upload when it gives this error?
Here ya go -

Code: Select all

ORACLE-ENTERPRISE-MANAGER-4-MIB DEFINITIONS ::= BEGIN

IMPORTS
	TRAP-TYPE
		FROM RFC-1215
	DisplayString
		FROM RFC1213-MIB
	OBJECT-TYPE
		FROM RFC-1212
	enterprises
		FROM RFC1155-SMI;

oracle OBJECT IDENTIFIER ::= { enterprises  111 }

oraEM4 OBJECT IDENTIFIER ::= { oracle  15 }

oraEM4Objects OBJECT IDENTIFIER ::= { oraEM4  1 }

oraEM4AlertTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF OraEM4AlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information on alerts generated by Oracle Enterprise Manager. This table is not queryable; it exists only to document the variables included in the oraEM4Alert trap.  Each trap contains a single instance of each variable in the table."
    ::= { oraEM4Objects  1 }

oraEM4AlertEntry OBJECT-TYPE
    SYNTAX  OraEM4AlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information about a particular Oracle Enterprise Manager alert."
    INDEX   { oraEM4AlertIndex }
    ::= { oraEM4AlertTable  1 }

OraEM4AlertEntry ::=
    SEQUENCE {
        oraEM4AlertIndex
            INTEGER,

        oraEM4AlertTargetName
	   DisplayString,

        oraEM4AlertTargetType
	   DisplayString,

        oraEM4AlertHostName
	   DisplayString,

        oraEM4AlertMetricName
	   DisplayString,

        oraEM4AlertKeyName
	   DisplayString,

        oraEM4AlertKeyValue
	   DisplayString,

        oraEM4AlertTimeStamp
	   DisplayString,

        oraEM4AlertSeverity
	   DisplayString,

        oraEM4AlertMessage
	   DisplayString,

        oraEM4AlertRuleName
	   DisplayString,

        oraEM4AlertRuleOwner
	   DisplayString,

	oraEM4AlertMetricValue
           DisplayString,

        oraEM4AlertContext
           DisplayString
    }

oraEM4AlertIndex OBJECT-TYPE
    SYNTAX  INTEGER
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "Index of a particular alert, unique only at the moment an alert is generated."
    ::= { oraEM4AlertEntry  1 }

oraEM4AlertTargetName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the target to which this alert applies."
    ::= { oraEM4AlertEntry  2 }

oraEM4AlertTargetType OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The type of the target to which this alert applies."
    ::= { oraEM4AlertEntry  3 }

oraEM4AlertHostName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the host on which this alert originated."
    ::= { oraEM4AlertEntry  4 }

oraEM4AlertMetricName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the metric or policy which generated this alert."
    ::= { oraEM4AlertEntry  5 }

oraEM4AlertKeyName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the key-column, if present, for the metric which generated this alert."
    ::= { oraEM4AlertEntry  6 }

oraEM4AlertKeyValue OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The value of the key-column, if present, for the metric which generated this alert."
    ::= { oraEM4AlertEntry  7 }

oraEM4AlertTimeStamp OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The time at which this alert was generated."
    ::= { oraEM4AlertEntry  8 }

oraEM4AlertSeverity OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The severity of the alert e.g. Critical."
    ::= { oraEM4AlertEntry  9 }

oraEM4AlertMessage OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The message associated with the alert."
    ::= { oraEM4AlertEntry  10 }

oraEM4AlertRuleName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the notification rule that caused this notification."
    ::= { oraEM4AlertEntry  11 }

oraEM4AlertRuleOwner OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The owner of the notification rule that caused this notification."
    ::= { oraEM4AlertEntry  12 }

oraEM4AlertMetricValue OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The value of the metric which caused this alert to be generated."
    ::= { oraEM4AlertEntry  13 }

oraEM4AlertContext OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "A comma separated list of metric column names and values associated with the metric that caused this alert to be generated."
    ::= { oraEM4AlertEntry  14 }

oraEM4Traps OBJECT IDENTIFIER ::= { oraEM4  2 }

oraEM4Alert TRAP-TYPE
    ENTERPRISE  oraEM4Traps
    VARIABLES   { oraEM4AlertTargetName, oraEM4AlertTargetType,
                  oraEM4AlertHostName, oraEM4AlertMetricName,
                  oraEM4AlertKeyName, oraEM4AlertKeyValue, oraEM4AlertTimeStamp,
                  oraEM4AlertSeverity, oraEM4AlertMessage, 
                  oraEM4AlertRuleName, oraEM4AlertRuleOwner, 
                  oraEM4AlertMetricValue, oraEM4AlertContext }
    DESCRIPTION
     "The variables included in the oraEM4Alert trap."
    ::= 1


oraEM4JobAlertTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF OraEM4JobAlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information on alerts generated by Oracle Enterprise Manager. This table is not queryable; it exists only to document the variables included in the oraEM4JobAlert trap.  Each trap contains a single instance of each variable in the table."
    ::= { oraEM4Objects  2 }

oraEM4JobAlertEntry OBJECT-TYPE
    SYNTAX  OraEM4JobAlertEntry
    ACCESS  not-accessible
    STATUS  mandatory
    DESCRIPTION
     "Information about a particular Oracle Enterprise Manager alert."
    INDEX   { oraEM4JobAlertIndex }
    ::= { oraEM4JobAlertTable  1 }

OraEM4JobAlertEntry ::=
    SEQUENCE {
        oraEM4JobAlertIndex
            INTEGER,

        oraEM4JobAlertJobName
	   DisplayString,

        oraEM4JobAlertJobOwner
	   DisplayString,

        oraEM4JobAlertJobType
	   DisplayString,

        oraEM4JobAlertJobStatus
	   DisplayString,

        oraEM4JobAlertTargets
	   DisplayString,

        oraEM4JobAlertTimeStamp
	   DisplayString,

        oraEM4JobAlertRuleName
	   DisplayString,

        oraEM4JobAlertRuleOwner
	   DisplayString,

	oraEM4JobAlertMetricName
           DisplayString,

	oraEM4JobAlertMetricValue
           DisplayString,

        oraEM4JobAlertContext
           DisplayString,

        oraEM4JobAlertKeyName
	   DisplayString,

        oraEM4JobAlertKeyValue
	   DisplayString,

        oraEM4JobAlertSeverity
	   DisplayString
    }


oraEM4JobAlertIndex OBJECT-TYPE
    SYNTAX  INTEGER
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "Index of a particular alert, unique only at the moment an alert is generated."
    ::= { oraEM4JobAlertEntry  1 }

oraEM4JobAlertJobName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the job to which this alert applies."
    ::= { oraEM4JobAlertEntry  2 }

oraEM4JobAlertJobOwner OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The owner of the job to which this alert applies."
    ::= { oraEM4JobAlertEntry  3 }

oraEM4JobAlertJobType OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The type of the job to which this alert applies."
    ::= { oraEM4JobAlertEntry  4 }

oraEM4JobAlertJobStatus OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The status of the job to which this alert applies."
    ::= { oraEM4JobAlertEntry  5 }

oraEM4JobAlertTargets OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "A comma separated list of target to which this alert applies."
    ::= { oraEM4JobAlertEntry  6 }

oraEM4JobAlertTimeStamp OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The time at which this job status changed causing this alert."
    ::= { oraEM4JobAlertEntry  7 }

oraEM4JobAlertRuleName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the notification rule that caused this notification."
    ::= { oraEM4JobAlertEntry  8 }

oraEM4JobAlertRuleOwner OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The owner of the notification rule that caused this notification."
    ::= { oraEM4JobAlertEntry  9 }

oraEM4JobAlertMetricName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the metric or policy which caused the Corrective Action to run that caused this alert."
    ::= { oraEM4JobAlertEntry  10 }

oraEM4JobAlertMetricValue OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The value of the metric which caused the Corrective Action to run that caused this alert."
    ::= { oraEM4JobAlertEntry  11 }

oraEM4JobAlertContext OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "A comma separated list of metric column names and values associated with the metric which caused the Corrective Action to run that caused this alert."
    ::= { oraEM4JobAlertEntry  12 }

oraEM4JobAlertKeyName OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The name of the key-column, if present, for the metric which caused the Corrective Action to run that generated this alert."
    ::= { oraEM4JobAlertEntry  13 }

oraEM4JobAlertKeyValue OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The value of the key-column, if present, for the metric which caused the Corrective Action to run that generated this alert."
    ::= { oraEM4JobAlertEntry  14 }

oraEM4JobAlertSeverity OBJECT-TYPE
    SYNTAX  DisplayString
    ACCESS  read-only
    STATUS  mandatory
    DESCRIPTION
     "The severity of the metric which caused the Corrective Action to run that generated this alert e.g. Critical."
    ::= { oraEM4JobAlertEntry  15 }

oraEM4JobAlert TRAP-TYPE
    ENTERPRISE  oraEM4Traps
    VARIABLES   { oraEM4JobAlertJobName, oraEM4JobAlertJobOwner,
                  oraEM4JobAlertJobType, oraEM4JobAlertJobStatus,
                  oraEM4JobAlertTargets, oraEM4JobAlertTimeStamp,
                  oraEM4JobAlertRuleName, oraEM4JobAlertRuleOwner, 
                  oraEM4JobAlertMetricName, oraEM4JobAlertMetricValue, 
                  oraEM4JobAlertContext, oraEM4JobAlertKeyName, 
                  oraEM4JobAlertKeyValue, oraEM4JobAlertSeverity }
    DESCRIPTION
     "The variables included in the oraEM4JobAlert trap."
    ::= 2

END


Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 1:52 pm
by lmiltchev
Can you show the output of the following command?

Code: Select all

ll /usr/local/bin/snmpttconvertmib

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 1:57 pm
by BanditBBS
-rwxr-xr-x 1 root nagios 30438 Nov 1 17:02 /usr/local/bin/snmpttconvertmib

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 2:45 pm
by sreinhardt
Now that the file is shown in manage mibs, have you run addmib against the file? This needs to be done for all new mibs even if you have added it via ui.

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 2:47 pm
by BanditBBS
sreinhardt wrote:Now that the file is shown in manage mibs, have you run addmib against the file? This needs to be done for all new mibs even if you have added it via ui.
I have not, I will. But that doesn't explain the error, right?

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 2:51 pm
by BanditBBS
When I run addmib on it, I get this:

Code: Select all

[clarkj@svwdcnagios02 mibs]$ sudo /usr/local/bin/addmib ORACLE-ENTERPRISE-MANAGER-4-MIB.mib
Unknown object identifier: ORACLE-ENTERPRISE-MANAGER-4-MIB::IMPORTS

Re: Error when adding MIB.

Posted: Thu Mar 28, 2013 4:46 pm
by lmiltchev
I tried to upload the same MIB on my test box, and I am getting the same error:

Code: Select all

Unknown object identifier: ORACLE-ENTERPRISE-MANAGER-4-MIB::IMPORTS
I would recommend contacting Oracle and inquiring about this error.

Re: Error when adding MIB.

Posted: Fri Mar 29, 2013 11:04 am
by BanditBBS
I was able to get the MIB to add by remarking out 3 of the 4 imports and it seems to be translating fine :)