ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

MIB Imports is failing. MibImport: Value cannot be null. Parameter name: s

book

Article ID: 237870

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

The customer needs to import some MIBs. As example, he is importing these MIBs, snmpv2-smi.mib and snmp-framework-mib.mib, under "Settings>All Settings>Monitoring and Alerting>SNMP MIB Import Browser>MIB Browser>Import MIB File"

Although the SMP Console reports success when importing MIBs, they are not actually being imported. 

 

These are the messages that I was able to find in the logs provided:

Entry 1:

MibImport: Value cannot be null.
Parameter name: s
-----------------------------------------------------------------------------------------------------
Date: 3/2/2022 3:27:42 PM, Tick Count: 992487156 (11.11:41:27.1560000), Size: 275 B
Process: w3wp (4188), Thread ID: 190, Module: Altiris.MibImportTask.dll
Priority: 1, Source: MibImport

Entry 2:

MibImport: Added 0 Oid entries, 0 trap annotations, and 0 alert definitions 
              Updated 0 Oid entries and 0 trap annotations
              while importing MIB from file: E:\APPS\Altiris\MibImportTask\Mibs\Uploaded\snmpv2-smi.mib
-----------------------------------------------------------------------------------------------------
Date: 3/2/2022 3:27:42 PM, Tick Count: 992487218 (11.11:41:27.2180000), Size: 448 B
Process: w3wp (4188), Thread ID: 190, Module: w3wp.exe
Priority: 4, Source: MibImport

Entry 3:

MibImport: Unlinked OID in SNMP-FRAMEWORK-MIB: snmpFrameworkMIB ::= { snmpModules 10 }
Undefined identifier: snmpModules near line 10 of E:\APPS\Altiris\MibImportTask\Mibs\Uploaded\snmp-framework-mib.mib
-----------------------------------------------------------------------------------------------------
Date: 3/2/2022 3:28:19 PM, Tick Count: 992524500 (11.11:42:04.5000000), Size: 489 B
Process: w3wp (4188), Thread ID: 216, Module: Altiris.MibImportTask.Web.dll
Priority: 1, Source: Altiris.MibImportTask.Web.ImportMibFile.HandleMIBErrorsAndWarnings

Cause

An invalid MIB file was used originally to be imported. This appears to be a problem with data for import.
Note: our code can't generate anything for import from provided file and tried to import a 'null' instead of XML data.

 

Resolution

1. In this particular scenario, check the content of the MIB file is not a blank file. Check that it doesn't contain only comments without data.

SUPPORT
SNMPv2-SMI.mib (Release 7.0.0)
--------------------------------------------------------------------
-- SNMPv2-SMI.my:  SNMPv2 Structure of Management Information
--
-- May 1994, Jeffrey T. Johnson
--
-- Copyright (c) 1994-1996 by cisco Systems, Inc.
-- All rights reserved.
--
--------------------------------------------------------------------
-- Revision 3.3  1996/08/14 10:58:57  mordock
-- CSCdi65979:  mibs dont load cleanly into HP Openview
-- cosmetic change to get mibs to load cleanly into HP Openview.
-- also added InterfaceIndexOrZero textual-convention to CISCO-TC
--
-- Revision 3.2  1995/11/17  08:37:13  hampton
-- Remove old entries from the RCS header logs.
--
-- Revision 3.1  1995/11/09  10:52:27  shaker
-- Bump version numbers from 2.x to 3.x.
--
-- Revision 2.1  1995/06/07  20:03:18  hampton
-- Bump version numbers from 1.x to 2.x.
--
--------------------------------------------------------------------
--
--      The following is extracted from RFC 1442
--      All macro definitions have been commented out because they are
--      predefined in the mib compiler
          SNMPv2-SMI DEFINITIONS ::= BEGIN

          -- the path to the root
          org            OBJECT IDENTIFIER ::= { iso 3 }
          dod            OBJECT IDENTIFIER ::= { org 6 }
          internet       OBJECT IDENTIFIER ::= { dod 1 }
          directory      OBJECT IDENTIFIER ::= { internet 1 }
          mgmt           OBJECT IDENTIFIER ::= { internet 2 }
          experimental   OBJECT IDENTIFIER ::= { internet 3 }
          private        OBJECT IDENTIFIER ::= { internet 4 }
          enterprises    OBJECT IDENTIFIER ::= { private 1 }
          security       OBJECT IDENTIFIER ::= { internet 5 }
          snmpV2         OBJECT IDENTIFIER ::= { internet 6 }
          -- transport domains
          snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }
          -- transport proxies
          snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }
          -- module identities
          snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }
              mib-2     OBJECT IDENTIFIER  ::=  {  mgmt  1  }
          -- definitions for information modules
