Templates in depth: items, triggers, LLD, macros and our own template
Sign in to read this lesson
The template is the most powerful tool in Zabbix: it is built once, linked to hundreds of hosts, and a change reaches all of them at once. In this lesson we learn what is inside a template, how item keys are written, trigger expressions, automatic discovery (LLD), nested templates, the difference between linking and unlinking, and we create our own template.
What you will learn
- Inside a template: items, triggers, graphs, dashboards, discovery rules (LLD) and their prototypes, macros, tags, value maps.
- An item key has the form
key[parameters]:system.cpu.util,net.if.in[ifHCInOctets.{#SNMPINDEX}],net.tcp.service[https,,443]. - A trigger expression:
function(/template/key,period)condition, for exampleavg(/ITN-Lab Service Ports/net.tcp.service[https,,443],5m)=0. - LLD finds the objects on a device (ports, disks, VPN tunnels) by itself and creates an item and a trigger for each from prototypes.
- Unlink keeps the items on the host, Unlink and clear deletes them together with history; templates can be nested by linking one to another.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.