mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add jetdirect support, fix automatic type assignment
git-svn-id: http://www.observium.org/svn/observer/trunk@1283 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -13,11 +13,11 @@ $valid_toner = array();
|
||||
|
||||
echo("Toner : ");
|
||||
|
||||
if ($device['os'] == "dell-laser")
|
||||
if ($device['os'] == "dell-laser" || $device['os'] == "jetdirect")
|
||||
{
|
||||
$oids = trim(snmp_walk($device, "SNMPv2-SMI::mib-2.43.12.1.1.2.1 ", "-OsqnU"));
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
if ($oids) echo("Dell ");
|
||||
if ($oids) echo("Jetdirect ");
|
||||
foreach(explode("\n", $oids) as $data)
|
||||
{
|
||||
$data = trim($data);
|
||||
@@ -35,7 +35,7 @@ if ($device['os'] == "dell-laser")
|
||||
$current = snmp_get($device, $toner_oid, "-Oqv");
|
||||
$capacity = snmp_get($device, $capacity_oid, "-Oqv");
|
||||
$current = $current / $capacity * 100;
|
||||
$type = "dell-laser";
|
||||
$type = "jetdirect";
|
||||
echo discover_toner($valid_toner,$device, $toner_oid, $index, $type, $descr, $capacity, $current);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,13 @@ $config['os']['dell-laser']['overtext'] = "Toner";
|
||||
$config['os']['dell-laser']['ifname'] = 1;
|
||||
$config['os']['dell-laser']['type'] = "printer";
|
||||
|
||||
$config['os']['jetdirect']['group'] = "printer";
|
||||
$config['os']['jetdirect']['text'] = "HP Printer";
|
||||
$config['os']['jetdirect']['overgraph'][] = "device_toner";
|
||||
$config['os']['jetdirect']['overtext'] = "Toner";
|
||||
$config['os']['jetdirect']['ifname'] = 1;
|
||||
$config['os']['jetdirect']['type'] = "printer";
|
||||
|
||||
$config['os']['3com']['text'] = "3Com";
|
||||
$config['os']['3com']['overgraph'][] = "";
|
||||
$config['os']['3com']['overtext'] = "";
|
||||
|
||||
Reference in New Issue
Block a user