--          MODULE-IDENTITY MACRO ::=
--          BEGIN
--              TYPE NOTATION ::=
--                            "LAST-UPDATED" value(Update UTCTime)
--                            "ORGANIZATION" Text
--                            "CONTACT-INFO" Text
--                            "DESCRIPTION" Text
--                            RevisionPart
--
--              VALUE NOTATION ::=
--                            value(VALUE OBJECT IDENTIFIER)
--
--              RevisionPart ::=
--                            Revisions
--                          | empty
--              Revisions ::=
--                            Revision
--                          | Revisions Revision
--              Revision ::=
--                            "REVISION" value(Update UTCTime)
--                            "DESCRIPTION" Text
--
              -- uses the NVT ASCII character set
--              Text ::= """" string """"
--          END

--          OBJECT-IDENTITY MACRO ::=
--          BEGIN
--              TYPE NOTATION ::=
--                            "STATUS" Status
--                            "DESCRIPTION" Text
--                            ReferPart
--
--              VALUE NOTATION ::=
--                            value(VALUE OBJECT IDENTIFIER)
--
--              Status ::=
--                            "current"
--                          | "obsolete"
--
--              ReferPart ::=
--                          "REFERENCE" Text
--                        | empty
--
--              Text ::= """" string """"
--          END
          -- names of objects
--          ObjectName ::=
--              OBJECT IDENTIFIER

          -- syntax of objects
--          ObjectSyntax ::=
--             CHOICE {
--                  simple
--                      SimpleSyntax,
                    -- note that SEQUENCEs for conceptual tables and
                    -- rows are not mentioned here...
--                 application-wide
--                    ApplicationSyntax
--           }

          -- built-in ASN.1 types
--          SimpleSyntax ::=
--              CHOICE {
                  -- INTEGERs with a more restrictive range
                  -- may also be used
--                  integer-value
--                      INTEGER (-2147483648..2147483647),
--
--                  string-value
--                      OCTET STRING,
--
--                  objectID-value
--                      OBJECT IDENTIFIER,
--
                  -- only the enumerated form is allowed
--                  bit-value
--                      BIT STRING
--              }
 
          -- indistinguishable from INTEGER, but never needs more than
          -- 32-bits for a two's complement representation
--          Integer32 ::=
--              [UNIVERSAL 2]
--                  IMPLICIT INTEGER (-2147483648..2147483647)

          -- application-wide types
--          ApplicationSyntax ::=
--              CHOICE {
--                  ipAddress-value
--                      IpAddress,
--
--                  counter-value
--                      Counter32,
--
--                  gauge-value
--                      Gauge32,
--
--                  timeticks-value
--                      TimeTicks,
--
--                  arbitrary-value
--                      Opaque,
--
--                  nsapAddress-value
--                      NsapAddress,
--
--                  big-counter-value
--                      Counter64,
--
--                  unsigned-integer-value
--                      UInteger32
--              }
          -- in network-byte order
          -- (this is a tagged type for historical reasons)
--          IpAddress ::=
--              [APPLICATION 0]
--                  IMPLICIT OCTET STRING (SIZE (4))
          -- this wraps
--          Counter32 ::=
--              [APPLICATION 1]
--                  IMPLICIT INTEGER (0..4294967295)
          -- this doesn't wrap
--          Gauge32 ::=
--              [APPLICATION 2]
--                  IMPLICIT INTEGER (0..4294967295)
          -- hundredths of seconds since an epoch
--          TimeTicks ::=
--              [APPLICATION 3]
--                  IMPLICIT INTEGER (0..4294967295)
          -- for backward-compatibility only
--          Opaque ::=
--              [APPLICATION 4]
--                  IMPLICIT OCTET STRING
          -- for OSI NSAP addresses
          -- (this is a tagged type for historical reasons)
--          NsapAddress ::=
--              [APPLICATION 5]
--                  IMPLICIT OCTET STRING (SIZE (1 | 4..21))
          -- for counters that wrap in less than one hour with only 32 bits
