etingof / snmpfwd

SNMP Proxy Forwarder
http://snmplabs.com/snmpfwd/
BSD 2-Clause "Simplified" License
68 stars 18 forks source link

Extending snmpfwd into a caching proxy? #22

Open Stoatwblr opened 6 years ago

Stoatwblr commented 6 years ago

SNMP polling is great - until every man and his canine companion is polling your devices every 30 seconds. That makes your devices very sad and some devices get much sadder than others (especially network switches, which may spend so much time handling snmp requests that they forget to do their primary job - switching network packets)

It would be great to have snmpfwd able to cache results for a preset (configurable?) period so that when there are a bunch of programs polling a device for the same information in a short period of time it can feed the cached answers back to the pollers instead of killing the device.

etingof commented 6 years ago

Thanks for rising this! Caching may be very reasonable.

In fact, the required infrastructure is hopefully already in place. If you consider working on this, I imagine you could come up with a plugin Python module which would define two functions to be called on passing SNMP request and response. This is where you could read from / populate cache.

I'd happily merge your caching module if you PR it.

I may be able to work on this, however the priority of this work is currently not at the very top. ;-)