mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added a preg_replace to get rid of snmp errors
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