--          Counter64 ::=
--              [APPLICATION 6]
--                  IMPLICIT INTEGER (0..18446744073709551615)
          -- an unsigned 32-bit quantity
--          UInteger32 ::=
--              [APPLICATION 7]
--                  IMPLICIT INTEGER (0..4294967295)

          -- definition for objects
--          OBJECT-TYPE MACRO ::=
--          BEGIN
--              TYPE NOTATION ::=
--                            "SYNTAX" type(Syntax)
--                            UnitsPart
--                            "MAX-ACCESS" Access
--                            "STATUS" Status
--                            "DESCRIPTION" Text
--                            ReferPart
--                            IndexPart
--                            DefValPart
--
--              VALUE NOTATION ::=
--                            value(VALUE ObjectName)
--
--              UnitsPart ::=
--                            "UNITS" Text
--                          | empty
--
--              Access ::=
--                            "not-accessible"
--                          | "read-only"
--                          | "read-write"
--                          | "read-create"
--
--              Status ::=
--                            "current"
--                          | "deprecated"
--                          | "obsolete"
--
--              ReferPart ::=
--                            "REFERENCE" Text
--                          | empty
--
--              IndexPart ::=
--                            "INDEX"    "{" IndexTypes "}"
--                          | "AUGMENTS" "{" Entry      "}"
--                          | empty
--              IndexTypes ::=
--                            IndexType
--                          | IndexTypes "," IndexType
--              IndexType ::=
--                            "IMPLIED" Index
--                          | Index
--              Index ::=
                              -- use the SYNTAX value of the
                              -- correspondent OBJECT-TYPE invocation
--                            value(Indexobject ObjectName)
--              Entry ::=
                              -- use the INDEX value of the
                              -- correspondent OBJECT-TYPE invocation
--                            value(Entryobject ObjectName)
--
--              DefValPart ::=
--                            "DEFVAL" "{" value(Defval Syntax) "}"
--                          | empty
--
              -- uses the NVT ASCII character set
--              Text ::= """" string """"
--          END

          -- definitions for notifications
--          NOTIFICATION-TYPE MACRO ::=
--          BEGIN
--              TYPE NOTATION ::=
--                            ObjectsPart
--                            "STATUS" Status
--                            "DESCRIPTION" Text
--                            ReferPart
--
--              VALUE NOTATION ::=
--                            value(VALUE OBJECT IDENTIFIER)
--
--              ObjectsPart ::=
--                            "OBJECTS" "{" Objects "}"
--                          | empty
--              Objects ::=
--                            Object
--                          | Objects "," Object
--              Object ::=
--                            value(Name ObjectName)
--
--              Status ::=
--                            "current"
--                          | "deprecated"
--                          | "obsolete"
--
--              ReferPart ::=
--                          "REFERENCE" Text
--                        | empty
--
              -- uses the NVT ASCII character set
--              Text ::= """" string """"
--          END

          END

 

 

2. Find a valid MIB file to be imported. For example, since we are trying to import "SNMPv2-SMI.mib", you can find a copy of it under https://www.circitor.fr/Mibs/Html/S/SNMPv2-SMI.php.

SNMPv2-SMI DEFINITIONS ::= BEGIN
-- the path to the root
org            OBJECT IDENTIFIER ::= { iso 3 }  --  "iso" = 1
dod            OBJECT IDENTIFIER ::= { org 6 }
internet       OBJECT IDENTIFIER ::= { dod 1 }
directory      OBJECT IDENTIFIER ::= { internet 1 }
mgmt           OBJECT IDENTIFIER ::= { internet 2 }
mib-2          OBJECT IDENTIFIER ::= { mgmt 1 }
transmission   OBJECT IDENTIFIER ::= { mib-2 10 }
experimental   OBJECT IDENTIFIER ::= { internet 3 }
private        OBJECT IDENTIFIER ::= { internet 4 }
enterprises    OBJECT IDENTIFIER ::= { private 1 }
security       OBJECT IDENTIFIER ::= { internet 5 }
snmpV2         OBJECT IDENTIFIER ::= { internet 6 }
-- transport domains
snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }
-- transport proxies
snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }
-- module identities
snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }
-- Extended UTCTime, to allow dates with four-digit years
-- (Note that this definition of ExtUTCTime is not to be IMPORTed
--  by MIB modules.)
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
    -- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
    --   where: YY   - last two digits of year (only years
    --                 between 1900-1999)
    --          YYYY - last four digits of the year (any year)
    --          MM   - month (01 through 12)
    --          DD   - day of month (01 through 31)
    --          HH   - hours (00 through 23)
    --          MM   - minutes (00 through 59)
    --          Z    - denotes GMT (the ASCII character Z)
    --
    -- For example, "9502192015Z" and "199502192015Z" represent
    -- 8:15pm GMT on 19 February 1995. Years after 1999 must use
    -- the four digit year format. Years 1900-1999 may use the
    -- two or four digit format.
