Put hosts into maintenance during a change, check and acknowledge problems, and raise alarms in Zabbix from any Windmill script, flow or app.
Set up in 3 steps
Create an API token
In the Zabbix frontend, open Users > API tokens and create a token for a dedicated service user rather than a person's account. Its user role needs the API methods the scripts call (host.get, maintenance.*, problem.get, event.acknowledge, history.push) and rights on the host groups the flows touch. Needs Zabbix 7.0 or later.
Add the resource
Open Resources, click Add a resource/API and pick Zabbix. Set base_url to your Zabbix frontend URL, the folder that holds api_jsonrpc.php (for example https://zabbix.example.com or https://example.com/zabbix), and paste the token.
Run your first script
Run List hosts to check the connection, then use Create maintenance and Delete maintenance around a change, and Get problems afterwards to check that nothing unexpected fired.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Push value
List maintenances
List hosts
Get problems
Delete maintenance
Create maintenance
Acknowledge event
Push value
List maintenances
List hosts
Get problems
Delete maintenance
Create maintenance
Acknowledge event
Resource type
The shape of the credential every script on this page expects.
zabbix
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| base_url | string | Yes | URL of the Zabbix web frontend, the folder that contains api_jsonrpc.php (e.g. https://zabbix.example.com or https://example.com/zabbix). |
| token | string | Yes | Zabbix API token, created in the Zabbix frontend under Users > API tokens. Its user role must allow the API methods the scripts call. |
Questions
How do I raise an alarm in Zabbix when a flow fails?
Create a trapper item on a host (for example key trap, numeric), leaving Allowed hosts empty or including the Zabbix web frontend's IP, and a trigger such as last(/<host>/trap)>0. Then call Push value with that host and key from the flow's error handler: push 1 to raise the problem and 0 to clear it.
Why can't Acknowledge event close a problem?
Zabbix only closes a problem by hand when its trigger has Allow manual close enabled, and the token's user needs read-write rights on that trigger.
Which Zabbix versions are supported?
7.0 to 7.4. The scripts authenticate with an API token in the Authorization header and use history.push, which Zabbix added in 7.0.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.