I'm implementing an SNMP agent in python and am using the MIB HOST-RESOURCES-MIB
. One of the fields that I need to set is hrSWRunID
. This OID is defined to be of type ProductID
and the definition for ProductID
states
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 }
From this I assumed that a value of com.mycompany.mydepartment.myapp.appversion
would suffice but when I run the code it fails with an error ProductID: invalid literal for int() with base 0: 'com'\n"]
With a bit of experimentation I finally managed to run my code with a ProductID set to a set of numbers such as {1, 2, 3}
.Although my code now works I'm no clearer on what a correct value should be.
Can anyone shed any light on what ProductID is or should be?
The ProductID would be the OBJECT IDENTIFIER of a MIB object defined under your enterprise MIB. A good start would be to make it the same as the sysObjectID of your system group.