Skip to content
Nov 22 / Greg

Cacti Polling Issues – OID Not Increasing

I’ve run into this a couple of times and finally fixed it…err…well…bypassed it.

Some devices don’t properly respond to snmpwalk requests. Net-snmp will return the following error:

1
Error: OID not increasing:

Net-snmp has a command line parameter that will ignore this “-Cc”. Though you run the risk of having an object loop indefinately when you use this parameter, so exercise caution. To get cacti to use it, you need to edit the snmp.php file:

/var/www/html/lib/snmp.php

Change this:

1
2
3
$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -v$version -t $timeout -r $retries $hostname:$port $snmp_auth $oid");
 
$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -O Qn $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid");

To this:

1
2
3
$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -Cc -v$version -t $timeout -r $retries $hostname:$port $snmp_auth $oid");
 
$temp_array = exec_into_array(read_config_option("path_snmpwalk") . " -Cc -O Qn $snmp_auth -v $version -t $timeout -r $retries $hostname:$port $oid");
Leave a Comment

 

*