static void LogHostStatus(const Host::Ptr &host)
{
std::cout << "Current status: state: " << host->GetState() << " state_type: " << host->GetStateType()
- << " check attempt: " << host->GetCheckAttempt() << "/" << host->GetMaxCheckAttempts() << std::endl;
+ << " check attempt: " << host->GetCheckAttempt() << "/" << host->GetMaxCheckAttempts() << " Active: " << host->IsActive() << std::endl;
}
#endif /* I2_DEBUG */
host->SetName("test");
host->SetEnableFlapping(true);
host->SetMaxCheckAttempts(5);
+ host->SetActive(true);
// Host otherwise is soft down
host->SetState(HostUp);
host->SetName("test");
host->SetEnableFlapping(true);
host->SetMaxCheckAttempts(5);
+ host->SetActive(true);
Utility::SetTime(0);
host->SetName("test");
host->SetEnableFlapping(true);
host->SetMaxCheckAttempts(5);
+ host->SetActive(true);
// Host otherwise is soft down
host->SetState(HostUp);
host->SetName("test");
host->SetEnableFlapping(true);
host->SetMaxCheckAttempts(5);
+ host->SetActive(true);
// Host otherwise is soft down
host->SetState(HostUp);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Host::Ptr host = new Host();
+ host->SetActive(true);
host->SetMaxCheckAttempts(1);
host->Activate();
host->SetAuthority(true);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Host::Ptr host = new Host();
+ host->SetActive(true);
host->SetMaxCheckAttempts(2);
host->Activate();
host->SetAuthority(true);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Host::Ptr host = new Host();
+ host->SetActive(true);
host->SetMaxCheckAttempts(3);
host->Activate();
host->SetAuthority(true);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Service::Ptr service = new Service();
+ service->SetActive(true);
service->SetMaxCheckAttempts(1);
service->Activate();
service->SetAuthority(true);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Service::Ptr service = new Service();
+ service->SetActive(true);
service->SetMaxCheckAttempts(2);
service->Activate();
service->SetAuthority(true);
boost::signals2::connection c = Checkable::OnNotificationsRequested.connect(std::bind(&NotificationHandler, _1, _2));
Service::Ptr service = new Service();
+ service->SetActive(true);
service->SetMaxCheckAttempts(3);
service->Activate();
service->SetAuthority(true);
int timeStepInterval = 60;
Host::Ptr host = new Host();
+ host->SetActive(true);
host->Activate();
host->SetAuthority(true);
host->SetStateRaw(ServiceOK);
int timeStepInterval = 60;
Service::Ptr service = new Service();
+ service->SetActive(true);
service->Activate();
service->SetAuthority(true);
service->SetStateRaw(ServiceOK);