Change log message identifier for libdb_ido.

Refs #6346
This commit is contained in:
Michael Friedrich 2014-05-28 14:34:26 +02:00
parent 7d35585cb0
commit 4bfa068e46
7 changed files with 58 additions and 58 deletions

View File

@ -49,7 +49,7 @@ void DbConnection::Resume(void)
{ {
DynamicObject::Resume(); DynamicObject::Resume();
Log(LogInformation, "db_ido", "Resuming IDO connection: " + GetName()); Log(LogInformation, "DbConnection", "Resuming IDO connection: " + GetName());
m_CleanUpTimer = make_shared<Timer>(); m_CleanUpTimer = make_shared<Timer>();
m_CleanUpTimer->SetInterval(60); m_CleanUpTimer->SetInterval(60);
@ -61,7 +61,7 @@ void DbConnection::Pause(void)
{ {
DynamicObject::Pause(); DynamicObject::Pause();
Log(LogInformation, "db_ido", "Pausing IDO connection: " + GetName()); Log(LogInformation, "DbConnection", "Pausing IDO connection: " + GetName());
m_CleanUpTimer.reset(); m_CleanUpTimer.reset();
@ -141,13 +141,13 @@ void DbConnection::ProgramStatusHandler(void)
if (!vars) if (!vars)
return; return;
Log(LogDebug, "db_ido", "Dumping global vars for icinga application"); Log(LogDebug, "DbConnection", "Dumping global vars for icinga application");
ObjectLock olock(vars); ObjectLock olock(vars);
BOOST_FOREACH(const Dictionary::Pair& kv, vars) { BOOST_FOREACH(const Dictionary::Pair& kv, vars) {
if (!kv.first.IsEmpty()) { if (!kv.first.IsEmpty()) {
Log(LogDebug, "db_ido", "icinga application customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) + "'"); Log(LogDebug, "DbConnection", "icinga application customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) + "'");
Dictionary::Ptr fields4 = make_shared<Dictionary>(); Dictionary::Ptr fields4 = make_shared<Dictionary>();
fields4->Set("varname", Convert::ToString(kv.first)); fields4->Set("varname", Convert::ToString(kv.first));
@ -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(LogNotice, "db_ido", "Cleanup (" + tables[i].name + "): " + Convert::ToString(max_age) + Log(LogNotice, "DbConnection", "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

@ -278,11 +278,11 @@ void DbEvents::AddCommentHistory(const Checkable::Ptr& checkable, const Comment:
void DbEvents::AddCommentInternal(const Checkable::Ptr& checkable, const Comment::Ptr& comment, bool historical) void DbEvents::AddCommentInternal(const Checkable::Ptr& checkable, const Comment::Ptr& comment, bool historical)
{ {
if (!comment) { if (!comment) {
Log(LogWarning, "db_ido", "comment does not exist. not adding it."); Log(LogWarning, "DbEvents", "comment does not exist. not adding it.");
return; return;
} }
Log(LogDebug, "db_ido", "adding service comment (id = " + Convert::ToString(comment->GetLegacyId()) + ") for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "adding service comment (id = " + Convert::ToString(comment->GetLegacyId()) + ") for '" + checkable->GetName() + "'");
/* add the service comment */ /* add the service comment */
AddCommentByType(checkable, comment, historical); AddCommentByType(checkable, comment, historical);
@ -307,7 +307,7 @@ void DbEvents::AddCommentByType(const DynamicObject::Ptr& object, const Comment:
fields1->Set("comment_type", 1); fields1->Set("comment_type", 1);
fields1->Set("internal_comment_id", comment->GetLegacyId()); fields1->Set("internal_comment_id", comment->GetLegacyId());
} else { } else {
Log(LogDebug, "db_ido", "unknown object type for adding comment."); Log(LogDebug, "DbEvents", "unknown object type for adding comment.");
return; return;
} }
@ -340,7 +340,7 @@ void DbEvents::AddCommentByType(const DynamicObject::Ptr& object, const Comment:
void DbEvents::RemoveComments(const Checkable::Ptr& checkable) void DbEvents::RemoveComments(const Checkable::Ptr& checkable)
{ {
Log(LogDebug, "db_ido", "removing service comments for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "removing service comments for '" + checkable->GetName() + "'");
DbQuery query1; DbQuery query1;
query1.Table = "comments"; query1.Table = "comments";
@ -354,11 +354,11 @@ void DbEvents::RemoveComments(const Checkable::Ptr& checkable)
void DbEvents::RemoveComment(const Checkable::Ptr& checkable, const Comment::Ptr& comment) void DbEvents::RemoveComment(const Checkable::Ptr& checkable, const Comment::Ptr& comment)
{ {
if (!comment) { if (!comment) {
Log(LogWarning, "db_ido", "comment does not exist. not deleting it."); Log(LogWarning, "DbEvents", "comment does not exist. not deleting it.");
return; return;
} }
Log(LogDebug, "db_ido", "removing service comment (id = " + Convert::ToString(comment->GetLegacyId()) + ") for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "removing service comment (id = " + Convert::ToString(comment->GetLegacyId()) + ") for '" + checkable->GetName() + "'");
/* Status */ /* Status */
DbQuery query1; DbQuery query1;
@ -423,11 +423,11 @@ void DbEvents::AddDowntimeHistory(const Checkable::Ptr& checkable, const Downtim
void DbEvents::AddDowntimeInternal(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime, bool historical) void DbEvents::AddDowntimeInternal(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime, bool historical)
{ {
if (!downtime) { if (!downtime) {
Log(LogWarning, "db_ido", "downtime does not exist. not adding it."); Log(LogWarning, "DbEvents", "downtime does not exist. not adding it.");
return; return;
} }
Log(LogDebug, "db_ido", "adding service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "adding service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'");
/* add the downtime */ /* add the downtime */
AddDowntimeByType(checkable, downtime, historical);} AddDowntimeByType(checkable, downtime, historical);}
@ -446,7 +446,7 @@ void DbEvents::AddDowntimeByType(const Checkable::Ptr& checkable, const Downtime
fields1->Set("downtime_type", 1); fields1->Set("downtime_type", 1);
fields1->Set("internal_downtime_id", downtime->GetLegacyId()); fields1->Set("internal_downtime_id", downtime->GetLegacyId());
} else { } else {
Log(LogDebug, "db_ido", "unknown object type for adding downtime."); Log(LogDebug, "DbEvents", "unknown object type for adding downtime.");
return; return;
} }
@ -485,7 +485,7 @@ void DbEvents::AddDowntimeByType(const Checkable::Ptr& checkable, const Downtime
void DbEvents::RemoveDowntimes(const Checkable::Ptr& checkable) void DbEvents::RemoveDowntimes(const Checkable::Ptr& checkable)
{ {
Log(LogDebug, "db_ido", "removing service downtimes for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "removing service downtimes for '" + checkable->GetName() + "'");
DbQuery query1; DbQuery query1;
query1.Table = "scheduleddowntime"; query1.Table = "scheduleddowntime";
@ -499,11 +499,11 @@ void DbEvents::RemoveDowntimes(const Checkable::Ptr& checkable)
void DbEvents::RemoveDowntime(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime) void DbEvents::RemoveDowntime(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime)
{ {
if (!downtime) { if (!downtime) {
Log(LogWarning, "db_ido", "downtime does not exist. not adding it."); Log(LogWarning, "DbEvents", "downtime does not exist. not adding it.");
return; return;
} }
Log(LogDebug, "db_ido", "removing service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "removing service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'");
/* Status */ /* Status */
DbQuery query1; DbQuery query1;
@ -543,11 +543,11 @@ void DbEvents::RemoveDowntime(const Checkable::Ptr& checkable, const Downtime::P
void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime) void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime)
{ {
if (!downtime) { if (!downtime) {
Log(LogWarning, "db_ido", "downtime does not exist. not updating it."); Log(LogWarning, "DbEvents", "downtime does not exist. not updating it.");
return; return;
} }
Log(LogDebug, "db_ido", "updating triggered service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "updating triggered service downtime (id = " + Convert::ToString(downtime->GetLegacyId()) + ") for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -629,7 +629,7 @@ void DbEvents::TriggerDowntime(const Checkable::Ptr& checkable, const Downtime::
void DbEvents::AddAcknowledgementHistory(const Checkable::Ptr& checkable, const String& author, const String& comment, void DbEvents::AddAcknowledgementHistory(const Checkable::Ptr& checkable, const String& author, const String& comment,
AcknowledgementType type, double expiry) AcknowledgementType type, double expiry)
{ {
Log(LogDebug, "db_ido", "add acknowledgement history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add acknowledgement history for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -669,14 +669,14 @@ void DbEvents::AddAcknowledgementHistory(const Checkable::Ptr& checkable, const
void DbEvents::AddAcknowledgement(const Checkable::Ptr& checkable, AcknowledgementType type) void DbEvents::AddAcknowledgement(const Checkable::Ptr& checkable, AcknowledgementType type)
{ {
Log(LogDebug, "db_ido", "add acknowledgement for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add acknowledgement for '" + checkable->GetName() + "'");
AddAcknowledgementInternal(checkable, type, true); AddAcknowledgementInternal(checkable, type, true);
} }
void DbEvents::RemoveAcknowledgement(const Checkable::Ptr& checkable) void DbEvents::RemoveAcknowledgement(const Checkable::Ptr& checkable)
{ {
Log(LogDebug, "db_ido", "remove acknowledgement for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "remove acknowledgement for '" + checkable->GetName() + "'");
AddAcknowledgementInternal(checkable, AcknowledgementNone, false); AddAcknowledgementInternal(checkable, AcknowledgementNone, false);
} }
@ -716,7 +716,7 @@ void DbEvents::AddAcknowledgementInternal(const Checkable::Ptr& checkable, Ackno
void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const std::set<User::Ptr>& users, NotificationType type, void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, const Checkable::Ptr& checkable, const std::set<User::Ptr>& users, NotificationType type,
const CheckResult::Ptr& cr, const String& author, const String& text) const CheckResult::Ptr& cr, const String& author, const String& text)
{ {
Log(LogDebug, "db_ido", "add notification history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add notification history for '" + checkable->GetName() + "'");
/* start and end happen at the same time */ /* start and end happen at the same time */
double now = Utility::GetTime(); double now = Utility::GetTime();
@ -768,7 +768,7 @@ void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, con
/* filtered users */ /* filtered users */
BOOST_FOREACH(const User::Ptr& user, users) { BOOST_FOREACH(const User::Ptr& user, users) {
Log(LogDebug, "db_ido", "add contact notification history for service '" + checkable->GetName() + "' and user '" + user->GetName() + "'."); Log(LogDebug, "DbEvents", "add contact notification history for service '" + checkable->GetName() + "' and user '" + user->GetName() + "'.");
Dictionary::Ptr fields2 = make_shared<Dictionary>(); Dictionary::Ptr fields2 = make_shared<Dictionary>();
fields2->Set("contact_object_id", user); fields2->Set("contact_object_id", user);
@ -788,7 +788,7 @@ void DbEvents::AddNotificationHistory(const Notification::Ptr& notification, con
/* statehistory */ /* statehistory */
void DbEvents::AddStateChangeHistory(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type) void DbEvents::AddStateChangeHistory(const Checkable::Ptr& checkable, const CheckResult::Ptr& cr, StateType type)
{ {
Log(LogDebug, "db_ido", "add state change history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add state change history for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -897,7 +897,7 @@ void DbEvents::AddCheckResultLogHistory(const Checkable::Ptr& checkable, const C
type = LogEntryTypeServiceCritical; type = LogEntryTypeServiceCritical;
break; break;
default: default:
Log(LogCritical, "db_ido", "Unknown service state: " + Convert::ToString(state_after)); Log(LogCritical, "DbEvents", "Unknown service state: " + Convert::ToString(state_after));
return; return;
} }
} else { } else {
@ -922,7 +922,7 @@ void DbEvents::AddCheckResultLogHistory(const Checkable::Ptr& checkable, const C
type = LogEntryTypeHostDown; type = LogEntryTypeHostDown;
break; break;
default: default:
Log(LogCritical, "db_ido", "Unknown host state: " + Convert::ToString(state_after)); Log(LogCritical, "DbEvents", "Unknown host state: " + Convert::ToString(state_after));
return; return;
} }
@ -1076,7 +1076,7 @@ void DbEvents::AddFlappingLogHistory(const Checkable::Ptr& checkable, FlappingSt
flapping_state_str = "DISABLED"; flapping_state_str = "DISABLED";
break; break;
default: default:
Log(LogCritical, "db_ido", "Unknown flapping state: " + Convert::ToString(flapping_state)); Log(LogCritical, "DbEvents", "Unknown flapping state: " + Convert::ToString(flapping_state));
return; return;
} }
@ -1106,7 +1106,7 @@ void DbEvents::AddFlappingLogHistory(const Checkable::Ptr& checkable, FlappingSt
void DbEvents::AddLogHistory(const Checkable::Ptr& checkable, String buffer, LogEntryType type) void DbEvents::AddLogHistory(const Checkable::Ptr& checkable, String buffer, LogEntryType type)
{ {
Log(LogDebug, "db_ido", "add log entry history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add log entry history for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -1139,7 +1139,7 @@ void DbEvents::AddLogHistory(const Checkable::Ptr& checkable, String buffer, Log
/* flappinghistory */ /* flappinghistory */
void DbEvents::AddFlappingHistory(const Checkable::Ptr& checkable, FlappingState flapping_state) void DbEvents::AddFlappingHistory(const Checkable::Ptr& checkable, FlappingState flapping_state)
{ {
Log(LogDebug, "db_ido", "add flapping history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add flapping history for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -1167,7 +1167,7 @@ void DbEvents::AddFlappingHistory(const Checkable::Ptr& checkable, FlappingState
fields1->Set("reason_type", 2); fields1->Set("reason_type", 2);
break; break;
default: default:
Log(LogDebug, "db_ido", "Unhandled flapping state: " + Convert::ToString(flapping_state)); Log(LogDebug, "DbEvents", "Unhandled flapping state: " + Convert::ToString(flapping_state));
return; return;
} }
@ -1199,7 +1199,7 @@ void DbEvents::AddServiceCheckHistory(const Checkable::Ptr& checkable, const Che
if (!cr) if (!cr)
return; return;
Log(LogDebug, "db_ido", "add service check history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add service check history for '" + checkable->GetName() + "'");
Host::Ptr host; Host::Ptr host;
Service::Ptr service; Service::Ptr service;
@ -1263,7 +1263,7 @@ void DbEvents::AddServiceCheckHistory(const Checkable::Ptr& checkable, const Che
/* eventhandlers */ /* eventhandlers */
void DbEvents::AddEventHandlerHistory(const Checkable::Ptr& checkable) void DbEvents::AddEventHandlerHistory(const Checkable::Ptr& checkable)
{ {
Log(LogDebug, "db_ido", "add eventhandler history for '" + checkable->GetName() + "'"); Log(LogDebug, "DbEvents", "add eventhandler history for '" + checkable->GetName() + "'");
double now = Utility::GetTime(); double now = Utility::GetTime();
std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now); std::pair<unsigned long, unsigned long> time_bag = CompatUtility::ConvertTimestamp(now);
@ -1305,7 +1305,7 @@ void DbEvents::AddEventHandlerHistory(const Checkable::Ptr& checkable)
/* externalcommands */ /* externalcommands */
void DbEvents::AddExternalCommandHistory(double time, const String& command, const std::vector<String>& arguments) void DbEvents::AddExternalCommandHistory(double time, const String& command, const std::vector<String>& arguments)
{ {
Log(LogDebug, "db_ido", "add external command history"); Log(LogDebug, "DbEvents", "add external command history");
DbQuery query1; DbQuery query1;
query1.Table = "externalcommands"; query1.Table = "externalcommands";

View File

@ -127,7 +127,7 @@ void DbObject::SendStatusUpdate(void)
if (GetType()->GetTable() != "endpoint") { if (GetType()->GetTable() != "endpoint") {
String node = IcingaApplication::GetInstance()->GetNodeName(); String node = IcingaApplication::GetInstance()->GetNodeName();
Log(LogDebug, "db_ido", "Endpoint node: '" + node + "' status update for '" + GetObject()->GetName() + "'"); Log(LogDebug, "DbObject", "Endpoint node: '" + node + "' status update for '" + GetObject()->GetName() + "'");
Endpoint::Ptr endpoint = Endpoint::GetByName(node); Endpoint::Ptr endpoint = Endpoint::GetByName(node);
if (endpoint) if (endpoint)
@ -160,7 +160,7 @@ void DbObject::SendVarsConfigUpdate(void)
Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object); Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object);
if (vars) { if (vars) {
Log(LogDebug, "db_ido", "Updating object vars for '" + custom_var_object->GetName() + "'"); Log(LogDebug, "DbObject", "Updating object vars for '" + custom_var_object->GetName() + "'");
ObjectLock olock (vars); ObjectLock olock (vars);
@ -168,7 +168,7 @@ void DbObject::SendVarsConfigUpdate(void)
if (!kv.first.IsEmpty()) { if (!kv.first.IsEmpty()) {
int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0; int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0;
Log(LogDebug, "db_ido", "object customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) + Log(LogDebug, "DbObject", "object customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) +
"' overridden: " + Convert::ToString(overridden)); "' overridden: " + Convert::ToString(overridden));
Dictionary::Ptr fields = make_shared<Dictionary>(); Dictionary::Ptr fields = make_shared<Dictionary>();
@ -202,7 +202,7 @@ void DbObject::SendVarsStatusUpdate(void)
Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object); Dictionary::Ptr vars = CompatUtility::GetCustomAttributeConfig(custom_var_object);
if (vars) { if (vars) {
Log(LogDebug, "db_ido", "Updating object vars for '" + custom_var_object->GetName() + "'"); Log(LogDebug, "DbObject", "Updating object vars for '" + custom_var_object->GetName() + "'");
ObjectLock olock (vars); ObjectLock olock (vars);
@ -210,7 +210,7 @@ void DbObject::SendVarsStatusUpdate(void)
if (!kv.first.IsEmpty()) { if (!kv.first.IsEmpty()) {
int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0; int overridden = custom_var_object->IsVarOverridden(kv.first) ? 1 : 0;
Log(LogDebug, "db_ido", "object customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) + Log(LogDebug, "DbObject", "object customvar key: '" + kv.first + "' value: '" + Convert::ToString(kv.second) +
"' overridden: " + Convert::ToString(overridden)); "' overridden: " + Convert::ToString(overridden));
Dictionary::Ptr fields = make_shared<Dictionary>(); Dictionary::Ptr fields = make_shared<Dictionary>();
@ -322,7 +322,7 @@ void DbObject::VarsChangedHandler(const CustomVarObject::Ptr& object)
{ {
DbObject::Ptr dbobj = GetOrCreateByObject(object); DbObject::Ptr dbobj = GetOrCreateByObject(object);
Log(LogDebug, "db_ido", "Vars changed for object '" + object->GetName() + "'"); Log(LogDebug, "DbObject", "Vars changed for object '" + object->GetName() + "'");
if (!dbobj) if (!dbobj)
return; return;

View File

@ -62,7 +62,7 @@ Dictionary::Ptr EndpointDbObject::GetStatusFields(void) const
Dictionary::Ptr fields = make_shared<Dictionary>(); Dictionary::Ptr fields = make_shared<Dictionary>();
Endpoint::Ptr endpoint = static_pointer_cast<Endpoint>(GetObject()); Endpoint::Ptr endpoint = static_pointer_cast<Endpoint>(GetObject());
Log(LogDebug, "db_ido", "update status for endpoint '" + endpoint->GetName() + "'"); Log(LogDebug, "EndpointDbObject", "update status for endpoint '" + endpoint->GetName() + "'");
fields->Set("identity", endpoint->GetName()); fields->Set("identity", endpoint->GetName());
fields->Set("node", IcingaApplication::GetInstance()->GetNodeName()); fields->Set("node", IcingaApplication::GetInstance()->GetNodeName());
@ -75,7 +75,7 @@ void EndpointDbObject::UpdateConnectedStatus(const Endpoint::Ptr& endpoint)
{ {
bool connected = EndpointIsConnected(endpoint); bool connected = EndpointIsConnected(endpoint);
Log(LogDebug, "db_ido", "update is_connected=" + Convert::ToString(connected ? 1 : 0) + " for endpoint '" + endpoint->GetName() + "'"); Log(LogDebug, "EndpointDbObject", "update is_connected=" + Convert::ToString(connected ? 1 : 0) + " for endpoint '" + endpoint->GetName() + "'");
DbQuery query1; DbQuery query1;
query1.Table = "endpointstatus"; query1.Table = "endpointstatus";

View File

@ -184,7 +184,7 @@ void HostDbObject::OnConfigUpdate(void)
if (!parent) if (!parent)
continue; continue;
Log(LogDebug, "db_ido", "host parents: " + parent->GetName()); Log(LogDebug, "HostDbObject", "host parents: " + parent->GetName());
/* parents: host_id, parent_host_object_id */ /* parents: host_id, parent_host_object_id */
Dictionary::Ptr fields1 = make_shared<Dictionary>(); Dictionary::Ptr fields1 = make_shared<Dictionary>();
@ -201,19 +201,19 @@ void HostDbObject::OnConfigUpdate(void)
} }
/* host dependencies */ /* host dependencies */
Log(LogDebug, "db_ido", "host dependencies for '" + host->GetName() + "'"); Log(LogDebug, "HostDbObject", "host dependencies for '" + host->GetName() + "'");
BOOST_FOREACH(const Dependency::Ptr& dep, host->GetDependencies()) { BOOST_FOREACH(const Dependency::Ptr& dep, host->GetDependencies()) {
Checkable::Ptr parent = dep->GetParent(); Checkable::Ptr parent = dep->GetParent();
if (!parent) { if (!parent) {
Log(LogDebug, "db_ido", "Missing parent for dependency '" + dep->GetName() + "'."); Log(LogDebug, "HostDbObject", "Missing parent for dependency '" + dep->GetName() + "'.");
continue; continue;
} }
int state_filter = dep->GetStateFilter(); int state_filter = dep->GetStateFilter();
Log(LogDebug, "db_ido", "parent host: " + parent->GetName()); Log(LogDebug, "HostDbObject", "parent host: " + parent->GetName());
Dictionary::Ptr fields2 = make_shared<Dictionary>(); Dictionary::Ptr fields2 = make_shared<Dictionary>();
fields2->Set("host_object_id", parent); fields2->Set("host_object_id", parent);
@ -232,10 +232,10 @@ void HostDbObject::OnConfigUpdate(void)
OnQuery(query2); OnQuery(query2);
} }
Log(LogDebug, "db_ido", "host contacts: " + host->GetName()); Log(LogDebug, "HostDbObject", "host contacts: " + host->GetName());
BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(host)) { BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(host)) {
Log(LogDebug, "db_ido", "host contacts: " + user->GetName()); Log(LogDebug, "HostDbObject", "host contacts: " + user->GetName());
Dictionary::Ptr fields_contact = make_shared<Dictionary>(); Dictionary::Ptr fields_contact = make_shared<Dictionary>();
fields_contact->Set("host_id", DbValue::FromObjectInsertID(host)); fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));
@ -250,10 +250,10 @@ void HostDbObject::OnConfigUpdate(void)
OnQuery(query_contact); OnQuery(query_contact);
} }
Log(LogDebug, "db_ido", "host contactgroups: " + host->GetName()); Log(LogDebug, "HostDbObject", "host contactgroups: " + host->GetName());
BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(host)) { BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(host)) {
Log(LogDebug, "db_ido", "host contactgroups: " + usergroup->GetName()); Log(LogDebug, "HostDbObject", "host contactgroups: " + usergroup->GetName());
Dictionary::Ptr fields_contact = make_shared<Dictionary>(); Dictionary::Ptr fields_contact = make_shared<Dictionary>();
fields_contact->Set("host_id", DbValue::FromObjectInsertID(host)); fields_contact->Set("host_id", DbValue::FromObjectInsertID(host));

View File

@ -177,17 +177,17 @@ void ServiceDbObject::OnConfigUpdate(void)
Service::Ptr service = static_pointer_cast<Service>(GetObject()); Service::Ptr service = static_pointer_cast<Service>(GetObject());
/* service dependencies */ /* service dependencies */
Log(LogDebug, "db_ido", "service dependencies for '" + service->GetName() + "'"); Log(LogDebug, "ServiceDbObject", "service dependencies for '" + service->GetName() + "'");
BOOST_FOREACH(const Dependency::Ptr& dep, service->GetDependencies()) { BOOST_FOREACH(const Dependency::Ptr& dep, service->GetDependencies()) {
Checkable::Ptr parent = dep->GetParent(); Checkable::Ptr parent = dep->GetParent();
if (!parent) { if (!parent) {
Log(LogDebug, "db_ido", "Missing parent for dependency '" + dep->GetName() + "'."); Log(LogDebug, "ServiceDbObject", "Missing parent for dependency '" + dep->GetName() + "'.");
continue; continue;
} }
Log(LogDebug, "db_ido", "service parents: " + parent->GetName()); Log(LogDebug, "ServiceDbObject", "service parents: " + parent->GetName());
int state_filter = dep->GetStateFilter(); int state_filter = dep->GetStateFilter();
@ -212,10 +212,10 @@ void ServiceDbObject::OnConfigUpdate(void)
} }
/* service contacts, contactgroups */ /* service contacts, contactgroups */
Log(LogDebug, "db_ido", "service contacts: " + service->GetName()); Log(LogDebug, "ServiceDbObject", "service contacts: " + service->GetName());
BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(service)) { BOOST_FOREACH(const User::Ptr& user, CompatUtility::GetCheckableNotificationUsers(service)) {
Log(LogDebug, "db_ido", "service contacts: " + user->GetName()); Log(LogDebug, "ServiceDbObject", "service contacts: " + user->GetName());
Dictionary::Ptr fields_contact = make_shared<Dictionary>(); Dictionary::Ptr fields_contact = make_shared<Dictionary>();
fields_contact->Set("service_id", DbValue::FromObjectInsertID(service)); fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));
@ -230,10 +230,10 @@ void ServiceDbObject::OnConfigUpdate(void)
OnQuery(query_contact); OnQuery(query_contact);
} }
Log(LogDebug, "db_ido", "service contactgroups: " + service->GetName()); Log(LogDebug, "ServiceDbObject", "service contactgroups: " + service->GetName());
BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(service)) { BOOST_FOREACH(const UserGroup::Ptr& usergroup, CompatUtility::GetCheckableNotificationUserGroups(service)) {
Log(LogDebug, "db_ido", "service contactgroups: " + usergroup->GetName()); Log(LogDebug, "ServiceDbObject", "service contactgroups: " + usergroup->GetName());
Dictionary::Ptr fields_contact = make_shared<Dictionary>(); Dictionary::Ptr fields_contact = make_shared<Dictionary>();
fields_contact->Set("service_id", DbValue::FromObjectInsertID(service)); fields_contact->Set("service_id", DbValue::FromObjectInsertID(service));

View File

@ -85,7 +85,7 @@ void UserDbObject::OnConfigUpdate(void)
User::Ptr user = static_pointer_cast<User>(GetObject()); User::Ptr user = static_pointer_cast<User>(GetObject());
/* contact addresses */ /* contact addresses */
Log(LogDebug, "db_ido", "contact addresses for '" + user->GetName() + "'"); Log(LogDebug, "UserDbObject", "contact addresses for '" + user->GetName() + "'");
Dictionary::Ptr vars = user->GetVars(); Dictionary::Ptr vars = user->GetVars();