mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-10 07:14:30 +02:00
cluster-zone: consider own zone connected if there's only one endpoint
... because in this case only the checking node can be (not) connected to itself. refs #8570
This commit is contained in:
parent
5f548c8f89
commit
b90b77b275
@ -139,7 +139,10 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
|
|||||||
double bytesSentPerSecond = 0;
|
double bytesSentPerSecond = 0;
|
||||||
double bytesReceivedPerSecond = 0;
|
double bytesReceivedPerSecond = 0;
|
||||||
|
|
||||||
for (const Endpoint::Ptr& endpoint : zone->GetEndpoints()) {
|
{
|
||||||
|
auto endpoints (zone->GetEndpoints());
|
||||||
|
|
||||||
|
for (const Endpoint::Ptr& endpoint : endpoints) {
|
||||||
if (endpoint->GetConnected())
|
if (endpoint->GetConnected())
|
||||||
connected = true;
|
connected = true;
|
||||||
|
|
||||||
@ -160,6 +163,11 @@ void ClusterZoneCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const Che
|
|||||||
bytesReceivedPerSecond += endpoint->GetBytesReceivedPerSecond();
|
bytesReceivedPerSecond += endpoint->GetBytesReceivedPerSecond();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!connected && endpoints.size() == 1u && *endpoints.begin() == Endpoint::GetLocalEndpoint()) {
|
||||||
|
connected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ServiceState state;
|
ServiceState state;
|
||||||
String output;
|
String output;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user