-- definitions for information modules
MODULE-IDENTITY MACRO ::=
BEGIN
    TYPE NOTATION ::=
                  "LAST-UPDATED" value(Update ExtUTCTime)
                  "ORGANIZATION" Text
                  "CONTACT-INFO" Text
                  "DESCRIPTION" Text
                  RevisionPart
    VALUE NOTATION ::=
                  value(VALUE OBJECT IDENTIFIER)
    RevisionPart ::=
                  Revisions
                | empty
    Revisions ::=
                  Revision
                | Revisions Revision
    Revision ::=
                  "REVISION" value(Update ExtUTCTime)
                  "DESCRIPTION" Text
    -- a character string as defined in section 3.1.1
    Text ::= value(IA5String)
END
OBJECT-IDENTITY MACRO ::=
BEGIN
    TYPE NOTATION ::=
                  "STATUS" Status
                  "DESCRIPTION" Text
                  ReferPart
    VALUE NOTATION ::=
                  value(VALUE OBJECT IDENTIFIER)
    Status ::=
                  "current"
                | "deprecated"
                | "obsolete"
    ReferPart ::=
                  "REFERENCE" Text
                | empty
    -- a character string as defined in section 3.1.1
    Text ::= value(IA5String)
END
-- names of objects
-- (Note that these definitions of ObjectName and NotificationName
--  are not to be IMPORTed by MIB modules.)
ObjectName ::=
    OBJECT IDENTIFIER
NotificationName ::=
    OBJECT IDENTIFIER
-- syntax of objects
-- the "base types" defined here are:
--   3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
--   8 application-defined types: Integer32, IpAddress, Counter32,
--              Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
ObjectSyntax ::=
    CHOICE {
        simple
            SimpleSyntax,
          -- note that SEQUENCEs for conceptual tables and
          -- rows are not mentioned here...
        application-wide
            ApplicationSyntax
    }
-- built-in ASN.1 types
SimpleSyntax ::=
    CHOICE {
        -- INTEGERs with a more restrictive range
        -- may also be used
        integer-value               -- includes Integer32
            INTEGER (-2147483648..2147483647),
        -- OCTET STRINGs with a more restrictive size
        -- may also be used
        string-value
            OCTET STRING (SIZE (0..65535)),
        objectID-value
            OBJECT IDENTIFIER
    }
-- indistinguishable from INTEGER, but never needs more than
-- 32-bits for a two's complement representation
Integer32 ::=
        INTEGER (-2147483648..2147483647)
-- application-wide types
ApplicationSyntax ::=
    CHOICE {
        ipAddress-value
            IpAddress,
        counter-value
            Counter32,
        timeticks-value
            TimeTicks,
        arbitrary-value
            Opaque,
        big-counter-value
            Counter64,
        unsigned-integer-value  -- includes Gauge32
            Unsigned32
    }
-- in network-byte order
-- (this is a tagged type for historical reasons)
IpAddress ::=
    [APPLICATION 0]
        IMPLICIT OCTET STRING (SIZE (4))
-- this wraps
Counter32 ::=
    [APPLICATION 1]
        IMPLICIT INTEGER (0..4294967295)
-- this doesn't wrap
Gauge32 ::=
    [APPLICATION 2]
        IMPLICIT INTEGER (0..4294967295)
-- an unsigned 32-bit quantity
-- indistinguishable from Gauge32
Unsigned32 ::=
    [APPLICATION 2]
        IMPLICIT INTEGER (0..4294967295)
-- hundredths of seconds since an epoch
TimeTicks ::=
    [APPLICATION 3]
        IMPLICIT INTEGER (0..4294967295)
-- for backward-compatibility only
Opaque ::=
    [APPLICATION 4]
        IMPLICIT OCTET STRING
-- for counters that wrap in less than one hour with only 32 bits
Counter64 ::=
    [APPLICATION 6]
        IMPLICIT INTEGER (0..18446744073709551615)
