mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3800 from murrant/rrd-create-remote
RRD Cleanup: centralize rrd_exists check, utilize data_update() and rrd_name()
This commit is contained in:
@@ -256,7 +256,7 @@ foreach (dbFetchRows("SELECT * FROM `bgpPeers` WHERE `device_id` = ? $extra_sql
|
||||
case 'macaccounting_bits':
|
||||
case 'macaccounting_pkts':
|
||||
$acc = dbFetchRow('SELECT * FROM `ipv4_mac` AS I, `mac_accounting` AS M, `ports` AS P, `devices` AS D WHERE I.ipv4_address = ? AND M.mac = I.mac_address AND P.port_id = M.port_id AND D.device_id = P.device_id', array($peer['bgpPeerIdentifier']));
|
||||
$database = $config['rrd_dir'].'/'.$device['hostname'].'/cip-'.$acc['ifIndex'].'-'.$acc['mac'].'.rrd';
|
||||
$database = rrd_name($device['hostname'], array('cip', $acc['ifIndex'], $acc['mac']));
|
||||
if (is_array($acc) && is_file($database)) {
|
||||
$peer['graph'] = 1;
|
||||
$graph_array['id'] = $acc['ma_id'];
|
||||
|
Reference in New Issue
Block a user