mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #2854 from laf/issue-2810
Added Lexmark printer support
This commit is contained in:
BIN
html/images/os/lexmark.png
Normal file
BIN
html/images/os/lexmark.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@@ -1178,6 +1178,14 @@ $config['os'][$os]['type'] = 'printer';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_toner';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Toner';
|
||||
|
||||
$os ='lexmarkprinter';
|
||||
$config['os'][$os]['group'] = 'printer';
|
||||
$config['os'][$os]['text'] = 'Lexmark Printer';
|
||||
$config['os'][$os]['type'] = 'printer';
|
||||
$config['os'][$os]['icon'] = 'lexmark';
|
||||
$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/lexmarkprinter.inc.php
Normal file
6
includes/discovery/os/lexmarkprinter.inc.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'Lexmark ')) {
|
||||
$os = 'lexmarkprinter';
|
||||
}
|
||||
}
|
4
includes/polling/os/lexmarkprinter.inc.php
Normal file
4
includes/polling/os/lexmarkprinter.inc.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
preg_match('/^Lexmark ([a-zA-Z0-9]+) version/', $poll_device['sysDescr'], $result);
|
||||
$hardware = $result[1];
|
Reference in New Issue
Block a user