mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Ignore meraki bad_uptime #4691
This commit is contained in:
@@ -116,7 +116,7 @@ if (isset($config['enable_bgp']) && $config['enable_bgp']) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Device rebooted boxes
|
// Device rebooted boxes
|
||||||
if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== false && $config['uptime_warning'] > 0 && $config['os'][$os]['bad_uptime'] !== true) {
|
if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== false && $config['uptime_warning'] > 0 && $config['os'][$device['os']]['bad_uptime'] !== true) {
|
||||||
if (is_admin() === true || is_read() === true) {
|
if (is_admin() === true || is_read() === true) {
|
||||||
$sql = "SELECT * FROM `devices` AS D WHERE D.status = '1' AND D.uptime > 0 AND D.uptime < '" . $config['uptime_warning'] . "' AND D.ignore = 0 LIMIT " . $config['front_page_down_box_limit'];
|
$sql = "SELECT * FROM `devices` AS D WHERE D.status = '1' AND D.uptime > 0 AND D.uptime < '" . $config['uptime_warning'] . "' AND D.ignore = 0 LIMIT " . $config['front_page_down_box_limit'];
|
||||||
} else {
|
} else {
|
||||||
|
@@ -50,7 +50,7 @@ if ($device["os"] != "edgeswitch") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_numeric($uptime) && $config['os'][$os]['bad_uptime'] !== true) {
|
if (is_numeric($uptime) && ($config['os'][$device['os']]['bad_uptime'] !== true)) {
|
||||||
if ($uptime < $device['uptime']) {
|
if ($uptime < $device['uptime']) {
|
||||||
log_event('Device rebooted after ' . formatUptime($device['uptime']), $device, 'reboot', $device['uptime']);
|
log_event('Device rebooted after ' . formatUptime($device['uptime']), $device, 'reboot', $device['uptime']);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user