compat: add current_notification_number

This commit is contained in:
Michael Friedrich 2013-07-18 17:23:48 +02:00
parent fe4a5e721c
commit b4dd18481b
1 changed files with 6 additions and 1 deletions

View File

@ -480,12 +480,16 @@ void CompatComponent::DumpServiceStatusAttrs(std::ostream& fp, const Service::Pt
double last_notification = 0; double last_notification = 0;
double next_notification = 0; double next_notification = 0;
int notification_number = 0;
BOOST_FOREACH(const Notification::Ptr& notification, service->GetNotifications()) { BOOST_FOREACH(const Notification::Ptr& notification, service->GetNotifications()) {
if (notification->GetLastNotification() > last_notification) if (notification->GetLastNotification() > last_notification)
last_notification = notification->GetLastNotification(); last_notification = notification->GetLastNotification();
if (notification->GetNextNotification() < next_notification) if (notification->GetNextNotification() < next_notification)
next_notification = notification->GetNextNotification(); next_notification = notification->GetNextNotification();
if (notification->GetNotificationNumber() > notification_number)
notification_number = notification->GetNotificationNumber();
} }
CheckCommand::Ptr checkcommand = service->GetCheckCommand(); CheckCommand::Ptr checkcommand = service->GetCheckCommand();
@ -526,7 +530,8 @@ void CompatComponent::DumpServiceStatusAttrs(std::ostream& fp, const Service::Pt
<< "\t" << "acknowledgement_end_time=" << service->GetAcknowledgementExpiry() << "\n" << "\t" << "acknowledgement_end_time=" << service->GetAcknowledgementExpiry() << "\n"
<< "\t" << "scheduled_downtime_depth=" << (service->IsInDowntime() ? 1 : 0) << "\n" << "\t" << "scheduled_downtime_depth=" << (service->IsInDowntime() ? 1 : 0) << "\n"
<< "\t" << "last_notification=" << last_notification << "\n" << "\t" << "last_notification=" << last_notification << "\n"
<< "\t" << "next_notification=" << next_notification << "\n"; << "\t" << "next_notification=" << next_notification << "\n"
<< "\t" << "current_notification_number=" << notification_number << "\n";
} }
void CompatComponent::DumpServiceStatus(std::ostream& fp, const Service::Ptr& service) void CompatComponent::DumpServiceStatus(std::ostream& fp, const Service::Ptr& service)