Move more log messages to 'notice' severity.

Refs #6070
This commit is contained in:
Michael Friedrich 2014-05-22 23:47:03 +02:00
parent e873ce6b9c
commit 1df7518b35
16 changed files with 51 additions and 46 deletions

View File

@ -135,7 +135,7 @@ void CheckerComponent::CheckThreadProc(void)
if (!forced) { if (!forced) {
if (!checkable->IsReachable(DependencyCheckExecution)) { 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; check = false;
} }
@ -144,18 +144,18 @@ void CheckerComponent::CheckThreadProc(void)
tie(host, service) = GetHostService(checkable); tie(host, service) = GetHostService(checkable);
if (host && !service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableHostChecks())) { 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; check = false;
} }
if (host && service && (!checkable->GetEnableActiveChecks() || !IcingaApplication::GetInstance()->GetEnableServiceChecks())) { 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; check = false;
} }
TimePeriod::Ptr tp = checkable->GetCheckPeriod(); TimePeriod::Ptr tp = checkable->GetCheckPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) { 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; check = false;
} }
} }
@ -243,7 +243,7 @@ void CheckerComponent::ResultTimerHandler(void)
msgbuf << "Pending checkables: " << m_PendingCheckables.size() << "; Idle checkables: " << m_IdleCheckables.size() << "; Checks/s: " << CIB::GetActiveChecksStatistics(5) / 5.0; 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) void CheckerComponent::ObjectHandler(const DynamicObject::Ptr& object)

View File

@ -838,5 +838,5 @@ void StatusDataWriter::StatusTimerHandler(void)
<< boost::errinfo_file_name(statuspathtmp)); << 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));
} }

View File

@ -269,7 +269,7 @@ void IdoMysqlConnection::Reconnect(void)
/* deactivate all deleted configuration objects */ /* deactivate all deleted configuration objects */
BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) { BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) {
if (dbobj->GetObject() == NULL) { 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() + "'."))); "' name2: '" + Convert::ToString(dbobj->GetName2() + "'.")));
DeactivateObject(dbobj); DeactivateObject(dbobj);
} }

View File

@ -273,7 +273,7 @@ void IdoPgsqlConnection::Reconnect(void)
/* deactivate all deleted configuration objects */ /* deactivate all deleted configuration objects */
BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) { BOOST_FOREACH(const DbObject::Ptr& dbobj, active_dbobjs) {
if (dbobj->GetObject() == NULL) { 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() + "'."))); "' name2: '" + Convert::ToString(dbobj->GetName2() + "'.")));
DeactivateObject(dbobj); DeactivateObject(dbobj);
} }

View File

@ -77,7 +77,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
try { try {
if (m_Stream) { if (m_Stream) {
m_Stream->Write("\n", 1); 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; return;
} }
} catch (const std::exception& ex) { } catch (const std::exception& ex) {
@ -86,7 +86,7 @@ void GraphiteWriter::ReconnectTimerHandler(void)
TcpSocket::Ptr socket = make_shared<TcpSocket>(); 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()); socket->Connect(GetHost(), GetPort());
m_Stream = make_shared<NetworkStream>(socket); m_Stream = make_shared<NetworkStream>(socket);

View File

@ -140,9 +140,9 @@ void Application::SetResourceLimits(void)
rl.rlim_max = rl.rlim_cur; rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0) 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 */ # 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 */ # endif /* RLIMIT_NOFILE */
# ifdef RLIMIT_NPROC # ifdef RLIMIT_NPROC
@ -150,9 +150,9 @@ void Application::SetResourceLimits(void)
rl.rlim_max = rl.rlim_cur; rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_NPROC, &rl) < 0) 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 */ # 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 */ # endif /* RLIMIT_NPROC */
# ifdef RLIMIT_STACK # ifdef RLIMIT_STACK
@ -172,7 +172,7 @@ void Application::SetResourceLimits(void)
rl.rlim_max = rl.rlim_cur; rl.rlim_max = rl.rlim_cur;
if (setrlimit(RLIMIT_STACK, &rl) < 0) 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 { else {
char **new_argv = static_cast<char **>(malloc(sizeof(char *) * (argc + 2))); char **new_argv = static_cast<char **>(malloc(sizeof(char *) * (argc + 2)));
@ -200,7 +200,7 @@ void Application::SetResourceLimits(void)
} }
} }
# else /* RLIMIT_STACK */ # 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 /* RLIMIT_STACK */
#endif /* _WIN32 */ #endif /* _WIN32 */
} }

