Class containing methods for operations with Templates
Class containing methods for operations with Templates.
Methods | Description |
---|---|
get() | Get template details |
exists() | Check if template exists |
create() | Create templates |
update() | Update template details |
delete() | Delete templates |
massAdd() | Mass add template linkage, hosts, macros, host groups |
massUpdate() | Mass update template details, link templates, hosts, add host groups |
massRemove() | Mass remove template linkage, hosts, macros, host groups |
The table contains complete list of Template attributes.
Parameter | Type | Description | Details |
---|---|---|---|
templateid | int | Template ID | |
host | string | Template name. | |
groupids | array | HostGroup IDs add Template to. |
The table contains list of common template-related tasks and possible implementation using Zabbix API
Task | HOWTO |
---|---|
Add a template | Use method template.create |
Add a bunch of new templates | Use method template.create with array of Template objects |
Link template to hosts | Use method template.massAdd with parameters templates, hosts |
Unlink template from hosts | Use method template.massRemove with parameters templates, hosts |