Update use of max repeaters to save mysql queries

This commit is contained in:
laf
2016-07-30 15:11:29 +01:00
parent 9e305241fd
commit d722bb6943
3 changed files with 8 additions and 6 deletions

View File

@@ -167,7 +167,7 @@ function snmp_walk($device, $oid, $options=null, $mib=null, $mibdir=null) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}
@@ -234,7 +234,7 @@ function snmpwalk_cache_cip($device, $oid, $array=array(), $mib=0) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}
@@ -309,7 +309,7 @@ function snmp_cache_ifIndex($device) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}
@@ -473,7 +473,7 @@ function snmpwalk_cache_twopart_oid($device, $oid, $array, $mib=0) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}
@@ -531,7 +531,7 @@ function snmpwalk_cache_threepart_oid($device, $oid, $array, $mib=0) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}
@@ -593,7 +593,7 @@ function snmp_cache_slotport_oid($oid, $device, $array, $mib=0) {
}
else {
$snmpcommand = $config['snmpbulkwalk'];
$max_repeaters = get_dev_attrib($device, 'snmp_max_repeaters');
$max_repeaters = $device['snmp_max_repeaters'];
if ($max_repeaters > 0) {
$snmpcommand .= " -Cr$max_repeaters ";
}