]> granicus.if.org Git - icinga2/commitdiff
livestatus: servicegroup members as host/service array
authorMichael Friedrich <michael.friedrich@netways.de>
Fri, 12 Jul 2013 15:50:41 +0000 (17:50 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Fri, 12 Jul 2013 15:50:41 +0000 (17:50 +0200)
refs #4372

components/livestatus/servicegroupstable.cpp

index 04c24f39d736b1311c365e8f2cc8b844e5bf1dbf..76346aa77bee8aa55ae7b69af9f8dd573ef99f3f 100644 (file)
@@ -110,7 +110,10 @@ Value ServiceGroupsTable::MembersAccessor(const Value& row)
        Array::Ptr members = boost::make_shared<Array>();
 
        BOOST_FOREACH(const Service::Ptr& service, static_cast<ServiceGroup::Ptr>(row)->GetMembers()) {
-               members->Add(service->GetName());
+               Array::Ptr host_svc = boost::make_shared<Array>();
+               host_svc->Add(service->GetHost()->GetName());
+               host_svc->Add(service->GetShortName());
+               members->Add(host_svc);
        }
 
        return members;