1.hostgroup.get获取组信息
该方法允许根据给定的参数检索主机组。
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. 只返回具有给定主机组ID的主机组。 |
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.仅返回包含受监视主机的主机组。 |
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.仅返回包含具有Web检查的主机的主机组。 Overrides the with_monitored_httptests parameter.覆盖“with_monitored_httptests”参数。 |
with_items | flag | Return only host groups that contain hosts or templates with items.仅返回包含主题或包含项目的模板的主机组。 Overrides the with_monitored_items andwith_simple_graph_items parameters.覆盖“with_monitored_items”和“with_simple_graph_items“参数。 |
with_monitored_httptests | flag | Return only host groups that contain hosts with enabled web checks.仅返回包含启用Web检查的主机的主机组。 |
with_monitored_items | flag | Return only host groups that contain hosts or templates with enabled items.仅返回包含启用项目的主机或模板的主机组。 Overrides the with_simple_graph_items parameter.覆盖with_simple_graph_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.仅返回包含具有触发器的主机的主机组。 Overrides the with_monitored_triggers parameter. 覆盖“with_monitored_triggers”参数。 |
selectDiscoveryRule | query | Return the LLD rule that created the host group in the discoveryRule property.返回在“discoveryRule”属性中创建主机组的LLD规则。 |
selectGroupDiscovery | query | Return the host group discovery object in the groupDiscovery property. 在“groupDiscovery”属性中返回主机组发现对象。 The host group discovery object links a discovered host group to a host group prototype and has the following properties: 主机组发现对象将发现的主机组链接到主机组原型,并具有以下属性:groupid - (string) ID of the discovered host group; 发现的主机组的ID;lastcheck - (timestamp) time when the host group was last discovered;主机组最后发现的时间; name - (string) name of the host goup prototype;主机组名称原型; parent_group_prototypeid - (string) ID of the host group prototype from which the host group has been created;创建主机组的主机组原型的ID; ts_delete - (timestamp) time when a host group that is no longer discovered will be deleted.不再发现主机组将被删除的时间。 |
selectHosts | query | Return the hosts that belong to the host group in the hosts property.在“hosts”属性中返回属于主机组的主机。 Supports count. |
selectTemplates | query | Return the templates that belong to the host group in the templates property. 在“”模板“”属性中返回属于主机组的模板。Supports count. |
limitSelects | integer | Limits the number of records returned by subselects. 限制子选择返回的记录数。Applies to the following subselects:适用于以下子选项: selectHosts - results will be sorted by host; 结果将按“主机”排序;selectTemplates - results will be sorted by host.结果将按“主机”排序。sortfield string/array Sort the result by the given properties. 按照给定的属性对结果进行排序。 |