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);
string method, bool includeProperties);
static bool ShouldReplicateObject(const ConfigObject::Ptr& object);
-
};
}
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"
<< "\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"
<< "\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";
}