Skip to content

Commit

Permalink
logcache: only make it an error if all backends are down
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Nov 17, 2024
1 parent 648d571 commit b4a56af
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Thruk/Utils/CLI/Logcache.pm
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ sub cmd {
my $res = 'successfully';
if(scalar @{$errors} > 0) {
$res = 'with '.scalar @{$errors}.' errors';
($rc, $msg) = (1, 'ERROR');
if($num_sites == scalar @{$errors}) {
($rc, $msg) = (1, 'ERROR');
} else {
($rc, $msg) = (0, 'WARNING');
}
}

if($mode eq 'drop') {
Expand Down

0 comments on commit b4a56af

Please sign in to comment.