result->SetExecutionEnd(time);
result->SetActive(false);
- Log(LogInformation, "icinga", "Processing passive check result for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Processing passive check result for host '" + arguments[0] + "'");
host->ProcessCheckResult(result);
{
result->SetExecutionEnd(time);
result->SetActive(false);
- Log(LogInformation, "icinga", "Processing passive check result for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Processing passive check result for service '" + arguments[1] + "'");
service->ProcessCheckResult(result);
{
double planned_check = Convert::ToDouble(arguments[1]);
if (planned_check > host->GetNextCheck()) {
- Log(LogInformation, "icinga", "Ignoring reschedule request for host '" +
+ Log(LogNotice, "icinga", "Ignoring reschedule request for host '" +
arguments[0] + "' (next check is already sooner than requested check time)");
return;
}
- Log(LogInformation, "icinga", "Rescheduling next check for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for host '" + arguments[0] + "'");
if (planned_check < Utility::GetTime())
planned_check = Utility::GetTime();
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot reschedule forced host check for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Rescheduling next check for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
double planned_check = Convert::ToDouble(arguments[2]);
if (planned_check > service->GetNextCheck()) {
- Log(LogInformation, "icinga", "Ignoring reschedule request for service '" +
+ Log(LogNotice, "icinga", "Ignoring reschedule request for service '" +
arguments[1] + "' (next check is already sooner than requested check time)");
return;
}
- Log(LogInformation, "icinga", "Rescheduling next check for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for service '" + arguments[1] + "'");
if (planned_check < Utility::GetTime())
planned_check = Utility::GetTime();
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot reschedule forced service check for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Rescheduling next check for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host checks for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling active checks for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host check non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling active checks for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service check for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling active checks for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service check for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling active checks for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
void ExternalCommandProcessor::ShutdownProcess(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Shutting down Icinga via external command.");
+ Log(LogNotice, "icinga", "Shutting down Icinga via external command.");
Application::RequestShutdown();
}
void ExternalCommandProcessor::RestartProcess(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Restarting Icinga via external command.");
+ Log(LogNotice, "icinga", "Restarting Icinga via external command.");
Application::RequestRestart();
}
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot reschedule forced host service checks for non-existent host '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Rescheduling next check for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
if (planned_check > service->GetNextCheck()) {
- Log(LogInformation, "icinga", "Ignoring reschedule request for service '" +
+ Log(LogNotice, "icinga", "Ignoring reschedule request for service '" +
service->GetName() + "' (next check is already sooner than requested check time)");
continue;
}
- Log(LogInformation, "icinga", "Rescheduling next check for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Rescheduling next check for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host service checks for non-existent host '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
service->SetEnableActiveChecks(true);
}
}
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host service checks for non-existent host '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
if (service->GetState() == ServiceOK)
BOOST_THROW_EXCEPTION(std::invalid_argument("The service '" + arguments[1] + "' is OK."));
- Log(LogInformation, "icinga", "Setting acknowledgement for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Setting acknowledgement for service '" + service->GetName() + "'");
service->AddComment(CommentAcknowledgement, arguments[5], arguments[6], 0);
service->AcknowledgeProblem(arguments[5], arguments[6], sticky ? AcknowledgementSticky : AcknowledgementNormal);
if (service->GetState() == ServiceOK)
BOOST_THROW_EXCEPTION(std::invalid_argument("The service '" + arguments[1] + "' is OK."));
- Log(LogInformation, "icinga", "Setting timed acknowledgement for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Setting timed acknowledgement for service '" + service->GetName() + "'");
service->AddComment(CommentAcknowledgement, arguments[6], arguments[7], 0);
service->AcknowledgeProblem(arguments[6], arguments[7], sticky ? AcknowledgementSticky : AcknowledgementNormal, timestamp);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot remove service acknowledgement for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Removing acknowledgement for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Removing acknowledgement for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot acknowledge host problem for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Setting acknowledgement for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Setting acknowledgement for host '" + host->GetName() + "'");
if (host->GetState() == HostUp)
BOOST_THROW_EXCEPTION(std::invalid_argument("The host '" + arguments[0] + "' is OK."));
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot acknowledge host problem with expire time for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Setting timed acknowledgement for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Setting timed acknowledgement for host '" + host->GetName() + "'");
if (host->GetState() == HostUp)
BOOST_THROW_EXCEPTION(std::invalid_argument("The host '" + arguments[0] + "' is OK."));
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot remove acknowledgement for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Removing acknowledgement for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Removing acknowledgement for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup service checks for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable servicegroup service checks for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable passive host checks for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling passive checks for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable passive host checks for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling passive checks for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service checks for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling passive checks for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service checks for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling passive checks for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable servicegroup passive service checks for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling passive checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable servicegroup passive service checks for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling passive checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Enabling passive checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Disabling passive checks for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
std::getline(ifp, line);
try {
- Log(LogInformation, "compat", "Executing external command: " + line);
+ Log(LogNotice, "compat", "Executing external command: " + line);
Execute(line);
} catch (const std::exception& ex) {
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
- Log(LogInformation, "icinga", "Creating downtime for service " + service->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for service " + service->GetName());
(void) service->AddDowntime(arguments[7], arguments[8],
Convert::ToDouble(arguments[2]), Convert::ToDouble(arguments[3]),
Convert::ToBool(arguments[4]), triggeredBy, Convert::ToDouble(arguments[6]));
void ExternalCommandProcessor::DelSvcDowntime(double, const std::vector<String>& arguments)
{
int id = Convert::ToLong(arguments[0]);
- Log(LogInformation, "icinga", "Removing downtime ID " + arguments[0]);
+ Log(LogNotice, "icinga", "Removing downtime ID " + arguments[0]);
String rid = Service::GetDowntimeIDFromLegacyID(id);
Service::RemoveDowntime(rid, true);
}
if (triggeredByLegacy != 0)
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
- Log(LogInformation, "icinga", "Creating downtime for host " + host->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for host " + host->GetName());
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
void ExternalCommandProcessor::DelHostDowntime(double, const std::vector<String>& arguments)
{
int id = Convert::ToLong(arguments[0]);
- Log(LogInformation, "icinga", "Removing downtime ID " + arguments[0]);
+ Log(LogNotice, "icinga", "Removing downtime ID " + arguments[0]);
String rid = Service::GetDowntimeIDFromLegacyID(id);
Service::RemoveDowntime(rid, true);
}
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Creating downtime for service " + service->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for service " + service->GetName());
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Creating downtime for host " + host->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for host " + host->GetName());
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
}
BOOST_FOREACH(const Service::Ptr& service, services) {
- Log(LogInformation, "icinga", "Creating downtime for service " + service->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for service " + service->GetName());
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
}
BOOST_FOREACH(const Host::Ptr& host, hosts) {
- Log(LogInformation, "icinga", "Creating downtime for host " + host->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for host " + host->GetName());
(void) host->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
triggeredBy = Service::GetDowntimeIDFromLegacyID(triggeredByLegacy);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Creating downtime for service " + service->GetName());
+ Log(LogNotice, "icinga", "Creating downtime for service " + service->GetName());
(void) service->AddDowntime(arguments[6], arguments[7],
Convert::ToDouble(arguments[1]), Convert::ToDouble(arguments[2]),
Convert::ToBool(arguments[3]), triggeredBy, Convert::ToDouble(arguments[5]));
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot add host comment for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Creating comment for host " + host->GetName());
+ Log(LogNotice, "icinga", "Creating comment for host " + host->GetName());
(void) host->AddComment(CommentUser, arguments[2], arguments[3], 0);
}
void ExternalCommandProcessor::DelHostComment(double, const std::vector<String>& arguments)
{
int id = Convert::ToLong(arguments[0]);
- Log(LogInformation, "icinga", "Removing comment ID " + arguments[0]);
+ Log(LogNotice, "icinga", "Removing comment ID " + arguments[0]);
String rid = Service::GetCommentIDFromLegacyID(id);
Service::RemoveComment(rid);
}
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot add service comment for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Creating comment for service " + service->GetName());
+ Log(LogNotice, "icinga", "Creating comment for service " + service->GetName());
(void) service->AddComment(CommentUser, arguments[3], arguments[4], 0);
}
void ExternalCommandProcessor::DelSvcComment(double, const std::vector<String>& arguments)
{
int id = Convert::ToLong(arguments[0]);
- Log(LogInformation, "icinga", "Removing comment ID " + arguments[0]);
+ Log(LogNotice, "icinga", "Removing comment ID " + arguments[0]);
String rid = Service::GetCommentIDFromLegacyID(id);
Service::RemoveComment(rid);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delete all host comments for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Removing all comments for host " + host->GetName());
+ Log(LogNotice, "icinga", "Removing all comments for host " + host->GetName());
host->RemoveAllComments();
}
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delete all service comments for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Removing all comments for service " + service->GetName());
+ Log(LogNotice, "icinga", "Removing all comments for service " + service->GetName());
service->RemoveAllComments();
}
int options = Convert::ToLong(arguments[1]);
- Log(LogInformation, "icinga", "Sending custom notification for host " + host->GetName());
+ Log(LogNotice, "icinga", "Sending custom notification for host " + host->GetName());
if (options & 2) {
ObjectLock olock(host);
host->SetForceNextNotification(true);
int options = Convert::ToLong(arguments[2]);
- Log(LogInformation, "icinga", "Sending custom notification for service " + service->GetName());
+ Log(LogNotice, "icinga", "Sending custom notification for service " + service->GetName());
if (options & 2) {
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delay host notification for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Delaying notifications for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Delaying notifications for host '" + host->GetName() + "'");
BOOST_FOREACH(const Notification::Ptr& notification, host->GetNotifications()) {
ObjectLock olock(notification);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot delay service notification for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Delaying notifications for service " + service->GetName());
+ Log(LogNotice, "icinga", "Delaying notifications for service " + service->GetName());
BOOST_FOREACH(const Notification::Ptr& notification, service->GetNotifications()) {
ObjectLock olock(notification);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host notifications for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling notifications for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host notifications for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling notifications for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service notifications for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling notifications for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service notifications for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling notifications for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable hostgroup host checks for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling active checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable hostgroup passive host checks for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling passive checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Disabling active checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling active checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Disabling passive checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling passive checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable hostgroup host checks for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling active checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable hostgroup passive host checks for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling passive checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Enabling active checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling active checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Enabling passive checks for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling passive checks for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host flapping for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling flapping detection for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Enabling flapping detection for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host flapping for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling flapping detection for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Disabling flapping detection for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service flapping for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling flapping detection for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Enabling flapping detection for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service flapping for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling flapping detection for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Disabling flapping detection for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
void ExternalCommandProcessor::EnableNotifications(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling notifications.");
+ Log(LogNotice, "icinga", "Globally enabling notifications.");
IcingaApplication::GetInstance()->SetEnableNotifications(true);
}
void ExternalCommandProcessor::DisableNotifications(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling notifications.");
+ Log(LogNotice, "icinga", "Globally disabling notifications.");
IcingaApplication::GetInstance()->SetEnableNotifications(false);
}
void ExternalCommandProcessor::EnableFlapDetection(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling flap detection.");
+ Log(LogNotice, "icinga", "Globally enabling flap detection.");
IcingaApplication::GetInstance()->SetEnableFlapping(true);
}
void ExternalCommandProcessor::DisableFlapDetection(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling flap detection.");
+ Log(LogNotice, "icinga", "Globally disabling flap detection.");
IcingaApplication::GetInstance()->SetEnableFlapping(false);
}
void ExternalCommandProcessor::EnableEventHandlers(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling event handlers.");
+ Log(LogNotice, "icinga", "Globally enabling event handlers.");
IcingaApplication::GetInstance()->SetEnableEventHandlers(true);
}
void ExternalCommandProcessor::DisableEventHandlers(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling event handlers.");
+ Log(LogNotice, "icinga", "Globally disabling event handlers.");
IcingaApplication::GetInstance()->SetEnableEventHandlers(false);
}
void ExternalCommandProcessor::EnablePerformanceData(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling performance data processing.");
+ Log(LogNotice, "icinga", "Globally enabling performance data processing.");
IcingaApplication::GetInstance()->SetEnablePerfdata(true);
}
void ExternalCommandProcessor::DisablePerformanceData(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling performance data processing.");
+ Log(LogNotice, "icinga", "Globally disabling performance data processing.");
IcingaApplication::GetInstance()->SetEnablePerfdata(false);
}
void ExternalCommandProcessor::StartExecutingSvcChecks(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling service checks.");
+ Log(LogNotice, "icinga", "Globally enabling service checks.");
IcingaApplication::GetInstance()->SetEnableServiceChecks(true);
}
void ExternalCommandProcessor::StopExecutingSvcChecks(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling service checks.");
+ Log(LogNotice, "icinga", "Globally disabling service checks.");
IcingaApplication::GetInstance()->SetEnableServiceChecks(false);
}
void ExternalCommandProcessor::StartExecutingHostChecks(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally enabling host checks.");
+ Log(LogNotice, "icinga", "Globally enabling host checks.");
IcingaApplication::GetInstance()->SetEnableHostChecks(true);
}
void ExternalCommandProcessor::StopExecutingHostChecks(double, const std::vector<String>&)
{
- Log(LogInformation, "icinga", "Globally disabling host checks.");
+ Log(LogNotice, "icinga", "Globally disabling host checks.");
IcingaApplication::GetInstance()->SetEnableHostChecks(false);
}
int modifiedAttributes = Convert::ToLong(arguments[2]);
- Log(LogInformation, "icinga", "Updating modified attributes for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Updating modified attributes for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Updating modified attributes for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Updating modified attributes for host '" + arguments[0] + "'");
int modifiedAttributes = Convert::ToLong(arguments[1]);
if (!user)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update modified attributes for non-existent user '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Updating modified attributes for user '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Updating modified attributes for user '" + arguments[0] + "'");
int modifiedAttributes = Convert::ToLong(arguments[1]);
void ExternalCommandProcessor::ChangeCommandModattrInternal(const Command::Ptr& command, int mod_attr)
{
- Log(LogInformation, "icinga", "Updating modified attributes for command '" + command->GetName() + "'");
+ Log(LogNotice, "icinga", "Updating modified attributes for command '" + command->GetName() + "'");
{
ObjectLock olock(command);
double interval = Convert::ToDouble(arguments[2]);
- Log(LogInformation, "icinga", "Updating check interval for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Updating check interval for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update check interval for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Updating check interval for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Updating check interval for host '" + arguments[0] + "'");
double interval = Convert::ToDouble(arguments[1]);
double interval = Convert::ToDouble(arguments[2]);
- Log(LogInformation, "icinga", "Updating retry interval for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Updating retry interval for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot update retry interval for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Updating retry interval for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Updating retry interval for host '" + arguments[0] + "'");
double interval = Convert::ToDouble(arguments[1]);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable event handler for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling event handler for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Enabling event handler for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!host)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable event handler for non-existent host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling event handler for host '" + arguments[0] + "'");
+ Log(LogNotice, "icinga", "Disabling event handler for host '" + arguments[0] + "'");
{
ObjectLock olock(host);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable event handler for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Enabling event handler for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Enabling event handler for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!service)
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable event handler for non-existent service '" + arguments[1] + "' on host '" + arguments[0] + "'"));
- Log(LogInformation, "icinga", "Disabling event handler for service '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Disabling event handler for service '" + arguments[1] + "'");
{
ObjectLock olock(service);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Event command '" + arguments[1] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing event handler for host '" + arguments[0] + "' to '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Changing event handler for host '" + arguments[0] + "' to '" + arguments[1] + "'");
{
ObjectLock olock(host);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Event command '" + arguments[2] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing event handler for service '" + arguments[1] + "' to '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing event handler for service '" + arguments[1] + "' to '" + arguments[2] + "'");
{
ObjectLock olock(service);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Check command '" + arguments[1] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing check command for host '" + arguments[0] + "' to '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Changing check command for host '" + arguments[0] + "' to '" + arguments[1] + "'");
{
ObjectLock olock(host);
if (!command)
BOOST_THROW_EXCEPTION(std::invalid_argument("Check command '" + arguments[2] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing check command for service '" + arguments[1] + "' to '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing check command for service '" + arguments[1] + "' to '" + arguments[2] + "'");
{
ObjectLock olock(service);
int attempts = Convert::ToLong(arguments[1]);
- Log(LogInformation, "icinga", "Changing max check attempts for host '" + arguments[0] + "' to '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Changing max check attempts for host '" + arguments[0] + "' to '" + arguments[1] + "'");
{
ObjectLock olock(host);
int attempts = Convert::ToLong(arguments[2]);
- Log(LogInformation, "icinga", "Changing max check attempts for service '" + arguments[1] + "' to '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing max check attempts for service '" + arguments[1] + "' to '" + arguments[2] + "'");
{
ObjectLock olock(service);
if (!tp)
BOOST_THROW_EXCEPTION(std::invalid_argument("Time period '" + arguments[1] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing check period for host '" + arguments[0] + "' to '" + arguments[1] + "'");
+ Log(LogNotice, "icinga", "Changing check period for host '" + arguments[0] + "' to '" + arguments[1] + "'");
{
ObjectLock olock(host);
if (!tp)
BOOST_THROW_EXCEPTION(std::invalid_argument("Time period '" + arguments[2] + "' does not exist."));
- Log(LogInformation, "icinga", "Changing check period for service '" + arguments[1] + "' to '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing check period for service '" + arguments[1] + "' to '" + arguments[2] + "'");
{
ObjectLock olock(service);
override_vars->Set(arguments[1], arguments[2]);
- Log(LogInformation, "icinga", "Changing custom var '" + arguments[1] + "' for host '" + arguments[0] + "' to value '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing custom var '" + arguments[1] + "' for host '" + arguments[0] + "' to value '" + arguments[2] + "'");
{
ObjectLock olock(host);
override_vars->Set(arguments[2], arguments[3]);
- Log(LogInformation, "icinga", "Changing custom var '" + arguments[2] + "' for service '" + arguments[1] + "' on host '" +
+ Log(LogNotice, "icinga", "Changing custom var '" + arguments[2] + "' for service '" + arguments[1] + "' on host '" +
arguments[0] + "' to value '" + arguments[3] + "'");
{
override_vars->Set(arguments[1], arguments[2]);
- Log(LogInformation, "icinga", "Changing custom var '" + arguments[1] + "' for user '" + arguments[0] + "' to value '" + arguments[2] + "'");
+ Log(LogNotice, "icinga", "Changing custom var '" + arguments[1] + "' for user '" + arguments[0] + "' to value '" + arguments[2] + "'");
{
ObjectLock olock(user);
override_vars->Set(name, value);
- Log(LogInformation, "icinga", "Changing custom var '" + name + "' for command '" + command->GetName() + "' to value '" + Convert::ToString(value) + "'");
+ Log(LogNotice, "icinga", "Changing custom var '" + name + "' for command '" + command->GetName() + "' to value '" + Convert::ToString(value) + "'");
{
ObjectLock olock(command);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable host notifications for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling notifications for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Enabling notifications for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable host notifications for non-existent hostgroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling notifications for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_FOREACH(const Host::Ptr& host, hg->GetMembers()) {
BOOST_FOREACH(const Service::Ptr& service, host->GetServices()) {
- Log(LogInformation, "icinga", "Disabling notifications for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Enabling notifications for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot enable service notifications for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Enabling notifications for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Enabling notifications for service '" + service->GetName() + "'");
{
ObjectLock olock(service);
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
Host::Ptr host = service->GetHost();
- Log(LogInformation, "icinga", "Disabling notifications for host '" + host->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for host '" + host->GetName() + "'");
{
ObjectLock olock(host);
BOOST_THROW_EXCEPTION(std::invalid_argument("Cannot disable service notifications for non-existent servicegroup '" + arguments[0] + "'"));
BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
- Log(LogInformation, "icinga", "Disabling notifications for service '" + service->GetName() + "'");
+ Log(LogNotice, "icinga", "Disabling notifications for service '" + service->GetName() + "'");
{
ObjectLock olock(service);