Fixed a bug where the wrong string key was used when a network interface comes, goes or changes it's bond_uuid reference. Also changed the alert level of vnetX interfaces that disappear to notice level.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 3 years ago
parent 6db16ca313
commit d62900d712
  1. 8
      scancore-agents/scan-network/scan-network

@ -1437,10 +1437,10 @@ sub check_interfaces
new => $new_bond_name." (".$new_bond_uuid.")", new => $new_bond_name." (".$new_bond_uuid.")",
}; };
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "scan_network_alert_0012", variables => $variables}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => $key, variables => $variables});
$anvil->Alert->register({ $anvil->Alert->register({
alert_level => "warning", alert_level => "warning",
message => "scan_network_alert_0012", message => $key,
variables => $variables, variables => $variables,
set_by => $THIS_FILE, set_by => $THIS_FILE,
}); });
@ -1936,6 +1936,10 @@ sub check_interfaces
rx => $anvil->Convert->add_commas({number => $rx_bytes})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $rx_bytes}).")", rx => $anvil->Convert->add_commas({number => $rx_bytes})." (".$anvil->Convert->bytes_to_human_readable({'bytes' => $rx_bytes}).")",
}; };
# If this a vnet device, it's only a notice message as this is expected when a VM migrates or
# shuts down.
my $alert_level = $network_interface_name =~ /^vnet/ ? "notice" : "warning";
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "scan_network_alert_0059", variables => $variables}); $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "scan_network_alert_0059", variables => $variables});
$anvil->Alert->register({ $anvil->Alert->register({
alert_level => "warning", alert_level => "warning",

Loading…
Cancel
Save