mirror of https://github.com/Icinga/icinga2.git
parent
d8203f4bb5
commit
2cab6fbb9d
|
@ -29,7 +29,7 @@ REGISTER_TYPE(FileLogger);
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(FileLoggerStats, &FileLogger::StatsFunc);
|
REGISTER_STATSFUNCTION(FileLoggerStats, &FileLogger::StatsFunc);
|
||||||
|
|
||||||
void FileLogger::StatsFunc(Dictionary::Ptr& status, Array::Ptr&)
|
void FileLogger::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
|
||||||
{
|
{
|
||||||
Dictionary::Ptr nodes = new Dictionary();
|
Dictionary::Ptr nodes = new Dictionary();
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
DECLARE_OBJECT(FileLogger);
|
DECLARE_OBJECT(FileLogger);
|
||||||
DECLARE_OBJECTNAME(FileLogger);
|
DECLARE_OBJECTNAME(FileLogger);
|
||||||
|
|
||||||
static void StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
|
|
||||||
virtual void Start(void);
|
virtual void Start(void);
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ StatsFunction::StatsFunction(const Callback& function)
|
||||||
: m_Callback(function)
|
: m_Callback(function)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void StatsFunction::Invoke(Dictionary::Ptr& status, Array::Ptr& perfdata)
|
void StatsFunction::Invoke(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||||
{
|
{
|
||||||
m_Callback(status, perfdata);
|
m_Callback(status, perfdata);
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,11 +40,11 @@ class I2_BASE_API StatsFunction : public Object
|
||||||
public:
|
public:
|
||||||
DECLARE_PTR_TYPEDEFS(StatsFunction);
|
DECLARE_PTR_TYPEDEFS(StatsFunction);
|
||||||
|
|
||||||
typedef boost::function<void (Dictionary::Ptr& status, Array::Ptr& perfdata)> Callback;
|
typedef boost::function<void (const Dictionary::Ptr& status, const Array::Ptr& perfdata)> Callback;
|
||||||
|
|
||||||
StatsFunction(const Callback& function);
|
StatsFunction(const Callback& function);
|
||||||
|
|
||||||
void Invoke(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
void Invoke(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Callback m_Callback;
|
Callback m_Callback;
|
||||||
|
|
|
@ -28,7 +28,7 @@ REGISTER_TYPE(SyslogLogger);
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(SyslogLoggerStats, &SyslogLogger::StatsFunc);
|
REGISTER_STATSFUNCTION(SyslogLoggerStats, &SyslogLogger::StatsFunc);
|
||||||
|
|
||||||
void SyslogLogger::StatsFunc(Dictionary::Ptr& status, Array::Ptr&)
|
void SyslogLogger::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr&)
|
||||||
{
|
{
|
||||||
Dictionary::Ptr nodes = new Dictionary();
|
Dictionary::Ptr nodes = new Dictionary();
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
DECLARE_OBJECT(SyslogLogger);
|
DECLARE_OBJECT(SyslogLogger);
|
||||||
DECLARE_OBJECTNAME(SyslogLogger);
|
DECLARE_OBJECTNAME(SyslogLogger);
|
||||||
|
|
||||||
static void StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ProcessLogEntry(const LogEntry& entry);
|
virtual void ProcessLogEntry(const LogEntry& entry);
|
||||||
|
|
|
@ -63,7 +63,7 @@ void IcingaApplication::StaticInitialize(void)
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);
|
REGISTER_STATSFUNCTION(IcingaApplicationStats, &IcingaApplication::StatsFunc);
|
||||||
|
|
||||||
void IcingaApplication::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
|
void IcingaApplication::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||||
{
|
{
|
||||||
Dictionary::Ptr nodes = new Dictionary();
|
Dictionary::Ptr nodes = new Dictionary();
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public:
|
||||||
|
|
||||||
int Main(void);
|
int Main(void);
|
||||||
|
|
||||||
static void StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
|
|
||||||
static IcingaApplication::Ptr GetInstance(void);
|
static IcingaApplication::Ptr GetInstance(void);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ REGISTER_TYPE(IcingaStatusWriter);
|
||||||
|
|
||||||
REGISTER_STATSFUNCTION(IcingaStatusWriterStats, &IcingaStatusWriter::StatsFunc);
|
REGISTER_STATSFUNCTION(IcingaStatusWriterStats, &IcingaStatusWriter::StatsFunc);
|
||||||
|
|
||||||
void IcingaStatusWriter::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
|
void IcingaStatusWriter::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||||
{
|
{
|
||||||
Dictionary::Ptr nodes = new Dictionary();
|
Dictionary::Ptr nodes = new Dictionary();
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
DECLARE_OBJECT(IcingaStatusWriter);
|
DECLARE_OBJECT(IcingaStatusWriter);
|
||||||
DECLARE_OBJECTNAME(IcingaStatusWriter);
|
DECLARE_OBJECTNAME(IcingaStatusWriter);
|
||||||
|
|
||||||
static void StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
static Dictionary::Ptr GetStatusData(void);
|
static Dictionary::Ptr GetStatusData(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -747,7 +747,7 @@ void ApiListener::ReplayLog(const ApiClient::Ptr& client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiListener::StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata)
|
void ApiListener::StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata)
|
||||||
{
|
{
|
||||||
Dictionary::Ptr nodes = new Dictionary();
|
Dictionary::Ptr nodes = new Dictionary();
|
||||||
std::pair<Dictionary::Ptr, Dictionary::Ptr> stats;
|
std::pair<Dictionary::Ptr, Dictionary::Ptr> stats;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
void SyncSendMessage(const Endpoint::Ptr& endpoint, const Dictionary::Ptr& message);
|
void SyncSendMessage(const Endpoint::Ptr& endpoint, const Dictionary::Ptr& message);
|
||||||
void RelayMessage(const MessageOrigin& origin, const DynamicObject::Ptr& secobj, const Dictionary::Ptr& message, bool log);
|
void RelayMessage(const MessageOrigin& origin, const DynamicObject::Ptr& secobj, const Dictionary::Ptr& message, bool log);
|
||||||
|
|
||||||
static void StatsFunc(Dictionary::Ptr& status, Array::Ptr& perfdata);
|
static void StatsFunc(const Dictionary::Ptr& status, const Array::Ptr& perfdata);
|
||||||
std::pair<Dictionary::Ptr, Dictionary::Ptr> GetStatus(void);
|
std::pair<Dictionary::Ptr, Dictionary::Ptr> GetStatus(void);
|
||||||
|
|
||||||
void AddAnonymousClient(const ApiClient::Ptr& aclient);
|
void AddAnonymousClient(const ApiClient::Ptr& aclient);
|
||||||
|
|
Loading…
Reference in New Issue