Merge pull request #7676 from Icinga/feature/icingadb-localendpoint-id

IcingaDB#GetStats(): add endpoint_id to IcingaApplication
This commit is contained in:
Noah Hilverling 2019-12-06 16:59:36 +01:00 committed by GitHub
commit f0b8892e4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -38,6 +38,15 @@ Dictionary::Ptr IcingaDB::GetStats()
}));
}
auto localEndpoint (Endpoint::GetLocalEndpoint());
if (localEndpoint) {
typedef Dictionary::Ptr DP;
DP(DP(DP(DP(stats->Get("IcingaApplication"))->Get("status"))->Get("icingaapplication"))->Get("app"))
->Set("endpoint_id", GetObjectIdentifier(localEndpoint));
}
return stats;
}