mirror of https://github.com/Icinga/icinga2.git
Bugfixes.
This commit is contained in:
parent
9a0cae862a
commit
1b421d0cc0
|
@ -33,3 +33,4 @@ int CIB::GetInformationTypes(void)
|
|||
{
|
||||
return m_Types;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,10 @@ public:
|
|||
|
||||
private:
|
||||
VirtualEndpoint::Ptr m_Endpoint;
|
||||
bool m_SyncingConfig;
|
||||
|
||||
static void ServiceStatusRequestHandler(const Endpoint::Ptr& sender, const RequestMessage& request);
|
||||
|
||||
bool m_SyncingConfig;
|
||||
|
||||
void NewEndpointHandler(const Endpoint::Ptr& endpoint);
|
||||
void SessionEstablishedHandler(const Endpoint::Ptr& endpoint);
|
||||
|
||||
|
@ -54,7 +53,6 @@ private:
|
|||
string method, bool includeProperties);
|
||||
|
||||
static bool ShouldReplicateObject(const ConfigObject::Ptr& object);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -112,6 +112,11 @@ void CompatComponent::DumpServiceStatus(ofstream& fp, Service service)
|
|||
long execution_time = (execution_end - execution_start);
|
||||
long latency = (schedule_end - schedule_start) - execution_time;
|
||||
|
||||
int state = service.GetState();
|
||||
|
||||
if (state >= StateUnknown)
|
||||
state = StateUnknown;
|
||||
|
||||
fp << "servicestatus {" << "\n"
|
||||
<< "\t" << "host_name=" << service.GetHost().GetName() << "\n"
|
||||
<< "\t" << "service_description=" << service.GetAlias() << "\n"
|
||||
|
@ -121,7 +126,7 @@ void CompatComponent::DumpServiceStatus(ofstream& fp, Service service)
|
|||
<< "\t" << "should_be_scheduled=1" << "\n"
|
||||
<< "\t" << "check_execution_time=" << execution_time << "\n"
|
||||
<< "\t" << "check_latency=" << latency << "\n"
|
||||
<< "\t" << "current_state=" << service.GetState() << "\n"
|
||||
<< "\t" << "current_state=" << state << "\n"
|
||||
<< "\t" << "state_type=" << service.GetStateType() << "\n"
|
||||
<< "\t" << "plugin_output=" << output << "\n"
|
||||
<< "\t" << "performance_data=" << perfdata << "\n"
|
||||
|
@ -149,6 +154,7 @@ void CompatComponent::DumpServiceObject(ofstream& fp, Service service)
|
|||
<< "\t" << "max_check_attempts" << "\t" << 1 << "\n"
|
||||
<< "\t" << "active_checks_enabled" << "\t" << 1 << "\n"
|
||||
<< "\t" << "passive_checks_enabled" << "\t" << 1 << "\n"
|
||||
<< "\t" << "check_freshness" << "\t" << 1 << "\n"
|
||||
<< "\t" << "}" << "\n"
|
||||
<< "\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue