mirror of https://github.com/Icinga/icinga2.git
livestatus: add contact*, status, service table attributes
comments and downtimes require special object treatment -> linked to services? refs #4372
This commit is contained in:
parent
3023686042
commit
aefda9f124
|
@ -35,17 +35,17 @@ CommentsTable::CommentsTable(void)
|
|||
void CommentsTable::AddColumns(Table *table, const String& prefix,
|
||||
const Column::ObjectAccessor& objectAccessor)
|
||||
{
|
||||
table->AddColumn(prefix + "author", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "comment", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "id", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_time", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "type", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "is_service", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "persistent", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "source", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_type", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "expires", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "expire_time", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "author", Column(&CommentsTable::AuthorAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "comment", Column(&CommentsTable::CommentAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "id", Column(&CommentsTable::IdAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_time", Column(&CommentsTable::EntryTimeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "type", Column(&CommentsTable::TypeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "is_service", Column(&CommentsTable::IsServiceAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "persistent", Column(&CommentsTable::PersistentAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "source", Column(&CommentsTable::SourceAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_type", Column(&CommentsTable::EntryTypeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "expires", Column(&CommentsTable::ExpiresAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "expire_time", Column(&CommentsTable::ExpireTimeAccessor, objectAccessor));
|
||||
|
||||
// TODO: Join services table.
|
||||
}
|
||||
|
@ -72,3 +72,93 @@ void CommentsTable::FetchRows(const AddRowFunction& addRowFn)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Value CommentsTable::AuthorAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("author");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::CommentAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("text");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::IdAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("legacy_id");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::EntryTimeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("entry_time");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::TypeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value CommentsTable::IsServiceAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Service::Ptr svc = Service::GetOwnerByCommentID(row);
|
||||
|
||||
return (svc->IsHostCheck() ? 0 : 1);
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::PersistentAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - always 1 */
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value CommentsTable::SourceAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value CommentsTable::EntryTypeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("entry_type");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::ExpiresAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("expires");
|
||||
*/
|
||||
}
|
||||
|
||||
Value CommentsTable::ExpireTimeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr comment = Service::GetCommentByID(row);
|
||||
|
||||
return comment->Get("expire_time");
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -44,6 +44,18 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||
|
||||
static Value AuthorAccessor(const Object::Ptr& object);
|
||||
static Value CommentAccessor(const Object::Ptr& object);
|
||||
static Value IdAccessor(const Object::Ptr& object);
|
||||
static Value EntryTimeAccessor(const Object::Ptr& object);
|
||||
static Value TypeAccessor(const Object::Ptr& object);
|
||||
static Value IsServiceAccessor(const Object::Ptr& object);
|
||||
static Value PersistentAccessor(const Object::Ptr& object);
|
||||
static Value SourceAccessor(const Object::Ptr& object);
|
||||
static Value EntryTypeAccessor(const Object::Ptr& object);
|
||||
static Value ExpiresAccessor(const Object::Ptr& object);
|
||||
static Value ExpireTimeAccessor(const Object::Ptr& object);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ void ContactGroupsTable::AddColumns(Table *table, const String& prefix,
|
|||
const Column::ObjectAccessor& objectAccessor)
|
||||
{
|
||||
table->AddColumn(prefix + "name", Column(&ContactGroupsTable::NameAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "alias", Column(&ContactGroupsTable::NameAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "alias", Column(&ContactGroupsTable::AliasAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "members", Column(&ContactGroupsTable::MembersAccessor, objectAccessor));
|
||||
}
|
||||
|
||||
|
@ -55,6 +55,11 @@ Value ContactGroupsTable::NameAccessor(const Object::Ptr& object)
|
|||
return static_pointer_cast<UserGroup>(object)->GetName();
|
||||
}
|
||||
|
||||
Value ContactGroupsTable::AliasAccessor(const Object::Ptr& object)
|
||||
{
|
||||
return static_pointer_cast<UserGroup>(object)->GetName();
|
||||
}
|
||||
|
||||
Value ContactGroupsTable::MembersAccessor(const Object::Ptr& object)
|
||||
{
|
||||
Array::Ptr members = boost::make_shared<Array>();
|
||||
|
|
|
@ -46,6 +46,7 @@ protected:
|
|||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||
|
||||
static Value NameAccessor(const Object::Ptr& object);
|
||||
static Value AliasAccessor(const Object::Ptr& object);
|
||||
static Value MembersAccessor(const Object::Ptr& object);
|
||||
};
|
||||
|
||||
|
|
|
@ -35,20 +35,20 @@ void ContactsTable::AddColumns(Table *table, const String& prefix,
|
|||
{
|
||||
table->AddColumn(prefix + "name", Column(&ContactsTable::NameAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "alias", Column(&ContactsTable::NameAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "email", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "pager", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_notification_period", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_notification_period", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "can_submit_commands", Column(&Table::OneAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_notifications_enabled", Column(&Table::OneAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_notifications_enabled", Column(&Table::OneAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "in_host_notification_period", Column(&Table::OneAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "in_service_notification_period", Column(&Table::OneAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variable_names", Column(&Table::EmptyArrayAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variable_values", Column(&Table::EmptyArrayAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variables", Column(&Table::EmptyDictionaryAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "modified_attributes", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "modified_attributes_list", Column(&Table::EmptyArrayAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "email", Column(&ContactsTable::EmailAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "pager", Column(&ContactsTable::PagerAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_notification_period", Column(&ContactsTable::HostNotificationPeriodAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_notification_period", Column(&ContactsTable::ServiceNotificationPeriodAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "can_submit_commands", Column(&ContactsTable::CanSubmitCommandsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_notifications_enabled", Column(&ContactsTable::HostNotificationsEnabledAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_notifications_enabled", Column(&ContactsTable::ServiceNotificationsEnabledAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "in_host_notification_period", Column(&ContactsTable::InHostNotificationPeriodAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "in_service_notification_period", Column(&ContactsTable::InServiceNotificationPeriodAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variable_names", Column(&ContactsTable::CustomVariableNamesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variable_values", Column(&ContactsTable::CustomVariableValuesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "custom_variables", Column(&ContactsTable::CustomVariablesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "modified_attributes", Column(&ContactsTable::ModifiedAttributesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "modified_attributes_list", Column(&ContactsTable::ModifiedAttributesListAccessor, objectAccessor));
|
||||
}
|
||||
|
||||
String ContactsTable::GetName(void) const
|
||||
|
@ -67,3 +67,100 @@ Value ContactsTable::NameAccessor(const Object::Ptr& object)
|
|||
{
|
||||
return static_pointer_cast<User>(object)->GetName();
|
||||
}
|
||||
|
||||
Value ContactsTable::AliasAccessor(const Object::Ptr& object)
|
||||
{
|
||||
return static_pointer_cast<User>(object)->GetDisplayName();
|
||||
}
|
||||
|
||||
Value ContactsTable::EmailAccessor(const Object::Ptr& object)
|
||||
{
|
||||
Dictionary::Ptr macros = static_pointer_cast<User>(object)->GetMacros();
|
||||
|
||||
if (!macros)
|
||||
return Value();
|
||||
|
||||
return macros->Get("email");
|
||||
}
|
||||
|
||||
Value ContactsTable::PagerAccessor(const Object::Ptr& object)
|
||||
{
|
||||
Dictionary::Ptr macros = static_pointer_cast<User>(object)->GetMacros();
|
||||
|
||||
if (!macros)
|
||||
return Value();
|
||||
|
||||
return macros->Get("pager");
|
||||
}
|
||||
|
||||
Value ContactsTable::HostNotificationPeriodAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::ServiceNotificationPeriodAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::CanSubmitCommandsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - default 1*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value ContactsTable::HostNotificationsEnabledAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::ServiceNotificationsEnabledAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::InHostNotificationPeriodAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::InServiceNotificationPeriodAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::CustomVariableNamesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::CustomVariableValuesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::CustomVariablesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::ModifiedAttributesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value ContactsTable::ModifiedAttributesListAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
|
|
@ -46,7 +46,21 @@ protected:
|
|||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||
|
||||
static Value NameAccessor(const Object::Ptr& object);
|
||||
static Value MembersAccessor(const Object::Ptr& object);
|
||||
static Value AliasAccessor(const Object::Ptr& object);
|
||||
static Value EmailAccessor(const Object::Ptr& object);
|
||||
static Value PagerAccessor(const Object::Ptr& object);
|
||||
static Value HostNotificationPeriodAccessor(const Object::Ptr& object);
|
||||
static Value ServiceNotificationPeriodAccessor(const Object::Ptr& object);
|
||||
static Value CanSubmitCommandsAccessor(const Object::Ptr& object);
|
||||
static Value HostNotificationsEnabledAccessor(const Object::Ptr& object);
|
||||
static Value ServiceNotificationsEnabledAccessor(const Object::Ptr& object);
|
||||
static Value InHostNotificationPeriodAccessor(const Object::Ptr& object);
|
||||
static Value InServiceNotificationPeriodAccessor(const Object::Ptr& object);
|
||||
static Value CustomVariableNamesAccessor(const Object::Ptr& object);
|
||||
static Value CustomVariableValuesAccessor(const Object::Ptr& object);
|
||||
static Value CustomVariablesAccessor(const Object::Ptr& object);
|
||||
static Value ModifiedAttributesAccessor(const Object::Ptr& object);
|
||||
static Value ModifiedAttributesListAccessor(const Object::Ptr& object);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -35,17 +35,17 @@ DowntimesTable::DowntimesTable(void)
|
|||
void DowntimesTable::AddColumns(Table *table, const String& prefix,
|
||||
const Column::ObjectAccessor& objectAccessor)
|
||||
{
|
||||
table->AddColumn(prefix + "author", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "comment", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "id", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_time", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "type", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "is_service", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "start_time", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "end_time", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "fixed", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "duration", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "triggered_by", Column(&Table::EmptyStringAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "author", Column(&DowntimesTable::AuthorAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "comment", Column(&DowntimesTable::CommentAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "id", Column(&DowntimesTable::IdAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "entry_time", Column(&DowntimesTable::EntryTimeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "type", Column(&DowntimesTable::TypeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "is_service", Column(&DowntimesTable::IsServiceAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "start_time", Column(&DowntimesTable::StartTimeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "end_time", Column(&DowntimesTable::EndTimeAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "fixed", Column(&DowntimesTable::FixedAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "duration", Column(&DowntimesTable::DurationAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "triggered_by", Column(&DowntimesTable::TriggeredByAccessor, objectAccessor));
|
||||
|
||||
// TODO: Join services table.
|
||||
}
|
||||
|
@ -72,3 +72,102 @@ void DowntimesTable::FetchRows(const AddRowFunction& addRowFn)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Value DowntimesTable::AuthorAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("author");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::CommentAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("comment");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::IdAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("legacy_id");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::EntryTimeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("entry_time");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::TypeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
// 1 .. active, 0 .. pending
|
||||
return (Service::IsDowntimeActive(downtime) ? 1 : 0);
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::IsServiceAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Service::Ptr svc = Service::GetOwnerByDowntimeID(row);
|
||||
|
||||
return (svc->IsHostCheck() ? 0 : 1);
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::StartTimeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("start_time");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::EndTimeAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("end_time");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::FixedAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("fixed");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::DurationAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("duration");
|
||||
*/
|
||||
}
|
||||
|
||||
Value DowntimesTable::TriggeredByAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Dictionary::Ptr downtime = Service::GetDowntimeByID(row);
|
||||
|
||||
return downtime->Get("triggered_by");
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -44,6 +44,18 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||
|
||||
static Value AuthorAccessor(const Object::Ptr& object);
|
||||
static Value CommentAccessor(const Object::Ptr& object);
|
||||
static Value IdAccessor(const Object::Ptr& object);
|
||||
static Value EntryTimeAccessor(const Object::Ptr& object);
|
||||
static Value TypeAccessor(const Object::Ptr& object);
|
||||
static Value IsServiceAccessor(const Object::Ptr& object);
|
||||
static Value StartTimeAccessor(const Object::Ptr& object);
|
||||
static Value EndTimeAccessor(const Object::Ptr& object);
|
||||
static Value FixedAccessor(const Object::Ptr& object);
|
||||
static Value DurationAccessor(const Object::Ptr& object);
|
||||
static Value TriggeredByAccessor(const Object::Ptr& object);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -571,6 +571,7 @@ Value ServicesTable::InNotificationPeriodAccessor(const Object::Ptr& object)
|
|||
Value ServicesTable::ContactsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - host->service->notifications->users */
|
||||
/*
|
||||
std::set<User::Ptr> allUsers;
|
||||
std::set<User::Ptr> users;
|
||||
|
||||
|
@ -586,7 +587,7 @@ Value ServicesTable::ContactsAccessor(const Object::Ptr& object)
|
|||
std::copy(members.begin(), members.end(), std::inserter(allUsers, allUsers.begin()));
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
return Value();
|
||||
}
|
||||
|
||||
|
@ -634,6 +635,25 @@ Value ServicesTable::CustomVariableValuesAccessor(const Object::Ptr& object)
|
|||
|
||||
Value ServicesTable::CustomVariablesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/*
|
||||
Service::Ptr svc = static_pointer_cast<Service>(object);
|
||||
|
||||
Dictionary::Ptr custom = svc->Get("custom");
|
||||
|
||||
if (!custom)
|
||||
return Value();
|
||||
|
||||
Dictionary::Ptr customvars = custom->ShallowClone();
|
||||
customvars->Remove("notes");
|
||||
customvars->Remove("action_url");
|
||||
customvars->Remove("notes_url");
|
||||
customvars->Remove("icon_image");
|
||||
customvars->Remove("icon_image_alt");
|
||||
customvars->Remove("statusmap_image");
|
||||
customvars->Remove("2d_coords");
|
||||
|
||||
return customvars;
|
||||
*/
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
******************************************************************************/
|
||||
|
||||
#include "livestatus/statustable.h"
|
||||
#include "icinga/icingaapplication.h"
|
||||
#include "icinga/cib.h"
|
||||
#include <boost/smart_ptr/make_shared.hpp>
|
||||
|
||||
using namespace icinga;
|
||||
|
@ -31,65 +33,65 @@ StatusTable::StatusTable(void)
|
|||
void StatusTable::AddColumns(Table *table, const String& prefix,
|
||||
const Column::ObjectAccessor& objectAccessor)
|
||||
{
|
||||
table->AddColumn(prefix + "neb_callbacks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "neb_callbacks_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "neb_callbacks", Column(&StatusTable::NebCallbacksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "neb_callbacks_rate", Column(&StatusTable::NebCallbacksRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "requests", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "requests_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "requests", Column(&StatusTable::RequestsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "requests_rate", Column(&StatusTable::RequestsRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "connections", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "connections_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "connections", Column(&StatusTable::ConnectionsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "connections_rate", Column(&StatusTable::ConnectionsRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "service_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_checks_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_checks", Column(&StatusTable::ServiceChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "service_checks_rate", Column(&StatusTable::ServiceChecksRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "host_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_checks_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_checks", Column(&StatusTable::HostChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "host_checks_rate", Column(&StatusTable::HostChecksRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "forks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "forks_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "forks", Column(&StatusTable::ForksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "forks_rate", Column(&StatusTable::ForksRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "log_messages", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "log_messages_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "log_messages", Column(&StatusTable::LogMessagesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "log_messages_rate", Column(&StatusTable::LogMessagesRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "external_commands", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_commands_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_commands", Column(&StatusTable::ExternalCommandsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_commands_rate", Column(&StatusTable::ExternalCommandsRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "livechecks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livechecks_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livechecks", Column(&StatusTable::LivechecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livechecks_rate", Column(&StatusTable::LivechecksRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "livecheck_overflows", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livecheck_overflows_rate", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livecheck_overflows", Column(&StatusTable::LivecheckOverflowsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livecheck_overflows_rate", Column(&StatusTable::LivecheckOverflowsRateAccessor, objectAccessor));
|
||||
|
||||
table->AddColumn(prefix + "nagios_pid", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_notifications", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "execute_service_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "accept_passive_service_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "execute_host_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "accept_passive_host_checks", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_event_handlers", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "obsess_over_services", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "obsess_over_hosts", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_service_freshness", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_host_freshness", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_flap_detection", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "process_performance_data", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_external_commands", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "program_start", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "last_command_check", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "last_log_rotation", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "interval_length", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "num_hosts", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "num_services", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "program_version", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_slots", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_usage", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_max", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "cached_log_messages", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_version", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_active_connections", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_queued_connections", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_threads", Column(&Table::ZeroAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "nagios_pid", Column(&StatusTable::NagiosPidAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_notifications", Column(&StatusTable::EnableNotificationsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "execute_service_checks", Column(&StatusTable::ExecuteServiceChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "accept_passive_service_checks", Column(&StatusTable::AcceptPassiveServiceChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "execute_host_checks", Column(&StatusTable::ExecuteHostChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "accept_passive_host_checks", Column(&StatusTable::AcceptPassiveHostChecksAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_event_handlers", Column(&StatusTable::EnableEventHandlersAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "obsess_over_services", Column(&StatusTable::ObsessOverHostsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "obsess_over_hosts", Column(&StatusTable::ObsessOverServicesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_service_freshness", Column(&StatusTable::CheckServiceFreshnessAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_host_freshness", Column(&StatusTable::CheckHostFreshnessAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "enable_flap_detection", Column(&StatusTable::EnableFlapDetectionAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "process_performance_data", Column(&StatusTable::ProcessPerformanceDataAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "check_external_commands", Column(&StatusTable::CheckExternalCommandsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "program_start", Column(&StatusTable::ProgramStartAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "last_command_check", Column(&StatusTable::LastCommandCheckAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "last_log_rotation", Column(&StatusTable::LastLogRotationAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "interval_length", Column(&StatusTable::IntervalLengthAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "num_hosts", Column(&StatusTable::NumHostsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "num_services", Column(&StatusTable::NumServicesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "program_version", Column(&StatusTable::ProgramVersionAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_slots", Column(&StatusTable::ExternalCommandBufferSlotsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_usage", Column(&StatusTable::ExternalCommandBufferUsageAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "external_command_buffer_max", Column(&StatusTable::ExternalCommandBufferMaxAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "cached_log_messages", Column(&StatusTable::CachedLogMessagesAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_version", Column(&StatusTable::LivestatusVersionAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_active_connections", Column(&StatusTable::LivestatusActiveConnectionsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_queued_connections", Column(&StatusTable::LivestatusQueuedConnectionsAccessor, objectAccessor));
|
||||
table->AddColumn(prefix + "livestatus_threads", Column(&StatusTable::LivestatusThreadsAccessor, objectAccessor));
|
||||
}
|
||||
|
||||
String StatusTable::GetName(void) const
|
||||
|
@ -104,3 +106,294 @@ void StatusTable::FetchRows(const AddRowFunction& addRowFn)
|
|||
/* Return a fake row. */
|
||||
addRowFn(obj);
|
||||
}
|
||||
|
||||
Value StatusTable::NebCallbacksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::NebCallbacksRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::RequestsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::RequestsRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ConnectionsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ConnectionsRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ServiceChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ServiceChecksRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::HostChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::HostChecksRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ForksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ForksRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LogMessagesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LogMessagesRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ExternalCommandsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ExternalCommandsRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivechecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivechecksRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivecheckOverflowsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivecheckOverflowsRateAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::NagiosPidAccessor(const Object::Ptr& object)
|
||||
{
|
||||
return Utility::GetPid();
|
||||
}
|
||||
|
||||
Value StatusTable::EnableNotificationsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::ExecuteServiceChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::AcceptPassiveServiceChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::ExecuteHostChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::AcceptPassiveHostChecksAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::EnableEventHandlersAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::ObsessOverServicesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ObsessOverHostsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* not supported */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::CheckServiceFreshnessAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::CheckHostFreshnessAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::EnableFlapDetectionAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::ProcessPerformanceDataAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::CheckExternalCommandsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO - enabled by default*/
|
||||
return 1;
|
||||
}
|
||||
|
||||
Value StatusTable::ProgramStartAccessor(const Object::Ptr& object)
|
||||
{
|
||||
return IcingaApplication::GetInstance()->GetStartTime();
|
||||
}
|
||||
|
||||
Value StatusTable::LastCommandCheckAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LastLogRotationAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::IntervalLengthAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* hardcoded 60s */
|
||||
return 60;
|
||||
}
|
||||
|
||||
Value StatusTable::NumHostsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::NumServicesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ProgramVersionAccessor(const Object::Ptr& object)
|
||||
{
|
||||
return "2.0";
|
||||
}
|
||||
|
||||
Value StatusTable::ExternalCommandBufferSlotsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ExternalCommandBufferUsageAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::ExternalCommandBufferMaxAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::CachedLogMessagesAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivestatusVersionAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivestatusActiveConnectionsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivestatusQueuedConnectionsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
||||
Value StatusTable::LivestatusThreadsAccessor(const Object::Ptr& object)
|
||||
{
|
||||
/* TODO */
|
||||
return Value();
|
||||
}
|
||||
|
|
|
@ -44,6 +44,56 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void FetchRows(const AddRowFunction& addRowFn);
|
||||
|
||||
static Value NebCallbacksAccessor(const Object::Ptr& object);
|
||||
static Value NebCallbacksRateAccessor(const Object::Ptr& object);
|
||||
static Value RequestsAccessor(const Object::Ptr& object);
|
||||
static Value RequestsRateAccessor(const Object::Ptr& object);
|
||||
static Value ConnectionsAccessor(const Object::Ptr& object);
|
||||
static Value ConnectionsRateAccessor(const Object::Ptr& object);
|
||||
static Value ServiceChecksAccessor(const Object::Ptr& object);
|
||||
static Value ServiceChecksRateAccessor(const Object::Ptr& object);
|
||||
static Value HostChecksAccessor(const Object::Ptr& object);
|
||||
static Value HostChecksRateAccessor(const Object::Ptr& object);
|
||||
static Value ForksAccessor(const Object::Ptr& object);
|
||||
static Value ForksRateAccessor(const Object::Ptr& object);
|
||||
static Value LogMessagesAccessor(const Object::Ptr& object);
|
||||
static Value LogMessagesRateAccessor(const Object::Ptr& object);
|
||||
static Value ExternalCommandsAccessor(const Object::Ptr& object);
|
||||
static Value ExternalCommandsRateAccessor(const Object::Ptr& object);
|
||||
static Value LivechecksAccessor(const Object::Ptr& object);
|
||||
static Value LivechecksRateAccessor(const Object::Ptr& object);
|
||||
static Value LivecheckOverflowsAccessor(const Object::Ptr& object);
|
||||
static Value LivecheckOverflowsRateAccessor(const Object::Ptr& object);
|
||||
static Value NagiosPidAccessor(const Object::Ptr& object);
|
||||
static Value EnableNotificationsAccessor(const Object::Ptr& object);
|
||||
static Value ExecuteServiceChecksAccessor(const Object::Ptr& object);
|
||||
static Value AcceptPassiveServiceChecksAccessor(const Object::Ptr& object);
|
||||
static Value ExecuteHostChecksAccessor(const Object::Ptr& object);
|
||||
static Value AcceptPassiveHostChecksAccessor(const Object::Ptr& object);
|
||||
static Value EnableEventHandlersAccessor(const Object::Ptr& object);
|
||||
static Value ObsessOverServicesAccessor(const Object::Ptr& object);
|
||||
static Value ObsessOverHostsAccessor(const Object::Ptr& object);
|
||||
static Value CheckServiceFreshnessAccessor(const Object::Ptr& object);
|
||||
static Value CheckHostFreshnessAccessor(const Object::Ptr& object);
|
||||
static Value EnableFlapDetectionAccessor(const Object::Ptr& object);
|
||||
static Value ProcessPerformanceDataAccessor(const Object::Ptr& object);
|
||||
static Value CheckExternalCommandsAccessor(const Object::Ptr& object);
|
||||
static Value ProgramStartAccessor(const Object::Ptr& object);
|
||||
static Value LastCommandCheckAccessor(const Object::Ptr& object);
|
||||
static Value LastLogRotationAccessor(const Object::Ptr& object);
|
||||
static Value IntervalLengthAccessor(const Object::Ptr& object);
|
||||
static Value NumHostsAccessor(const Object::Ptr& object);
|
||||
static Value NumServicesAccessor(const Object::Ptr& object);
|
||||
static Value ProgramVersionAccessor(const Object::Ptr& object);
|
||||
static Value ExternalCommandBufferSlotsAccessor(const Object::Ptr& object);
|
||||
static Value ExternalCommandBufferUsageAccessor(const Object::Ptr& object);
|
||||
static Value ExternalCommandBufferMaxAccessor(const Object::Ptr& object);
|
||||
static Value CachedLogMessagesAccessor(const Object::Ptr& object);
|
||||
static Value LivestatusVersionAccessor(const Object::Ptr& object);
|
||||
static Value LivestatusActiveConnectionsAccessor(const Object::Ptr& object);
|
||||
static Value LivestatusQueuedConnectionsAccessor(const Object::Ptr& object);
|
||||
static Value LivestatusThreadsAccessor(const Object::Ptr& object);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue