Cluster: Add timestamp to "ExecuteCommand" and "CheckResult"

This commit is contained in:
Noah Hilverling 2020-11-12 16:16:36 +01:00
parent a30077cdd1
commit 925cfb6c64
2 changed files with 6 additions and 0 deletions

View File

@ -538,6 +538,9 @@ void Checkable::ExecuteCheck()
message->Set("jsonrpc", "2.0");
message->Set("method", "event::ExecuteCommand");
double ts = Utility::GetTime();
message->Set("ts", ts);
Host::Ptr host;
Service::Ptr service;
tie(host, service) = GetHostService(this);

View File

@ -57,6 +57,9 @@ Dictionary::Ptr ClusterEvents::MakeCheckResultMessage(const Checkable::Ptr& chec
message->Set("jsonrpc", "2.0");
message->Set("method", "event::CheckResult");
double ts = Utility::GetTime();
message->Set("ts", ts);
Host::Ptr host;
Service::Ptr service;
tie(host, service) = GetHostService(checkable);