livestatus: add num_hosts|services to status table

refs #4372
This commit is contained in:
Michael Friedrich 2013-07-18 09:48:15 +02:00
parent 33e5a839db
commit 03a830c453
1 changed files with 3 additions and 4 deletions

View File

@ -20,6 +20,7 @@
#include "livestatus/statustable.h" #include "livestatus/statustable.h"
#include "icinga/icingaapplication.h" #include "icinga/icingaapplication.h"
#include "icinga/cib.h" #include "icinga/cib.h"
#include "base/dynamictype.h"
#include <boost/smart_ptr/make_shared.hpp> #include <boost/smart_ptr/make_shared.hpp>
using namespace icinga; using namespace icinga;
@ -335,14 +336,12 @@ Value StatusTable::IntervalLengthAccessor(const Value& row)
Value StatusTable::NumHostsAccessor(const Value& row) Value StatusTable::NumHostsAccessor(const Value& row)
{ {
/* TODO */ return DynamicType::GetObjects("Host").size();
return Empty;
} }
Value StatusTable::NumServicesAccessor(const Value& row) Value StatusTable::NumServicesAccessor(const Value& row)
{ {
/* TODO */ return DynamicType::GetObjects("Service").size();
return Empty;
} }
Value StatusTable::ProgramVersionAccessor(const Value& row) Value StatusTable::ProgramVersionAccessor(const Value& row)