"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/icinga/apievents.cpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

apievents.cpp  (icinga2-2.11.5):apievents.cpp  (icinga2-2.12.0)
skipping to change at line 185 skipping to change at line 185
for (const EventQueue::Ptr& queue : queues) { for (const EventQueue::Ptr& queue : queues) {
queue->ProcessEvent(result); queue->ProcessEvent(result);
} }
inboxes.Push(std::move(result)); inboxes.Push(std::move(result));
} }
void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable, void ApiEvents::AcknowledgementSetHandler(const Checkable::Ptr& checkable,
const String& author, const String& comment, AcknowledgementType type, const String& author, const String& comment, AcknowledgementType type,
bool notify, bool persistent, double expiry, const MessageOrigin::Ptr& or igin) bool notify, bool persistent, double, double expiry, const MessageOrigin: :Ptr& origin)
{ {
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Ackno wledgementSet"); std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Ackno wledgementSet");
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Acknowled gementSet)); auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Acknowled gementSet));
if (queues.empty() && !inboxes) if (queues.empty() && !inboxes)
return; return;
Log(LogDebug, "ApiEvents", "Processing event type 'AcknowledgementSet'.") ; Log(LogDebug, "ApiEvents", "Processing event type 'AcknowledgementSet'.") ;
Dictionary::Ptr result = new Dictionary(); Dictionary::Ptr result = new Dictionary();
skipping to change at line 224 skipping to change at line 224
result->Set("persistent", persistent); result->Set("persistent", persistent);
result->Set("expiry", expiry); result->Set("expiry", expiry);
for (const EventQueue::Ptr& queue : queues) { for (const EventQueue::Ptr& queue : queues) {
queue->ProcessEvent(result); queue->ProcessEvent(result);
} }
inboxes.Push(std::move(result)); inboxes.Push(std::move(result));
} }
void ApiEvents::AcknowledgementClearedHandler(const Checkable::Ptr& checkable, c onst MessageOrigin::Ptr& origin) void ApiEvents::AcknowledgementClearedHandler(const Checkable::Ptr& checkable, c onst String& removedBy, double, const MessageOrigin::Ptr& origin)
{ {
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Ackno wledgementCleared"); std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Ackno wledgementCleared");
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Acknowled gementCleared)); auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::Acknowled gementCleared));
if (queues.empty() && !inboxes) if (queues.empty() && !inboxes)
return; return;
Log(LogDebug, "ApiEvents", "Processing event type 'AcknowledgementCleared '."); Log(LogDebug, "ApiEvents", "Processing event type 'AcknowledgementCleared '.");
Dictionary::Ptr result = new Dictionary(); Dictionary::Ptr result = new Dictionary();
skipping to change at line 248 skipping to change at line 248
Host::Ptr host; Host::Ptr host;
Service::Ptr service; Service::Ptr service;
tie(host, service) = GetHostService(checkable); tie(host, service) = GetHostService(checkable);
result->Set("host", host->GetName()); result->Set("host", host->GetName());
if (service) if (service)
result->Set("service", service->GetShortName()); result->Set("service", service->GetShortName());
result->Set("state", service ? static_cast<int>(service->GetState()) : st atic_cast<int>(host->GetState())); result->Set("state", service ? static_cast<int>(service->GetState()) : st atic_cast<int>(host->GetState()));
result->Set("state_type", checkable->GetStateType()); result->Set("state_type", checkable->GetStateType());
result->Set("acknowledgement_type", AcknowledgementNone);
for (const EventQueue::Ptr& queue : queues) { for (const EventQueue::Ptr& queue : queues) {
queue->ProcessEvent(result); queue->ProcessEvent(result);
} }
result->Set("acknowledgement_type", AcknowledgementNone);
inboxes.Push(std::move(result)); inboxes.Push(std::move(result));
} }
void ApiEvents::CommentAddedHandler(const Comment::Ptr& comment) void ApiEvents::CommentAddedHandler(const Comment::Ptr& comment)
{ {
std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Comme ntAdded"); std::vector<EventQueue::Ptr> queues = EventQueue::GetQueuesForType("Comme ntAdded");
auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::CommentAd ded)); auto inboxes (EventsRouter::GetInstance().GetInboxes(EventType::CommentAd ded));
if (queues.empty() && !inboxes) if (queues.empty() && !inboxes)
return; return;
 End of changes. 4 change blocks. 
4 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)