Added a preg_replace to get rid of snmp errors

This commit is contained in:
laf
2014-11-06 21:12:42 +00:00
parent 638ea2fa64
commit 3f2b39550f

View File

@@ -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);
}