mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2680 from flatterlight/samsung-printer
Samsung printer v2
This commit is contained in:
@@ -74,6 +74,7 @@ Contributors to LibreNMS:
|
||||
- Rick Hodger <rick@fuzzi.org.uk> (Tatermen)
|
||||
- Eldon Koyle <ekoyle@gmail.com> (ekoyle)
|
||||
- Jonathan Bailey <jcbailey@code0.net> (jcbailey2)
|
||||
- Ruairi Carroll <ruairi.carroll@gmail.com> (rucarrol)
|
||||
- Ruairi Carroll <ruairi.carroll@gmail.com> (rucarrol)
|
||||
- Maxim Tsyplakov <maxim.tsyplakov@gmail.com> (tsypa)
|
||||
- D. Britz <github@wrind.de> (flatterlight)
|
||||
[1]: http://observium.org/ "Observium web site"
|
||||
|
||||
BIN
html/images/os/samsungprinter.png
Normal file
BIN
html/images/os/samsungprinter.png
Normal file
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';
|
||||
|
||||
6
includes/discovery/os/samsungprinter.inc.php
Normal file
6
includes/discovery/os/samsungprinter.inc.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Samsung CLX')) {
|
||||
$os = 'samsungprinter';
|
||||
}
|
||||
}
|
||||
12
includes/polling/os/samsungprinter.inc.php
Normal file
12
includes/polling/os/samsungprinter.inc.php
Normal file
@@ -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