I have equipment that is non SNMP-enabled. I have the API to get its status and am implementing an SNMP agent for it. I did that with SNMP4j and can answer GET requests and send traps.
The problem I have is that there are several (2) such equipments to monitor with the same instance of my program. So far, I added a branch for each equipment in the MIB like 1.3.6.1.4.1.PEN.devices.1.xxx
and 1.3.6.1.4.1.PEN.devices.2.xxx
but 1-that's ugly and 2-I can't give a MIB usable for each equipment but a single MIB for the whole System with redundant information and that's also ugly ;)
I'm not sure if the MIB Table
object is suitable for that, but it doesn't sound like the way to go (I have a fixed number of equipment). I also saw that RFC 3413 §3.5 describes SNMP proxy forwarder but I'm not sure it is what I need to implement (my equipments are not SNMP-enabled), and SNMP4j ProxyForwarder
seems to map a MIB to another MIB.
With SNMP4j, I implemented the processPDU()
method of the CommandResponder
interface and I was hoping that, if the Supervision software is configured to use my program as a "proxy forwarder", there could be some information available in the CommandResponderEvent
for me to send the correct response PDU (though I didn't find any such thing, I might have missed something).
I could start several instances of my agent (one per equipment) but I'd rather not for sparse ressources reasons. What would be the best way to tackle that problem? Table? Proxy? Other? Not possible?
EDIT:
I have found that some NNM add an extra Variable Binding in the GET request to indicate which equipment to address (SNMP-proxy-like), while some other map the equipment by changing the community in the GET. Are these viable options? Which one is the most common/acceptable?