mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Updated poll_device and os module to prettify output (#4740)
* Updated poll_device and os module to prettify output * Move line return
This commit is contained in:
committed by
Tony Murray
parent
eab4ae5ab5
commit
009281773f
@@ -159,7 +159,9 @@ function poll_device($device, $options)
|
|||||||
unset($array);
|
unset($array);
|
||||||
$device_start = microtime(true);
|
$device_start = microtime(true);
|
||||||
// Start counting device poll time
|
// Start counting device poll time
|
||||||
echo $device['hostname'].' '.$device['device_id'].' '.$device['os'].' ';
|
echo 'Hostname: ' . $device['hostname'] . PHP_EOL;
|
||||||
|
echo 'Device ID: ' . $device['device_id'] . PHP_EOL;
|
||||||
|
echo 'OS: ' . $device['os'];
|
||||||
$ip = dnslookup($device);
|
$ip = dnslookup($device);
|
||||||
|
|
||||||
if (!empty($ip) && $ip != inet6_ntop($device['ip'])) {
|
if (!empty($ip) && $ip != inet6_ntop($device['ip'])) {
|
||||||
@@ -173,7 +175,7 @@ function poll_device($device, $options)
|
|||||||
echo ' ('.$device['os_group'].')';
|
echo ' ('.$device['os_group'].')';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n";
|
echo PHP_EOL.PHP_EOL;
|
||||||
|
|
||||||
unset($poll_update);
|
unset($poll_update);
|
||||||
unset($poll_update_query);
|
unset($poll_update_query);
|
||||||
|
|||||||
@@ -35,4 +35,7 @@ if ($icon && $icon != $device['icon']) {
|
|||||||
log_event('Icon -> '.$icon, $device, 'system');
|
log_event('Icon -> '.$icon, $device, 'system');
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\nHardware: ".$hardware.' Version: '.$version.' Features: '.$features.' Serial: '.$serial."\n";
|
echo 'Hardware: ' . $hardware . PHP_EOL;
|
||||||
|
echo 'Version: ' . $version . PHP_EOL;
|
||||||
|
echo 'Features: ' . $features . PHP_EOL;
|
||||||
|
echo 'Serial: ' . $serial . PHP_EOL;
|
||||||
|
|||||||
Reference in New Issue
Block a user