-- definition for objects
OBJECT-TYPE MACRO ::=
BEGIN
    TYPE NOTATION ::=
                  "SYNTAX" Syntax
                  UnitsPart
                  "MAX-ACCESS" Access
                  "STATUS" Status
                  "DESCRIPTION" Text
                  ReferPart
                  IndexPart
                  DefValPart
    VALUE NOTATION ::=
                  value(VALUE ObjectName)
    Syntax ::=   -- Must be one of the following:
                       -- a base type (or its refinement),
                       -- a textual convention (or its refinement), or
                       -- a BITS pseudo-type
                   type
                | "BITS" "{" NamedBits "}"
    NamedBits ::= NamedBit
                | NamedBits "," NamedBit
    NamedBit ::=  identifier "(" number ")" -- number is nonnegative
    UnitsPart ::=
                  "UNITS" Text
                | empty
    Access ::=
                  "not-accessible"
                | "accessible-for-notify"
                | "read-only"
                | "read-write"
                | "read-create"
    Status ::=
                  "current"
                | "deprecated"
                | "obsolete"
    ReferPart ::=
                  "REFERENCE" Text
                | empty
    IndexPart ::=
                  "INDEX"    "{" IndexTypes "}"
                | "AUGMENTS" "{" Entry      "}"
                | empty
    IndexTypes ::=
                  IndexType
                | IndexTypes "," IndexType
    IndexType ::=
                  "IMPLIED" Index
                | Index
    Index ::=
                    -- use the SYNTAX value of the
                    -- correspondent OBJECT-TYPE invocation
                  value(ObjectName)
    Entry ::=
                    -- use the INDEX value of the
                    -- correspondent OBJECT-TYPE invocation
                  value(ObjectName)
    DefValPart ::= "DEFVAL" "{" Defvalue "}"
                | empty
    Defvalue ::=  -- must be valid for the type specified in
                  -- SYNTAX clause of same OBJECT-TYPE macro
                  value(ObjectSyntax)
                | "{" BitsValue "}"
    BitsValue ::= BitNames
                | empty
    BitNames ::=  BitName
                | BitNames "," BitName
    BitName ::= identifier
    -- a character string as defined in section 3.1.1
    Text ::= value(IA5String)
END
-- definitions for notifications
NOTIFICATION-TYPE MACRO ::=
BEGIN
    TYPE NOTATION ::=
                  ObjectsPart
                  "STATUS" Status
                  "DESCRIPTION" Text
                  ReferPart
    VALUE NOTATION ::=
                  value(VALUE NotificationName)
    ObjectsPart ::=
                  "OBJECTS" "{" Objects "}"
                | empty
    Objects ::=
                  Object
                | Objects "," Object
    Object ::=
                  value(ObjectName)
    Status ::=
                  "current"
                | "deprecated"
                | "obsolete"
    ReferPart ::=
                  "REFERENCE" Text
                | empty
    -- a character string as defined in section 3.1.1
    Text ::= value(IA5String)
END
-- definitions of administrative identifiers
zeroDotZero    OBJECT-IDENTITY
    STATUS     current
    DESCRIPTION
            "A value used for null identifiers."
    ::= { 0 0 }
END

 

 

We can import MIBs to be used with Network Discovery.
These MIBs usually consist of both “.mib” and “.my” files.

In the MIB Browser under “Settings > All Settings > Monitoring and Alerting > SNMP MIB Import Browser > MIB Browser”, you can import any of the “.mib” files. And they should be usable after the import.



You can as well use the MIB Import task, under “Manage > Jobs / Tasks > right click any folder > select New > Task > scroll down to and select “MIB Import” under "Monitoring and Alerting”, you can import both the “.mib” and “.my” files.


They will both be imported into the “Program Files\Altiris\MibImportTask\Mibs\Uploaded” folder.

You should also be able to select one of the MIB files within the “SNMP Data Mapping Tables”, “Settings > All Settings > Discovery and Inventory > SNMP Settings”



How to import a MIB file:

1. Find the MIB under the “Settings > All Settings > Discovery and Inventory > SNMP Settings > SNMP Data Mapping Tables”

2. Click on "New", and assign some name


3. Then, click "New" and give some Name and Length value and click on "Select OID"



4. Then, under MIB drop-down, see if those MIBs are listed or not. If so, select one.

5. Then, click on "iso" and you should be able to find/see the proper objects.

 

Attachments