[icinga-checkins] icinga.org: icinga2/next: Livestatus: Add 'host_name' and ' service_description' columns for NagVis

git at icinga.org git at icinga.org
Thu Jun 12 12:00:43 CEST 2014


Module: icinga2
Branch: next
Commit: 627f96d85d10fa88b7e330fce6e55a3f7768c53a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=627f96d85d10fa88b7e330fce6e55a3f7768c53a

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Jun 12 11:59:21 2014 +0200

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

---

 components/livestatus/hoststable.cpp     |    1 +
 components/livestatus/servicestable.cpp  |    1 +
 test/livestatus/queries/host/host_nagvis |    2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/livestatus/hoststable.cpp b/components/livestatus/hoststable.cpp
index 797e8d8..f459229 100644
--- a/components/livestatus/hoststable.cpp
+++ b/components/livestatus/hoststable.cpp
@@ -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));
diff --git a/components/livestatus/servicestable.cpp b/components/livestatus/servicestable.cpp
index 6ccfcde..3a7022b 100644
--- a/components/livestatus/servicestable.cpp
+++ b/components/livestatus/servicestable.cpp
@@ -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));
diff --git a/test/livestatus/queries/host/host_nagvis b/test/livestatus/queries/host/host_nagvis
index 34cdc75..a09d013 100644
--- a/test/livestatus/queries/host/host_nagvis
+++ b/test/livestatus/queries/host/host_nagvis
@@ -1,5 +1,5 @@
 GET hosts
-Columns: name alias
+Columns: name alias host_name
 OutputFormat:json
 KeepAlive: on
 ResponseHeader: fixed16



More information about the icinga-checkins mailing list