mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-24 22:24:44 +02:00
ApiListener#ApiTimerHandler(): delete all replayed logs
refs #6932 (cherry picked from commit 9b489cf9b9347fbce5f5f268d83bba556467e2e9)
This commit is contained in:
parent
b623274918
commit
511772e08a
@ -694,11 +694,19 @@ void ApiListener::ApiTimerHandler()
|
||||
|
||||
for (int ts : files) {
|
||||
bool need = false;
|
||||
auto localZone (GetLocalEndpoint()->GetZone());
|
||||
|
||||
for (const Endpoint::Ptr& endpoint : ConfigType::GetObjectsByType<Endpoint>()) {
|
||||
if (endpoint == GetLocalEndpoint())
|
||||
continue;
|
||||
|
||||
auto zone (endpoint->GetZone());
|
||||
|
||||
/* only care for endpoints in a) the same zone b) our parent zone c) immediate child zones */
|
||||
if (!(zone == localZone || zone == localZone->GetParent() || zone->GetParent() == localZone)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (endpoint->GetLogDuration() >= 0 && ts < now - endpoint->GetLogDuration())
|
||||
continue;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user