mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 14:44:32 +02:00
Merge pull request #7126 from Icinga/bugfix/replay-logs-6932
ApiListener#ApiTimerHandler(): delete all replayed logs
This commit is contained in:
commit
5fb191bbeb
@ -741,11 +741,19 @@ void ApiListener::ApiTimerHandler()
|
|||||||
|
|
||||||
for (int ts : files) {
|
for (int ts : files) {
|
||||||
bool need = false;
|
bool need = false;
|
||||||
|
auto localZone (GetLocalEndpoint()->GetZone());
|
||||||
|
|
||||||
for (const Endpoint::Ptr& endpoint : ConfigType::GetObjectsByType<Endpoint>()) {
|
for (const Endpoint::Ptr& endpoint : ConfigType::GetObjectsByType<Endpoint>()) {
|
||||||
if (endpoint == GetLocalEndpoint())
|
if (endpoint == GetLocalEndpoint())
|
||||||
continue;
|
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())
|
if (endpoint->GetLogDuration() >= 0 && ts < now - endpoint->GetLogDuration())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user