Examples
Copy-paste starting points for common tasks. Adjust column indices and field names to match your sheet. Always set an explicit limit on imports (unbounded .get defaults to 5).
Import hosts with tags and interfaces
Data → Import → From Zabbix · Resource: host
{
"limit": 50,
"selectTags": ["tag", "value"],
"selectInterfaces": ["interfaceid", "ip", "dns", "type", "main"]
}
Import hosts by tag
{
"tags": [
{"tag": "environment", "value": "production"}
],
"selectTags": ["tag", "value"],
"limit": 200
}
Add a tag to all visible hosts
Transform on the tags column:
json(obj(data.csv.tags).concat({"tag":"reviewed","value":"2026-06-14"}))
Push template (Zabbix → Push · host · update):
{
"hostid": "${flds.hostid}",
"tags": ${cols[YOUR_TAGS_COL_INDEX]}
}
Bulk-update host visible name
Transform on the name column:
flds.name.replace(/^OLD-/, "NEW-")
Push:
{
"hostid": "${flds.hostid}",
"name": "${flds.name}"
}
Pull items for selected hosts
- Import hosts (with
hostid) - Select rows
- Zabbix → Pull · Resource:
item· Label:items
{
"hostids": ["${flds.hostid}"],
"output": ["itemid", "name", "key_"],
"limit": 500
}
- Transform a new column to show item count:
data.items ? String(data.items.length) : "0"
Pull hosts by interface IP
Sheet has an IP column. Pull · Resource: hostinterface · Label: ifaces
{
"filter": { "ip": "${flds.IP}" },
"selectHosts": ["hostid", "host", "name"],
"output": ["interfaceid", "ip"]
}
Then transform to extract the first linked host id, for example:
data.ifaces && data.ifaces[0] && data.ifaces[0].hosts
? data.ifaces[0].hosts[0].hostid
: ""
Import triggers for a template
Data → Import → From Zabbix · Resource: trigger
{
"templateids": ["YOUR_TEMPLATE_ID"],
"selectTags": ["tag", "value"],
"expandDescription": true,
"limit": 500
}
Disable hosts matching a pattern
- Import hosts
- Filter name · Contains ·
decom(escape regex metacharacters if needed) - Select visible rows
- Push ·
host·update
{
"hostid": "${flds.hostid}",
"status": 1
}
(status: 1 = disabled in the host API)
Create host groups from a list
Sheet column name with group names. Push · hostgroup · create:
{
"name": "${flds.name}"
}
Delete triggers by ID
- Import triggers with
triggerid - Filter and select carefully — test one row first
- Push ·
trigger· delete
{
"triggerid": "${flds.triggerid}"
}
Cross-sheet asset lookup
Sheet hosts: imported hosts
Sheet assets: CSV/Excel with hostid and owner
On hosts, transform an owner column:
ws.assets.lookup(flds.hostid, "hostid", "owner", false) || ""
Bulk onboarding from CSV / Excel
-
Prepare a spreadsheet with at least
host,name, and agroupid(existing host group) -
Data → Import → CSV or Import → Excel
-
Optionally transform columns into JSON the API expects — e.g. an
interfacescolumn:json([{ "type": 1, "main": 1, "useip": 1, "ip": flds.ip, "dns": "", "port": "10050" }]) -
Zabbix → Push · Resource:
host· Operation:create:{ "host": "${flds.host}", "name": "${flds.name}", "groups": [{"groupid": "${flds.groupid}"}], "interfaces": ${cols[YOUR_INTERFACES_COL]} } -
Start with one row and Sequential query mode
Required fields vary by Zabbix version (templates, macros, tags, proxy, …). Mirror a working UI/API create, then parameterize with ${flds…} / ${cols[…]}.
Generate test data (Import from JavaScript)
return Array.from({length: 10}, (_, i) => ({
hostid: String(10000 + i),
name: "test-host-" + i,
status: "0"
}));
Export only selected rows for review
- Select rows to review
- Data → Export → CSV → only selected
- Share the CSV before pushing
To share several sheets at once (e.g. hosts + groups after a bulk edit), use Data → Export → Excel, keep the sheets you need selected, and download export.xlsx.
Export problem / event history
Data → Import → From Zabbix · Resource: problem
{
"output": ["eventid", "objectid", "name", "severity", "clock", "r_clock", "r_eventid"],
"recent": true,
"sortfield": ["eventid"],
"sortorder": "DESC",
"limit": 500
}
Time window with Unix seconds:
{
"output": "extend",
"time_from": 1719792000,
"time_till": 1722470400,
"sortfield": ["clock"],
"sortorder": "ASC",
"limit": 1000
}
Data → Import → From Zabbix · Resource: event (trigger events):
{
"output": ["eventid", "objectid", "name", "severity", "clock", "value"],
"source": 0,
"object": 0,
"time_from": 1719792000,
"sortfield": ["clock"],
"sortorder": "DESC",
"limit": 1000
}
Then Data → Export → CSV (visible or all). Filter noisy names first if needed.
Make clocks human-readable
- Column menu → Format as date/time, or
- Transform:
formatUnix(self)
formatUnix accepts seconds or milliseconds; empty/invalid values become blank. Stored and exported values change after you apply.
Find top problems and busy periods
After importing problem/event history:
- Filter out noise (column filter on
name/ severity) - Data → Chart data
- Category column =
name(or host) → bar/pie of top values (top 20) - Clock column =
clock, bucket = hour of day or calendar day → busy periods
Charts use visible rows by default, so filters apply.
Save and restore a workspace
Before a risky operation:
- File → Save → e.g.
before-tag-migration.json - Run push
- If needed, File → Load to restore the workbook
Note: Save does not include API token or request templates.
Further reading
- Getting started — step-by-step first migration
- Zabbix API reference — resources and parameters