Zabbix Documentation 1.8

2.23.03.44.0 (current)In development:4.2 (devel)Unsupported:1.82.02.43.2

User Tools

Site Tools


Sidebar

api:template

Template

Class containing methods for operations with Templates

Methods

Class containing methods for operations with Templates.

MethodsDescription
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

Object details

The table contains complete list of Template attributes.

ParameterTypeDescriptionDetails
templateidintTemplate ID
hoststringTemplate name.
groupidsarrayHostGroup IDs add Template to.

Common tasks

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

TaskHOWTO
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