librenms/includes/polling/os/iosxr.inc.php
2015-07-15 11:04:22 +02:00

15 lines
392 B
PHP

<?php
if (preg_match('/^Cisco IOS XR Software \(Cisco ([^\)]+)\),\s+Version ([^\[]+)\[([^\]]+)\]/', $poll_device['sysDescr'], $regexp_result)) {
$hardware = $regexp_result[1];
$features = $regexp_result[3];
$version = $regexp_result[2];
}
else {
// It is not an IOS-XR ... What should we do ?
}
$serial = get_main_serial($device);
echo "\n".$poll_device['sysDescr']."\n";