bool forced = service->GetForceNextCheck();
bool check = true;
+ bool authoritative = service->HasAuthority("checker");
- if (!service->HasAuthority("checker")) {
+ if (!authoritative) {
Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': not authoritative");
check = false;
}
/* reschedule the service if checks are disabled */
if (!check) {
- service->UpdateNextCheck();
+ if (authoritative)
+ service->UpdateNextCheck();
typedef boost::multi_index::nth_index<ServiceSet, 1>::type CheckTimeView;
CheckTimeView& idx = boost::get<1>(m_IdleServices);
#include "icinga/service.h"
#include "base/dynamicobject.h"
#include "base/timer.h"
+#include "base/utility.h"
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition_variable.hpp>
*/
double operator()(const Service::Ptr& service)
{
+ if (!service->HasAuthority("checker"))
+ return Utility::GetTime() + 60;
+
double next = service->GetNextCheck();
while (next == 0) {