mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Don't do unneeded snmp queries (#7841)
* Don't do uneeded snmp queries sensors discovery 26 -> 16 wrapped some poller modules in db checks. The same could be done for some others, but more work is needed. * travis fix
This commit is contained in:
committed by
Neil Lathwood
parent
5405498ed6
commit
b9dc7773d7
@@ -5,7 +5,9 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
if ($device['os_group'] == 'cisco') {
|
||||
// FIXME - seems to be broken. IPs appear with leading zeroes.
|
||||
$ipsec_array = snmpwalk_cache_oid($device, 'cipSecTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
|
||||
$ike_array = snmpwalk_cache_oid($device, 'cikeTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
|
||||
if (!empty($ipsec_array)) {
|
||||
$ike_array = snmpwalk_cache_oid($device, 'cikeTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
|
||||
}
|
||||
|
||||
$tunnels_db = dbFetchRows('SELECT * FROM `ipsec_tunnels` WHERE `device_id` = ?', array($device['device_id']));
|
||||
foreach ($tunnels_db as $tunnel) {
|
||||
|
||||
Reference in New Issue
Block a user