...
Cisco published a great article on this, SNMP Counters: Frequently Asked Questions. The , RFC 2233 summarises this wellbest:
"As the speed of network media increase, the minimum time in which a 32 bit counter will wrap decreases. For example, a 10Mbs stream of back-to-back, full-size packets causes ifInOctets to wrap in just over 57 minutes; at 100Mbs, the minimum wrap time is 5.7 minutes, and at 1Gbs, the minimum is 34 seconds. Requiring that interfaces be polled frequently enough not to miss a counter wrap is increasingly problematic."
The Problem
Despite this interesting bit of history, some Network Vendors, only support SNMPv1, which isn't a problem, unless you have high speed interfaces, for example 1 gigabit per second, which these vendors to have, funnily enough these same vendors companies have only existed for 10-15 years, so are younger than the standards they should be implementing, yet they implement something which is completely outdated.
So we have NMIS which is Open Source and by the nature of Open Source and of software using IETF protocols and specifications, NMIS is standards based.
Make NMIS work with SNMPv1 using 64 bit counters
NMIS itself is not strongly typed, the issue here is with the SNMP libraries NMIS uses.
How will I know I need to change NMIS?
...
If you see this you have devices cheating and using an unsupported a non standard combination.
What to change
Code Block |
---|
find /usr/local/ -name Message.pm |
The result would be something like this:
Code Block |
---|
[root@nmis models]# find /usr/local/ -name Message.pm
/usr/local/share/perl5/Net/LDAP/Message.pm
/usr/local/share/perl5/Net/SNMP/Message.pm
/usr/local/share/perl5/Mojo/Message.pm
/usr/local/share/perl5/HTTP/Message.pm |
We are after the one for the class Net::SNMP::Message so the file we want (translating :: to /) is /usr/local/share/perl5/Net/SNMP/Message.pm, first thing, make a backup.
Code Block |
---|
1650 sub _process_counter64 1651 { 1652 my ($this, $type) = @_; 1653 1654 # Verify the SNMP version 1655 #if ($this->{_version} == SNMP_VERSION_1) { 1656 # return $this->_error('The Counter64 type is not supported in SNMPv1'); 1657 #} #1658 Decode the length 1659 return $this->_error() if !defined(my $length = $this->_process_length()); # Decode the length |
That's it, run your NMIS update on the node in question, this will verify the code compiles and that NMIS works and should solve your problem, if you get crazy Perl errors, restore your backup and try the edit again.