fix(tools): collect /var/log/audit/audit.log for debug

main
Tsu-ba-me 9 months ago
parent 53603c0eef
commit 11fd4098c4
  1. 24
      tools/striker-collect-debug

@ -571,6 +571,30 @@ sub collect_remote_data
});
}
print "- Grabbing audit log... ";
$anvil->Storage->rsync({
debug => 2,
source => "root\@".$anvil->data->{peer}{$short_host_name}{access}{ip}.":/var/log/audit/audit.log",
destination => $target_directory."/",
});
$test_file = $target_directory."/audit.log";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { test_file => $test_file }});
if (-e $test_file)
{
print "Done.\n";
}
else
{
print "Failed!\n";
print "- For some reason, this file was not collected.\n";
$anvil->Storage->write_file({
file => $test_file,
body => $failed_body,
overwrite => 1,
backup => 0,
});
}
# If this is a node, grab the shared files.
if ($this_host_type eq "node")
{

Loading…
Cancel
Save