0

Python で SNMP エージェントを実装しており、MIB を使用していHOST-RESOURCES-MIBます。設定する必要があるフィールドの 1 つがhrSWRunID. この OID は、状態のタイプProductIDおよび定義であると定義されていますProductID

ProductID :: = TEXTUAL-CONVENTION STATUSの現在の記述、「この原文のコンベンションは特定するのを意図します」

    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 に使用されます -- 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 とは何か、またはあるべきものについて誰かが光を当てることができますか?

4

1 に答える 1

1

ProductID は、エンタープライズ MIB で定義された MIB オブジェクトの OBJECT IDENTIFIER になります。まず、システム グループの sysObjectID と同じにすることをお勧めします。

于 2016-12-29T15:13:53.610 に答える