Zabbix Documentation 1.8

2.23.04.04.2 (current)In development:4.4 (devel)Unsupported:1.82.02.43.23.4

User Tools

Site Tools


Sidebar

api:hostgroup

Hostgroup

Methods

Class containing methods for operations with Hosts.

MethodsDescription
get() Get host group details
exists() Check if host group exists
create() Create host groups
update() Update host group details
delete() Delete host groups
massAdd() Mass add templates, hosts to host groups
massUpdate() Mass update host group details, update list of templates, hosts
massRemove() Mass remove templates, hosts

Object details

The table contains complete list of Host attributes.

ParameterTypeDescriptionDetails
groupidintHost ID
namestringHost name.
internalintegerHostGroup status, if equal to 1 - host group can't be deleted.

Common tasks

The table contains list of common host-related tasks and possible implementation using Zabbix API

TaskHOWTO
Add a host group Use method hostgroup.create
Add a bunch of new host groups Use method hostgroup.create with array of Host group objects
Retrieve host group details by Group IDs Use method hostgroup.get with parameter groupids
Retrieve host group details by Host group name Use method hostgroup.get with parameter filter, specify “name”:“<your hostgroup>“