From e33c1f0de11253a2575145588c0bf2f245baf264 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 6 May 2012 19:57:28 +0000 Subject: [PATCH] only repoll capacity when oid is in database git-svn-id: http://www.observium.org/svn/observer/trunk@3139 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/toner.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/polling/toner.inc.php b/includes/polling/toner.inc.php index e7c5c07488..12b699a783 100755 --- a/includes/polling/toner.inc.php +++ b/includes/polling/toner.inc.php @@ -8,7 +8,10 @@ if ($config['enable_printers']) { echo("Checking toner " . $toner['toner_descr'] . "... "); - $toner['toner_capacity'] = snmp_get($device, $toner['toner_capacity_oid'], "-OUqnv"); + if ($toner['toner_capacity_oid']) # FIXME this if can go on 1-Sep-2012 + { + $toner['toner_capacity'] = snmp_get($device, $toner['toner_capacity_oid'], "-OUqnv"); + } $tonerperc = round(snmp_get($device, $toner['toner_oid'], "-OUqnv") / $toner['toner_capacity'] * 100); $old_tonerrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("toner-" . $toner['toner_descr'] . ".rrd");