integer/array hostgroup.get(object parameters)
The method allows to retrieve host groups according to the given parameters.
(object) Parameters defining the desired output.
The method supports the following parameters.
|graphids||string/array||Return only host groups that contain hosts or templates with the given graphs.|
|groupids||string/array||Return only host groups with the given host group IDs.|
|hostids||string/array||Return only host groups that contain the given hosts.|
|maintenanceids||string/array||Return only host groups that are affected by the given maintenances.|
|monitored_hosts||flag||Return only host groups that contain monitored hosts.|
|not_proxy_hosts||flag||Return only host groups that do not contain proxies.|
|real_hosts||flag||Return only host groups that contain hosts.|
|templated_hosts||flag||Return only host groups that contain templates.|
|templateids||string/array||Return only host groups that contain the given templates.|
|triggerids||string/array||Return only host groups that contain hosts or templates with the given triggers.|
|with_applications||flag||Return only host groups that contain hosts with applications.|
|with_graphs||flag||Return only host groups that contain hosts with graphs.|
|with_hosts_and_templates||flag||Return only host groups that contain hosts or templates.|
|with_httptests||flag||Return only host groups that contain hosts with web checks.
|with_items||flag||Return only host groups that contain hosts or templates with items.
|with_monitored_httptests||flag||Return only host groups that contain hosts with enabled web checks.|
|with_monitored_items||flag||Return only host groups that contain hosts or templates with enabled items.
|with_monitored_triggers||flag||Return only host groups that contain hosts with enabled triggers. All of the items used in the trigger must also be enabled.|
|with_simple_graph_items||flag||Return only host groups that contain hosts with numeric items.|
|with_triggers||flag||Return only host groups that contain hosts with triggers.
|selectDiscoveryRule||query||Return the LLD rule that created the host group in the
|selectGroupDiscovery||query||Return the host group discovery object in the
The host group discovery object links a discovered host group to a host group prototype and has the following properties:
|selectHosts||query||Return the hosts that belong to the host group in the
|selectTemplates||query||Return the templates that belong to the host group in the
|limitSelects||integer||Limits the number of records returned by subselects.
Applies to the following subselects:
|sortfield||string/array||Sort the result by the given properties.
Possible values are:
|countOutput||flag||These parameters being common for all
(integer/array) Returns either:
countOutputparameter has been used.
Retrieve all data about two host groups named "Zabbix servers" and "Linux servers".
CHostGroup::get() in frontends/php/api/classes/CHostGroup.php.