SNMPResponse - Global

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 5분
  • The SNMPResponse script include provides methods to wrap an SNMP payload response instance with methods to safely and easily retrieve SNMP singleton fields or tables.

    Use this script include to retrieve SNMP singleton fields or tables.

    SNMPResponse - buildIndex(Object cur, String name, String extName)

    Builds an index to all SNMP entities in the current object.

    표 1. Parameters
    Name Type Description
    cur Object The current object
    name String The index name
    extName String The index extension
    표 2. Returns
    Type Description
    void

    SNMPResponse - buildReferences()

    Builds references to actual instances for all identified indexes (in the discovery_snmp_ref table) that can be resolved.

    표 3. Parameters
    Name Type Description
    None
    표 4. Returns
    Type Description
    void

    SNMPResponse - getAmbiguousOIDs(String refBase, String refLeaf)

    Returns an array of OIDs that match the given ref_base and which have a defined, non-null ref_leaf.

    The last character of ref_base may be a question mark; in that case, if the parent node is a table then all table entries are returned.

    표 5. Parameters
    Name Type Description
    refBase String The reference base
    refLeaf String The reference leaf
    표 6. Returns
    Type Description
    Array An array of OIDs that match the given ref_base and which have a defined, non-null ref_leaf.

    SNMPResponse - getOIDInt(String name)

    Returns the integer contained in the OID object with the given MIB name.

    표 7. Parameters
    Name Type Description
    name String The MIB name
    표 8. Returns
    Type Description
    Number The integer contained in the OID object, or zero if the object could not be found or is empty.

    SNMPResponse - getOIDObj(String name)

    Retrieves the OID object with the given MIB name from the response.

    This method does not work with numeric OID strings, only MIB names.

    표 9. Parameters
    Name Type Description
    name String The MIB name
    표 10. Returns
    Type Description
    OID object The OID object with the given MIB name, or null if the object could not be found or if any table entries are encountered while walking down the named elements.

    SNMPResponse - getOIDTable(String parentName, String entryName)

    Returns a hashmap of table entries under the given parent MIB name, with the given entry MIB names.

    표 11. Parameters
    Name Type Description
    parentName String The parent MIB name
    entryName String The entry MIB name
    표 12. Returns
    Type Description
    Hashmap A hashmap of table entries under the given parent MIB name, with the given entry MIB names, or null if the parent does not exist.

    SNMPResponse - getOIDText(String name)

    Returns the text contained in the OID object with the given MIB name.

    표 13. Parameters
    Name Type Description
    name String The MIB name
    표 14. Returns
    Type Description
    String The text contained in the OID object. Returns null if the object could not be found, or if it has no text.

    SNMPResponse - normalize(Object cur)

    Resolves SNMP tables into hashmaps and OID values into primitives.

    All SNMP numeric types convert to a JavaScript number. An SNMP null type converts to a JavaScript null. An SNMP IP Address value converts to a Java IPAddressV4 instance. All other values convert to a JavaScript string.

    표 15. Parameters
    Name Type Description
    cur Object The SNMP table or OID value.
    표 16. Returns
    Type Description
    void