我在 HOST-RESOURCES-MIB 中将 ProductID 设置为什么

What do I set ProductID to in HOST-RESOURCES-MIB

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

ProductID ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "This textual convention is intended to identify the

    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 will be used for any unknown ProductID -- unknownProduct OBJECT IDENTIFIER ::= { 0 0 }

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

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

谁能阐明 ProductID 是什么或应该是什么?

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