Update scan-server to only alert on large boot time changes

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 54a437d9a3
commit 51978e1609
  1. 10
      scancore-agents/scan-server/scan-server

@ -821,6 +821,15 @@ sub collect_data
}
}
if ($server_boot_time ne $old_server_boot_time)
{
# What's the difference? If it's only a few seconds, don't do anything.
$server_boot_time = 1 if not $server_boot_time;
$old_server_boot_time = 1 if not $old_server_boot_time;
my $diffrerence = $server_boot_time - $old_server_boot_time;
$diffrerence =~ s/^-//;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { diffrerence => $diffrerence }});
if ($diffrerence > 5)
{
# Boot time changed (expected on shut down or boot up)
my $variables = {
@ -835,6 +844,7 @@ sub collect_data
$update = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { update => $update }});
}
}
if ($server_anvil_uuid ne $old_server_anvil_uuid)
{
# Moved between Anvil! systems

Loading…
Cancel
Save