Livestatus: Add 'host_name' and 'service_description' columns for NagVis

These columns are used for filtering and seem to be not documented nor
supported. Only added for compatibility reasons.

fixes #6474
This commit is contained in:
Michael Friedrich 2014-06-12 11:59:21 +02:00
parent 8d344ebb3a
commit 627f96d85d
3 changed files with 3 additions and 1 deletions

View File

@ -47,6 +47,7 @@ void HostsTable::AddColumns(Table *table, const String& prefix,
const Column::ObjectAccessor& objectAccessor)
{
table->AddColumn(prefix + "name", Column(&HostsTable::NameAccessor, objectAccessor));
table->AddColumn(prefix + "host_name", Column(&HostsTable::NameAccessor, objectAccessor)); //ugly compatibility hack
table->AddColumn(prefix + "display_name", Column(&HostsTable::DisplayNameAccessor, objectAccessor));
table->AddColumn(prefix + "alias", Column(&HostsTable::DisplayNameAccessor, objectAccessor));
table->AddColumn(prefix + "address", Column(&HostsTable::AddressAccessor, objectAccessor));

View File

@ -46,6 +46,7 @@ void ServicesTable::AddColumns(Table *table, const String& prefix,
const Column::ObjectAccessor& objectAccessor)
{
table->AddColumn(prefix + "description", Column(&ServicesTable::ShortNameAccessor, objectAccessor));
table->AddColumn(prefix + "service_description", Column(&ServicesTable::ShortNameAccessor, objectAccessor)); //ugly compatibility hack
table->AddColumn(prefix + "display_name", Column(&ServicesTable::DisplayNameAccessor, objectAccessor));
table->AddColumn(prefix + "check_command", Column(&ServicesTable::CheckCommandAccessor, objectAccessor));
table->AddColumn(prefix + "check_command_expanded", Column(&ServicesTable::CheckCommandExpandedAccessor, objectAccessor));

View File

@ -1,5 +1,5 @@
GET hosts
Columns: name alias
Columns: name alias host_name
OutputFormat:json
KeepAlive: on
ResponseHeader: fixed16