mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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`
17 lines
459 B
PHP
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');
|