Search code examples
jmxsnmp

issues with snmp table possibilities


I'm curious about the possibilities with tables in SNMP.

I use tables to map MBeans. the MBeans can be created more than once, each time with the same type, but with a different name, consider the following ObjectNames: com.example.test:type=Test,name=Test1 and com.example.test:type=Test,name=Test2) those MBeans have attributes that can be both set and get. But, in order to set values I need the OID, and within a table I don't know the OID in advance.

thus, I'm wondering: (1) is it possible to set values in a table? and if yes, (2) how can it be achieved? (with a basic snmp command, no Java)


Solution

  • Yes, generally it is possible to set values in tables if the MIB and SNMP agent is designed so. SNMP set command is used in the same way as for setting scalar values.

    SNMP tables with variable amount of rows should have rowStatus column that is defined in the RFC 2579. Your description does not provide enough details so it is hard to tell if this is your case. Some explanation of rowStatus is available on SO as well: How to use RowStatus?