mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Merge pull request #346 from laf/issue-laf-84
Added a preg_replace to get rid of snmp errors for bgp graphs
This commit is contained in:
@@ -149,6 +149,7 @@ if ($config['enable_bgp'])
|
||||
|
||||
if ($debug) { echo("$cbgp_cmd\n"); }
|
||||
$cbgp_data = preg_replace("/^OID.*$/", "", trim(`$cbgp_cmd`));
|
||||
$cbgp_data = preg_replace("/No Such Instance currently exists at this OID/", "0", $cbgp_data);
|
||||
if ($debug) { echo("$cbgp_data\n"); }
|
||||
list($cbgpPeerAcceptedPrefixes,$cbgpPeerDeniedPrefixes,$cbgpPeerPrefixAdminLimit,$cbgpPeerPrefixThreshold,$cbgpPeerPrefixClearThreshold,$cbgpPeerAdvertisedPrefixes,$cbgpPeerSuppressedPrefixes,$cbgpPeerWithdrawnPrefixes) = explode("\n", $cbgp_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user