Files
librenms-librenms/includes/polling/os.inc.php
Richard Mayhew 5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00

42 lines
1.3 KiB
PHP

<?php
if (is_file($config['install_dir'].'/includes/polling/os/'.$device['os'].'.inc.php')) {
// OS Specific
include $config['install_dir'].'/includes/polling/os/'.$device['os'].'.inc.php';
} elseif ($device['os_group'] && is_file($config['install_dir'].'/includes/polling/os/'.$device['os_group'].'.inc.php')) {
// OS Group Specific
include $config['install_dir'].'/includes/polling/os/'.$device['os_group'].'.inc.php';
} else {
echo "Generic :(\n";
}
if ($device['version'] != $version) {
$update_array['version'] = $version;
log_event('OS Version -> ' . $version, $device, 'system');
}
if ($features != $device['features']) {
$update_array['features'] = $features;
log_event('OS Features -> ' . $features, $device, 'system');
}
if ($hardware != $device['hardware']) {
$update_array['hardware'] = $hardware;
log_event('Hardware -> ' . $hardware, $device, 'system');
}
if ($serial != $device['serial']) {
$update_array['serial'] = $serial;
log_event('Serial -> ' . $serial, $device, 'system');
}
if ($icon != $device['icon']) {
$update_array['icon'] = $icon;
log_event('Icon -> ' . $icon, $device, 'system');
}
echo 'Hardware: ' . $hardware . PHP_EOL;
echo 'Version: ' . $version . PHP_EOL;
echo 'Features: ' . $features . PHP_EOL;
echo 'Serial: ' . $serial . PHP_EOL;