toner graphing

git-svn-id: http://www.observium.org/svn/observer/trunk@1016 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-03-12 18:13:30 +00:00
parent 116f846470
commit 7087782cdb
5 changed files with 66 additions and 2 deletions
+1
View File
@@ -32,6 +32,7 @@ if ($device['os'] == "dell-laser")
$descr = str_replace('"','',snmp_get($device, $descr_oid, "-Oqv"));
$current = snmp_get($device, $toner_oid, "-Oqv");
$capacity = snmp_get($device, $capacity_oid, "-Oqv");
$current = $current / $capacity * 100;
$type = "dell-laser";
echo discover_toner($device, $toner_oid, $index, $type, $descr, $capacity, $current);
$toner_exists[$type][$index] = 1;
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
if ($config['show_printers'])
if ($config['enable_printers'])
{
$query = "SELECT * FROM toner WHERE device_id = '" . $device['device_id'] . "'";
$toner_data = mysql_query($query);