【问题标题】:What do I set ProductID to in HOST-RESOURCES-MIB我在 HOST-RESOURCES-MIB 中将 ProductID 设置为什么
【发布时间】:2016-12-29 14:57:49
【问题描述】:

我正在 python 中实现一个 SNMP 代理,并且正在使用 MIB HOST-RESOURCES-MIB。我需要设置的字段之一是hrSWRunID。此 OID 定义为 ProductID 类型,ProductID 状态的定义

ProductID ::= TEXTUAL-CONVENTION 状态电流 描述 "此文本约定旨在识别

    manufacturer, model, and version of a specific
    hardware or software product.  It is suggested that
    these OBJECT IDENTIFIERs are allocated such that all
    products from a particular manufacturer are registered
    under a subtree distinct to that manufacturer.  In
    addition, all versions of a product should be
    registered under a subtree distinct to that product.
    With this strategy, a management station may uniquely
    determine the manufacturer and/or model of a product
    whose productID is unknown to the management station.
    Objects of this type may be useful for inventory
    purposes or for automatically detecting
    incompatibilities or version mismatches between
    various hardware and software components on a system.

    For example, the product ID for the ACME 4860 66MHz
    clock doubled processor might be:
    enterprises.acme.acmeProcessors.a4860DX2.MHz66

    A software product might be registered as:
    enterprises.acme.acmeOperatingSystems.acmeDOS.six(6).one(1)
    "
SYNTAX OBJECT IDENTIFIER

-- unknownProduct 将用于任何未知的 ProductID -- 未知产品对象标识符 ::= { 0 0 }

据此,我假设 com.mycompany.mydepartment.myapp.appversion 的值就足够了,但是当我运行代码时它失败并出现错误 ProductID: invalid literal for int() with base 0: 'com'\n"]

经过一些实验,我终于设法运行我的代码,并将 ProductID 设置为一组数字,例如{1, 2, 3}。虽然我的代码现在可以工作,但我不清楚正确的值应该是什么。

谁能解释一下 ProductID 是什么或应该是什么?

【问题讨论】:

    标签: snmp mib opennms


    【解决方案1】:

    ProductID 将是定义的 MIB 对象的 OBJECT IDENTIFIER 在您的企业 MIB 下。一个好的开始是让它与 您的系统组的 sysObjectID。

    【讨论】:

    • 好的。这是有道理的。在可能的情况下,我正在为要使用 OpenNMS 监控的 python 应用程序编写代码,因此我没有企业 MIB。
    • 在这种情况下使用 unknownProduct,或使用任何其他 OID。管理应用想要解析名称,并可能为已知 ProductID 启用某些功能。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-23
    • 1970-01-01
    • 2015-08-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多