1 /* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */
6 #include "icinga/i2-icinga.hpp"
7 #include "icinga/servicegroup-ti.hpp"
8 #include "icinga/service.hpp"
16 * An Icinga service group.
20 class ServiceGroup final : public ObjectImpl<ServiceGroup>
23 DECLARE_OBJECT(ServiceGroup);
24 DECLARE_OBJECTNAME(ServiceGroup);
26 std::set<Service::Ptr> GetMembers() const;
27 void AddMember(const Service::Ptr& service);
28 void RemoveMember(const Service::Ptr& service);
30 bool ResolveGroupMembership(const Service::Ptr& service, bool add = true, int rstack = 0);
32 static void EvaluateObjectRules(const Service::Ptr& service);
35 mutable boost::mutex m_ServiceGroupMutex;
36 std::set<Service::Ptr> m_Members;
38 static bool EvaluateObjectRule(const Service::Ptr& service, const intrusive_ptr<ConfigItem>& group);
43 #endif /* SERVICEGROUP_H */