if (!forced) {
if (!checkable->IsReachable(DependencyCheckExecution)) {
- Log(LogDebug, "icinga", "Skipping check for object '" + checkable->GetName() + "': Dependency failed.");
+ Log(LogNotice, "icinga", "Skipping check for object '" + checkable->GetName() + "': Dependency failed.");
check = false;
}
tie(host, service) = GetHostService(checkable);
if (host && !service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableHostChecks())) {
- Log(LogDebug, "checker", "Skipping check for host '" + host->GetName() + "': active host checks are disabled");
+ Log(LogNotice, "checker", "Skipping check for host '" + host->GetName() + "': active host checks are disabled");
check = false;
}
if (host && service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableServiceChecks())) {
- Log(LogDebug, "checker", "Skipping check for service '" + service->GetName() + "': active service checks are disabled");
+ Log(LogNotice, "checker", "Skipping check for service '" + service->GetName() + "': active service checks are disabled");
check = false;
}
TimePeriod::Ptr tp = checkable->GetCheckPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) {
- Log(LogDebug, "checker", "Skipping check for object '" + checkable->GetName() + "': not in check_period");
+ Log(LogNotice, "checker", "Skipping check for object '" + checkable->GetName() + "': not in check_period");
check = false;
}
}
msgbuf << "Pending checkables: " << m_PendingCheckables.size() << "; Idle checkables: " << m_IdleCheckables.size() << "; Checks/s: " << CIB::GetActiveChecksStatistics(5) / 5.0;
}
- Log(LogDebug, "checker", msgbuf.str());
+ Log(LogNotice, "checker", msgbuf.str());
}
void CheckerComponent::ObjectHandler(const DynamicObject::Ptr& object)
<< boost::errinfo_file_name(statuspathtmp));
}
- Log(LogInformation, "compat", "Writing status.dat file took " + Utility::FormatDuration(Utility::GetTime() - start));
+ Log(LogNotice, "compat", "Writing status.dat file took " + Utility::FormatDuration(Utility::GetTime() - start));
}
/* deactivate all deleted configuration objects */
BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) {
if (dbobj->GetObject() == NULL) {
- Log(LogDebug, "db_ido", "Deactivate deleted object name1: '" + Convert::ToString(dbobj->GetName1() +
+ Log(LogNotice, "db_ido", "Deactivate deleted object name1: '" + Convert::ToString(dbobj->GetName1() +
"' name2: '" + Convert::ToString(dbobj->GetName2() + "'.")));
DeactivateObject(dbobj);
}
/* deactivate all deleted configuration objects */
BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) {
if (dbobj->GetObject() == NULL) {
- Log(LogDebug, "db_ido", "Deactivate deleted object name1: '" + Convert::ToString(dbobj->GetName1() +
+ Log(LogNotice, "db_ido", "Deactivate deleted object name1: '" + Convert::ToString(dbobj->GetName1() +
"' name2: '" + Convert::ToString(dbobj->GetName2() + "'.")));
DeactivateObject(dbobj);
}
try {
if (m_Stream) {
m_Stream->Write("\n", 1);
- Log(LogDebug, "perfdata", "GraphiteWriter already connected on socket on host '" + GetHost() + "' port '" + GetPort() + "'.");
+ Log(LogNotice, "perfdata", "GraphiteWriter already connected on socket on host '" + GetHost() + "' port '" + GetPort() + "'.");
return;
}
} catch (const std::exception& ex) {
TcpSocket::Ptr socket = make_shared<TcpSocket>();
- Log(LogDebug, "perfdata", "GraphiteWriter: Reconnect to tcp socket on host '" + GetHost() + "' port '" + GetPort() + "'.");
+ Log(LogNotice, "perfdata", "GraphiteWriter: Reconnect to tcp socket on host '" + GetHost() + "' port '" + GetPort() + "'.");
socket->Connect(GetHost(), GetPort());
m_Stream = make_shared<NetworkStream>(socket);
rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
- Log(LogDebug, "base", "Could not adjust resource limit for open file handles (RLIMIT_NOFILE)");
+ Log(LogNotice, "base", "Could not adjust resource limit for open file handles (RLIMIT_NOFILE)");
# else /* RLIMIT_NOFILE */
- Log(LogDebug, "base", "System does not support adjusting the resource limit for open file handles (RLIMIT_NOFILE)");
+ Log(LogNotice, "base", "System does not support adjusting the resource limit for open file handles (RLIMIT_NOFILE)");
# endif /* RLIMIT_NOFILE */
# ifdef RLIMIT_NPROC
rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_NPROC, &rl) < 0)
- Log(LogDebug, "base", "Could not adjust resource limit for number of processes (RLIMIT_NPROC)");
+ Log(LogNotice, "base", "Could not adjust resource limit for number of processes (RLIMIT_NPROC)");
# else /* RLIMIT_NPROC */
- Log(LogDebug, "base", "System does not support adjusting the resource limit for number of processes (RLIMIT_NPROC)");
+ Log(LogNotice, "base", "System does not support adjusting the resource limit for number of processes (RLIMIT_NPROC)");
# endif /* RLIMIT_NPROC */
# ifdef RLIMIT_STACK
rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_STACK, &rl) < 0)
- Log(LogDebug, "base", "Could not adjust resource limit for stack size (RLIMIT_STACK)");
+ Log(LogNotice, "base", "Could not adjust resource limit for stack size (RLIMIT_STACK)");
else {
char **new_argv = static_cast<char **>(malloc(sizeof(char *) * (argc + 2)));
}
}
# else /* RLIMIT_STACK */
- Log(LogDebug, "base", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)");
+ Log(LogNotice, "base", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)");
# endif /* RLIMIT_STACK */
#endif /* _WIN32 */
}
{
boost::mutex::scoped_lock lock(m_Mutex);
- Log(LogDebug, "base", "WQ #" + Convert::ToString(m_ID) + " items: " + Convert::ToString(m_Items.size()));
+ Log(LogNotice, "base", "WQ #" + Convert::ToString(m_ID) + " items: " + Convert::ToString(m_Items.size()));
}
void WorkQueue::WorkerThreadProc(void)
continue;
CleanUpExecuteQuery(tables[i].name, tables[i].time_column, now - max_age);
- Log(LogDebug, "db_ido", "Cleanup (" + tables[i].name + "): " + Convert::ToString(max_age) +
+ Log(LogNotice, "db_ido", "Cleanup (" + tables[i].name + "): " + Convert::ToString(max_age) +
" now: " + Convert::ToString(now) +
" old: " + Convert::ToString(now - max_age));
}
/* signal status updates to for example db_ido */
OnStateChanged(GetSelf());
- if (hardChange)
+ if (hardChange) {
OnStateChange(GetSelf(), cr, StateTypeHard, origin);
- else if (stateChange)
+ Log(LogNotice, "icinga", "State Change: Checkable " + GetName() + " hard state change from " + Convert::ToString(old_state) + " to " + Convert::ToString(new_state) + " detected.");
+ } else if (stateChange) {
OnStateChange(GetSelf(), cr, StateTypeSoft, origin);
+ Log(LogNotice, "icinga", "State Change: Checkable " + GetName() + " soft state change from " + Convert::ToString(old_state) + " to " + Convert::ToString(new_state) + " detected.");
+ }
if (GetStateType() == StateTypeSoft || hardChange || recovery)
ExecuteEventHandler();
if (!was_flapping && is_flapping) {
OnNotificationsRequested(GetSelf(), NotificationFlappingStart, cr, "", "");
- Log(LogDebug, "icinga", "Flapping: Checkable " + GetName() + " started flapping (" + Convert::ToString(GetFlappingThreshold()) + "% < " + Convert::ToString(GetFlappingCurrent()) + "%).");
+ Log(LogNotice, "icinga", "Flapping: Checkable " + GetName() + " started flapping (" + Convert::ToString(GetFlappingThreshold()) + "% < " + Convert::ToString(GetFlappingCurrent()) + "%).");
OnFlappingChanged(GetSelf(), FlappingStarted);
} else if (was_flapping && !is_flapping) {
OnNotificationsRequested(GetSelf(), NotificationFlappingEnd, cr, "", "");
- Log(LogDebug, "icinga", "Flapping: Checkable " + GetName() + " stopped flapping (" + Convert::ToString(GetFlappingThreshold()) + "% >= " + Convert::ToString(GetFlappingCurrent()) + "%).");
+ Log(LogNotice, "icinga", "Flapping: Checkable " + GetName() + " stopped flapping (" + Convert::ToString(GetFlappingThreshold()) + "% >= " + Convert::ToString(GetFlappingCurrent()) + "%).");
OnFlappingChanged(GetSelf(), FlappingStopped);
} else if (send_notification)
OnNotificationsRequested(GetSelf(), recovery ? NotificationRecovery : NotificationProblem, cr, "", "");
l_DowntimesCache[uid] = GetSelf();
}
- Log(LogDebug, "icinga", "Added downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) +
+ Log(LogNotice, "icinga", "Added downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) +
"' between '" + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", startTime) + "' and '" + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", endTime) + "'.");
OnDowntimeAdded(GetSelf(), downtime, origin);
downtime->SetWasCancelled(cancelled);
- Log(LogDebug, "icinga", "Removed downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) + "' from service '" + owner->GetName() + "'.");
+ Log(LogNotice, "icinga", "Removed downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) + "' from service '" + owner->GetName() + "'.");
OnDowntimeRemoved(owner, downtime, origin);
}
return;
}
- Log(LogDebug, "icinga", "Triggering downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) + "'.");
+ Log(LogNotice, "icinga", "Triggering downtime with ID '" + Convert::ToString(downtime->GetLegacyId()) + "'.");
if (downtime->GetTriggerTime() == 0)
downtime->SetTriggerTime(Utility::GetTime());
if (!ec)
return;
- Log(LogDebug, "icinga", "Executing event handler for service '" + GetName() + "'");
+ Log(LogNotice, "icinga", "Executing event handler '" + ec->GetName() + "' for service '" + GetName() + "'");
ec->Execute(GetSelf());
{
SetOverrideVars(vars);
- Log(LogDebug, "icinga", "Setting vars for object '" + GetName() + "'");
+ Log(LogNotice, "icinga", "Setting vars for object '" + GetName() + "'");
OnVarsChanged(GetSelf(), origin);
}
/* ignore if it's the same checkable object */
if (parent == GetChild()) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: Parent and child " + (service ? "service" : "host") + " are identical.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: Parent and child " + (service ? "service" : "host") + " are identical.");
return true;
}
/* ignore pending */
if (!parent->GetLastCheckResult()) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' hasn't been checked yet.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' hasn't been checked yet.");
return true;
}
/* ignore soft states */
if (parent->GetStateType() == StateTypeSoft) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' is in a soft state.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' is in a soft state.");
return true;
}
/* check state */
if (state & GetStateFilter()) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' matches state filter.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: " + (service ? "Service" : "Host") + " '" + parent->GetName() + "' matches state filter.");
return true;
}
/* ignore if not in time period */
TimePeriod::Ptr tp = GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: Outside time period.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: Outside time period.");
return true;
}
if (dt == DependencyCheckExecution && !GetDisableChecks()) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: Checks are not disabled.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: Checks are not disabled.");
return true;
} else if (dt == DependencyNotification && !GetDisableNotifications()) {
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' passed: Notifications are not disabled");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' passed: Notifications are not disabled");
return true;
}
- Log(LogDebug, "icinga", "Dependency '" + GetName() + "' failed.");
+ Log(LogNotice, "icinga", "Dependency '" + GetName() + "' failed. Parent " +
+ (service ? "service" : "host") + " '" + parent->GetName() + "' is " +
+ (service ? Service::StateToString(service->GetState()) : Host::StateToString(host->GetState())));
return false;
}
TimePeriod::Ptr tp = GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': not in timeperiod");
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" + GetName() + "': not in timeperiod");
return;
}
if (type == NotificationProblem) {
if (times && times->Contains("begin") && now < checkable->GetLastHardStateChange() + times->Get("begin")) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': before escalation range");
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" + GetName() + "': before escalation range");
return;
}
if (times && times->Contains("end") && now > checkable->GetLastHardStateChange() + times->Get("end")) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': after escalation range");
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" + GetName() + "': after escalation range");
return;
}
}
Log(LogDebug, "icinga", "FType=" + Convert::ToString(ftype) + ", TypeFilter=" + Convert::ToString(GetTypeFilter()));
if (!(ftype & GetTypeFilter())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': type filter does not match");
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" + GetName() + "': type filter does not match");
return;
}
fstate = HostStateToFilter(host->GetState());
if (!(fstate & GetStateFilter())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" + GetName() + "': state filter does not match");
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" + GetName() + "': state filter does not match");
return;
}
}
TimePeriod::Ptr tp = user->GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" +
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" +
GetName() + " and user '" + user->GetName() + "': user not in timeperiod");
return false;
}
unsigned long ftype = 1 << type;
if (!(ftype & user->GetTypeFilter())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" +
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" +
GetName() + " and user '" + user->GetName() + "': type filter does not match");
return false;
}
fstate = HostStateToFilter(host->GetState());
if (!(fstate & user->GetStateFilter())) {
- Log(LogInformation, "icinga", "Not sending notifications for notification object '" +
+ Log(LogNotice, "icinga", "Not sending notifications for notification object '" +
GetName() + " and user '" + user->GetName() + "': state filter does not match");
return false;
}
String method = message->Get("method");
- Log(LogDebug, "remote", "Received '" + method + "' message from '" + m_Identity + "'");
+ Log(LogNotice, "remote", "Received '" + method + "' message from '" + m_Identity + "'");
Dictionary::Ptr resultMessage = make_shared<Dictionary>();
double ts = Utility::GetTime();
message->Set("ts", ts);
- Log(LogDebug, "remote", "Relaying '" + message->Get("method") + "' message");
+ Log(LogNotice, "remote", "Relaying '" + message->Get("method") + "' message");
if (log)
m_LogQueue.Enqueue(boost::bind(&ApiListener::PersistMessage, this, message));
ObjectLock olock(endpoint);
if (!endpoint->GetSyncing()) {
- Log(LogDebug, "remote", "Sending message to '" + endpoint->GetName() + "'");
+ Log(LogNotice, "remote", "Sending message to '" + endpoint->GetName() + "'");
BOOST_FOREACH(const ApiClient::Ptr& client, endpoint->GetClients())
client->SendMessage(message);