View File

@ -124,7 +124,7 @@ void WorkQueue::StatusTimerHandler(void)
{ {
boost::mutex::scoped_lock lock(m_Mutex); 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) void WorkQueue::WorkerThreadProc(void)

View File

@ -198,7 +198,7 @@ void DbConnection::CleanUpHandler(void)
continue; continue;
CleanUpExecuteQuery(tables[i].name, tables[i].time_column, now - max_age); 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) + " now: " + Convert::ToString(now) +
" old: " + Convert::ToString(now - max_age)); " old: " + Convert::ToString(now - max_age));
} }

View File

@ -400,10 +400,13 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
/* signal status updates to for example db_ido */ /* signal status updates to for example db_ido */
OnStateChanged(GetSelf()); OnStateChanged(GetSelf());
if (hardChange) if (hardChange) {
OnStateChange(GetSelf(), cr, StateTypeHard, origin); 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); 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) if (GetStateType() == StateTypeSoft || hardChange || recovery)
ExecuteEventHandler(); ExecuteEventHandler();
@ -414,12 +417,12 @@ void Checkable::ProcessCheckResult(const CheckResult::Ptr& cr, const MessageOrig
if (!was_flapping && is_flapping) { if (!was_flapping && is_flapping) {
OnNotificationsRequested(GetSelf(), NotificationFlappingStart, cr, "", ""); 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); OnFlappingChanged(GetSelf(), FlappingStarted);
} else if (was_flapping && !is_flapping) { } else if (was_flapping && !is_flapping) {
OnNotificationsRequested(GetSelf(), NotificationFlappingEnd, cr, "", ""); 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); OnFlappingChanged(GetSelf(), FlappingStopped);
} else if (send_notification) } else if (send_notification)
OnNotificationsRequested(GetSelf(), recovery ? NotificationRecovery : NotificationProblem, cr, "", ""); OnNotificationsRequested(GetSelf(), recovery ? NotificationRecovery : NotificationProblem, cr, "", "");

View File

@ -104,7 +104,7 @@ String Checkable::AddDowntime(const String& author, const String& comment,
l_DowntimesCache[uid] = GetSelf(); 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) + "'."); "' between '" + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", startTime) + "' and '" + Utility::FormatDateTime("%Y-%m-%d %H:%M:%S", endTime) + "'.");
OnDowntimeAdded(GetSelf(), downtime, origin); OnDowntimeAdded(GetSelf(), downtime, origin);
@ -145,7 +145,7 @@ void Checkable::RemoveDowntime(const String& id, bool cancelled, const MessageOr
downtime->SetWasCancelled(cancelled); 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); OnDowntimeRemoved(owner, downtime, origin);
} }
@ -187,7 +187,7 @@ void Checkable::TriggerDowntime(const String& id)
return; 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) if (downtime->GetTriggerTime() == 0)
downtime->SetTriggerTime(Utility::GetTime()); downtime->SetTriggerTime(Utility::GetTime());

View File

@ -69,7 +69,7 @@ void Checkable::ExecuteEventHandler(void)
if (!ec) if (!ec)
return; return;
Log(LogDebug, "icinga", "Executing event handler for service '" + GetName() + "'"); Log(LogNotice, "icinga", "Executing event handler '" + ec->GetName() + "' for service '" + GetName() + "'");
ec->Execute(GetSelf()); ec->Execute(GetSelf());

View File

