mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 08:02:51 +02:00
Merge pull request #2687 from fiveninedigital/canon-printer
Canon printer support
This commit is contained in:
@@ -77,4 +77,5 @@ Contributors to LibreNMS:
|
||||
- Ruairi Carroll <ruairi.carroll@gmail.com> (rucarrol)
|
||||
- Maxim Tsyplakov <maxim.tsyplakov@gmail.com> (tsypa)
|
||||
- D. Britz <github@wrind.de> (flatterlight)
|
||||
- Tobias Herrmann <tobias@fiveninedigital.ch> (Mightea)
|
||||
[1]: http://observium.org/ "Observium web site"
|
||||
|
||||
@@ -1157,7 +1157,14 @@ $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 ='canonprinter';
|
||||
$config['os'][$os]['group'] = 'printer';
|
||||
$config['os'][$os]['text'] = 'Canon 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,7 @@
|
||||
<?php
|
||||
if (!$os) {
|
||||
// Canon Multifunction Printer/Scanner
|
||||
if (strstr($sysDescr, 'Canon MF')) {
|
||||
$os = 'canonprinter';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
// SNMPv2-SMI::enterprises.1602.1.1.1.1.0 = STRING: "MF8500C Series"
|
||||
$hardware = trim(snmp_get($device, 'SNMPv2-SMI::enterprises.1602.1.1.1.1.0', '-OQv', '', ''), '" ');
|
||||
|
||||
// SNMPv2-SMI::mib-2.43.5.1.1.17.1 = STRING: "QJY44712"
|
||||
$serial = trim(snmp_get($device, 'SNMPv2-SMI::mib-2.43.5.1.1.17.1', '-OQv', '', ''), '" ');
|
||||
|
||||
// SNMPv2-SMI::enterprises.1602.1.1.1.4.0 = STRING: "03.03"
|
||||
$version = trim(snmp_get($device, 'SNMPv2-SMI::enterprises.1602.1.1.1.4.0', '-OQv', '', ''), '" ');
|
||||
|
||||
// Strip off useless brand fields
|
||||
$hardware = str_ireplace(' Series', '', $hardware);
|
||||
Reference in New Issue
Block a user