librenms-librenms/includes/polling/os/canonprinter.inc.php
Tony Murray edbb6ae0e3 refactor: Centralize MIB include directory specification (#4603)
* refactor: Centralize MIB include directory specification
The default is now:
```
$config['mib_dir'].'/mibdirname:'.$config['mib_dir']
```
This means we exclude OS mibs and only use ours  (we could prepend `+` if we want to include os mibs.
All snmp calls should only include the name of the subdirectory under the mibs directory.

* Remove d_echo from Proc
Fix snmpsim tests.
2016-09-28 14:19:28 +01:00

14 lines
550 B
PHP

<?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);