From b4a56af022797779f5f45f59644c50d883e51091 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sun, 17 Nov 2024 10:44:41 +0100 Subject: [PATCH] logcache: only make it an error if all backends are down --- lib/Thruk/Utils/CLI/Logcache.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Thruk/Utils/CLI/Logcache.pm b/lib/Thruk/Utils/CLI/Logcache.pm index 8ddf3bf51..19f9e497a 100644 --- a/lib/Thruk/Utils/CLI/Logcache.pm +++ b/lib/Thruk/Utils/CLI/Logcache.pm @@ -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') {