Files
librenms-librenms/includes/polling/os/omnitron-iconverter.inc.php
vivia11 7eb107acb9 Added additional sensors to omnitron iconverter (#8806)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-06-07 00:00:46 +01:00

17 lines
459 B
PHP

<?php
// SNMPv2-MIB::sysDescr.1 = STRING: "Omnitron iConverter GM4-HPOE 8991T14F v4.5.28 s/n 00711452 - [x]"
$description = $device['sysDescr'];
preg_match('~Omnitron\siConverter\s(?\'hardware\'.*?)\s(?\'version\'v.*) s\/n~', $description, $matches);
if ($matches['hardware']) {
$hardware = $matches['hardware'];
}
if ($matches['version']) {
$version = $matches['version'];
}
$serial = snmp_get($device, 'serialnum.1.1', '-Ovq', 'OMNITRON-MIB');