From cd698cdcc7df1603d94c5367e7147d9fbc09fda1 Mon Sep 17 00:00:00 2001 From: Larry Adams Date: Sat, 14 Mar 2009 12:59:35 +0000 Subject: [PATCH] -bug#0001346: Strip out noisy 'No Such Instance currently exists at this OID' git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/cacti/branches/0.8.7@4946 860744bd-22fc-0310-8c96-e9fe5004b5ca --- docs/CHANGELOG | 1 + lib/snmp.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 5adad3dd4..f0271668f 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,7 @@ Cacti CHANGELOG -bug#0001405: Spaces in DS when .rrd file is created, so it fails -bug#0001407: Place graph thumbnail into div to lower page length changes on load graphs -bug#0001411: Graph Search Trouble with Cacti 8.7d +-bug#0001346: Strip out noisy 'No Such Instance currently exists at this OID' -bug: Top Graph Header Breaks When Plugins Used 0.8.7d diff --git a/lib/snmp.php b/lib/snmp.php index 27fa8a662..9d24ae561 100644 --- a/lib/snmp.php +++ b/lib/snmp.php @@ -344,6 +344,10 @@ function cacti_snmp_walk($hostname, $community, $oid, $version, $username, $pass function format_snmp_string($string, $snmp_oid_included) { $string = eregi_replace(REGEXP_SNMP_TRIM, "", trim($string)); + if (substr($string, 0, 7) == "No Such") { + return ""; + } + if ($snmp_oid_included) { /* strip off all leading junk (the oid and stuff) */ $string_array = explode("=", $string);