@ -38,7 +38,7 @@ void CustomVarObject::SetVars(const Dictionary::Ptr& vars, const MessageOrigin&
{ {
SetOverrideVars(vars); SetOverrideVars(vars);
Log(LogDebug, "icinga", "Setting vars for object '" + GetName() + "'"); Log(LogNotice, "icinga", "Setting vars for object '" + GetName() + "'");
OnVarsChanged(GetSelf(), origin); OnVarsChanged(GetSelf(), origin);
} }

View File

@ -97,19 +97,19 @@ bool Dependency::IsAvailable(DependencyType dt) const
/* ignore if it's the same checkable object */ /* ignore if it's the same checkable object */
if (parent == GetChild()) { 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; return true;
} }
/* ignore pending */ /* ignore pending */
if (!parent->GetLastCheckResult()) { 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; return true;
} }
/* ignore soft states */ /* ignore soft states */
if (parent->GetStateType() == StateTypeSoft) { 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; return true;
} }
@ -122,26 +122,28 @@ bool Dependency::IsAvailable(DependencyType dt) const
/* check state */ /* check state */
if (state & GetStateFilter()) { 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; return true;
} }
/* ignore if not in time period */ /* ignore if not in time period */
TimePeriod::Ptr tp = GetPeriod(); TimePeriod::Ptr tp = GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) { 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; return true;
} }
if (dt == DependencyCheckExecution && !GetDisableChecks()) { 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; return true;
} else if (dt == DependencyNotification && !GetDisableNotifications()) { } 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; 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; return false;
} }

View File

@ -231,7 +231,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
TimePeriod::Ptr tp = GetPeriod(); TimePeriod::Ptr tp = GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) { 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; return;
} }
@ -240,12 +240,12 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
if (type == NotificationProblem) { if (type == NotificationProblem) {
if (times && times->Contains("begin") && now < checkable->GetLastHardStateChange() + times->Get("begin")) { 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; return;
} }
if (times && times->Contains("end") && now > checkable->GetLastHardStateChange() + times->Get("end")) { 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; return;
} }
} }
@ -255,7 +255,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
Log(LogDebug, "icinga", "FType=" + Convert::ToString(ftype) + ", TypeFilter=" + Convert::ToString(GetTypeFilter())); Log(LogDebug, "icinga", "FType=" + Convert::ToString(ftype) + ", TypeFilter=" + Convert::ToString(GetTypeFilter()));
if (!(ftype & 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; return;
} }
@ -271,7 +271,7 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
fstate = HostStateToFilter(host->GetState()); fstate = HostStateToFilter(host->GetState());
if (!(fstate & GetStateFilter())) { 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; return;
} }
} }
@ -322,7 +322,7 @@ bool Notification::CheckNotificationUserFilters(NotificationType type, const Use
TimePeriod::Ptr tp = user->GetPeriod(); TimePeriod::Ptr tp = user->GetPeriod();
if (tp && !tp->IsInside(Utility::GetTime())) { 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"); GetName() + " and user '" + user->GetName() + "': user not in timeperiod");
return false; return false;
} }
@ -330,7 +330,7 @@ bool Notification::CheckNotificationUserFilters(NotificationType type, const Use
unsigned long ftype = 1 << type; unsigned long ftype = 1 << type;
if (!(ftype & user->GetTypeFilter())) { 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"); GetName() + " and user '" + user->GetName() + "': type filter does not match");
return false; return false;
} }
@ -348,7 +348,7 @@ bool Notification::CheckNotificationUserFilters(NotificationType type, const Use
fstate = HostStateToFilter(host->GetState()); fstate = HostStateToFilter(host->GetState());
if (!(fstate & user->GetStateFilter())) { 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"); GetName() + " and user '" + user->GetName() + "': state filter does not match");
return false; return false;
} }

View File

@ -140,7 +140,7 @@ bool ApiClient::ProcessMessage(void)
String method = message->Get("method"); 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>(); Dictionary::Ptr resultMessage = make_shared<Dictionary>();

View File

@ -374,7 +374,7 @@ void ApiListener::SyncRelayMessage(const MessageOrigin& origin, const DynamicObj
double ts = Utility::GetTime(); double ts = Utility::GetTime();
message->Set("ts", ts); message->Set("ts", ts);
Log(LogDebug, "remote", "Relaying '" + message->Get("method") + "' message"); Log(LogNotice, "remote", "Relaying '" + message->Get("method") + "' message");
if (log) if (log)
m_LogQueue.Enqueue(boost::bind(&ApiListener::PersistMessage, this, message)); m_LogQueue.Enqueue(boost::bind(&ApiListener::PersistMessage, this, message));
@ -437,7 +437,7 @@ void ApiListener::SyncRelayMessage(const MessageOrigin& origin, const DynamicObj
ObjectLock olock(endpoint); ObjectLock olock(endpoint);
if (!endpoint->GetSyncing()) { 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()) BOOST_FOREACH(const ApiClient::Ptr& client, endpoint->GetClients())
client->SendMessage(message); client->SendMessage(message);