mirror of https://github.com/Icinga/icinga2.git
parent
706de78634
commit
bb2338631f
|
@ -353,10 +353,13 @@ void StatusDataWriter::DumpCheckableStatusAttrs(std::ostream& fp, const Checkabl
|
|||
Service::Ptr service;
|
||||
tie(host, service) = GetHostService(checkable);
|
||||
|
||||
if (service)
|
||||
fp << "\t" << "current_state=" << service->GetState() << "\n";
|
||||
else
|
||||
fp << "\t" << "current_state=" << (host->IsReachable() ? host->GetState() : 2) << "\n";
|
||||
if (service) {
|
||||
fp << "\t" << "current_state=" << service->GetState() << "\n"
|
||||
<< "\t" << "last_hard_state=" << service->GetLastHardState() << "\n";
|
||||
} else {
|
||||
fp << "\t" << "current_state=" << (host->IsReachable() ? host->GetState() : 2) << "\n"
|
||||
<< "\t" << "last_hard_state=" << host->GetLastHardState() << "\n";
|
||||
}
|
||||
|
||||
fp << "\t" "state_type=" << checkable->GetStateType() << "\n"
|
||||
"\t" "plugin_output=" << CompatUtility::GetCheckResultOutput(cr) << "\n"
|
||||
|
|
|
@ -494,7 +494,8 @@ void DbEvents::AddDowntimeInternal(const Checkable::Ptr& checkable, const Downti
|
|||
<< "adding service downtime (id = " << downtime->GetLegacyId() << ") for '" << checkable->GetName() << "'";
|
||||
|
||||
/* add the downtime */
|
||||
AddDowntimeByType(checkable, downtime, historical);}
|
||||
AddDowntimeByType(checkable, downtime, historical);
|
||||
}
|
||||
|
||||
void DbEvents::AddDowntimeByType(const Checkable::Ptr& checkable, const Downtime::Ptr& downtime, bool historical)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue