Monks,
I'm in somewhat of a predicament, and hope you can help me out. I work for a Windows-only shop, and in this shop there's a Web balancer who spits out stats via SNMP on a non-standard port. I'm graphing certain stats via MRTG and all is well.
The problem is, when this machine reboots, most of the OIDs change, and thus I have to walk through a bunch of GetIfs to get it back to working properly.
The way it works is I'll have one OID, such as .1.3.6.1.4.1.140.625.190.1.40, and that OID points to several other OIDS that I need to map, like
.1.3.6.1.4.1.140.625.190.1.40.32.101.100.100.54.56.99.54.100.51.52.102
+.98.50.57.98.97.56.102.57.49.57.50.48.54.53.56.55.48.101.52.49.49.
I can't really script this via Win tools, as there really isn't any command line tools on Win that allow querying of an SNMP device that isn't using a standard port - but I see Net::SNMP does.
I'm looking for a way to query the device, retrieve the OIDs it's pointing to, and stick them in a MRTG config file. I plan on run it every hour or so, so it should look and see if the new OIDs it finds are the same as the ones in the config - if they are, it dies, other wise it does as above.
My problem is I really don't know much of Perl, nor the modules. So I'm looking for as much help as I can get! Thanks in advance!
Edit by tye, put CODE tags around long string