mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
added suport for samsung printer
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -1063,6 +1063,7 @@ $config['os'][$os]['icon'] = 'comet';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_temperature';
|
||||
$config['os'][$os]['over'][0]['text'] = 'temperature';
|
||||
|
||||
//printer
|
||||
$os = 'dell-laser';
|
||||
$config['os'][$os]['group'] = 'printer';
|
||||
$config['os'][$os]['text'] = 'Dell Laser';
|
||||
@@ -1150,6 +1151,13 @@ $config['os'][$os]['over'][0]['text'] = 'Toner';
|
||||
$config['os'][$os]['ifname'] = 1;
|
||||
$config['os'][$os]['type'] = 'printer';
|
||||
|
||||
$os ='samsungprinter';
|
||||
$config['os'][$os]['group'] = 'printer';
|
||||
$config['os'][$os]['text'] = 'Samsung Printer';
|
||||
$config['os'][$os]['type'] = 'printer';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_toner';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Toner';
|
||||
|
||||
$os = '3com';
|
||||
$config['os'][$os]['text'] = '3Com';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Samsung CLX')) {
|
||||
$os = 'samsungprinterOS';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
// private::enterprises.236.11.5.11.53.31.1.4.0 = STRING: "CLX-3170 Series"
|
||||
$hardware = trim(snmp_get($device, '1.3.6.1.4.1.236.11.5.11.53.31.1.4.0', '-OQv', '', ''), '" ');
|
||||
// mgnt::mib-2.43.5.1.1.17.1 = STRING: "QUV960066FJ124"
|
||||
$serial = trim(snmp_get($device, '1.3.6.1.2.1.43.5.1.1.17.1', '-OQv', '', ''), '" ');
|
||||
// mgnt::mib-2.1.1 = STRING: "Samsung CLX-3170 Series;V1.00.01.64 Sep-27-2010;Engine 1.77.81;NIC V4.01.20(CLX-3170) 02-05-2010;S/N JFJIUTM748HJGK983"
|
||||
$osin = trim(snmp_get($device, '1.3.6.1.2.1.1.1', '-OQv', '', ''), '" ');
|
||||
//$osin = "Samsung CLX-3170 Series;V1.00.01.64 Sep-27-2010;Engine 1.77.81;NIC V4.01.20(CLX-3170) 02-05-2010;S/N JFJIUTM748HJGK983";
|
||||
$osar = preg_split('/;S\/N [A-Z0-9]+/',$osin,-1);
|
||||
$os = array_shift($osar);
|
||||
//print_r($osar);
|
||||
//echo $os;
|
||||
Reference in New Issue
Block a user