Search code examples
linuxsnmpraspberry-pi

Create a Custom SNMP OID On Linux


I have built a prototype board for a raspberry pi, and I would like to create a custom snmp OID that I can talk to, that will give me feed back from my device.

I can get the value back from my device, but I'm not sure where to start with creating a custom OID, registering it and then updating it.

Has anyone got any good places to start, tutorials, example code etc.

Cheers Luke


Solution

  • The official channel would be to register for a 'Private Enterprise Number' via this link:

    http://pen.iana.org/pen/PenApplication.page

    After the approval process, you'll receive an OID which you can further branch out and create entire sub-trees of OIDs.

    That said, as an individual, you can probably make do with any valid OID for testing purposes.

    The "Which OIDs should you use?" section from the following Apache Directory Service article is a useful read:

    http://directory.apache.org/apacheds/1.5/31-add-your-first-elements-to-the-schema.html

    A related question mentions a UUID approach to OID:

    SNMP: Create custom OID