How to connect Zabbix to Toolspoke

Give your Toolspoke agents read access to Zabbix hosts, problems and metric history, and optionally let them acknowledge problems and schedule maintenance. A dedicated user, a scoped API token, and an agent that watches it for you.

Zabbix toolkitRead hosts, problems, triggers and metric history from a self-hosted Zabbix, and acknowledge events or schedule maintenance.

Checked against Zabbix's documentation on 2026-11-25.

Toolspoke's Zabbix toolkit calls your Zabbix server's own JSON-RPC API (/api_jsonrpc.php) with an API token you create. Once it's installed, any agent in the project can use it. This guide sets that up with the least access that still answers the questions people ask: what's broken, since when, and what the graphs looked like before it broke. Then it builds an agent that posts the morning's problems to your ops channel.

It takes about ten minutes if you're a Zabbix Super admin. The Zabbix steps follow the 7.0 manual. Newer versions keep the same menus.

What an agent can do once it's connected

The toolkit has 14 named actions. Nine of them only read:

  • What's broken now: get_problems returns what the Problems page shows: current problems, severity, whether someone has acknowledged them, and tags.
  • What happened before: get_events covers trigger events over a time window, including recoveries. Use it for "how often did db-02 go down last week".
  • Hosts and groups: get_hosts and get_host_groups return the IDs every other read filters on.
  • Metrics: get_items finds the metric, get_history reads raw values, and get_trends reads hourly min, average and max for periods older than your history retention.
  • Triggers and maintenance: get_triggers and get_maintenances.

The other five change things in Zabbix:

ActionWhat it changesKind
acknowledge_eventsAcknowledges problems and leaves a message on themWrite
create_maintenanceSchedules a one-time maintenance windowWrite
set_host_statusEnables or disables monitoring of one hostWrite
update_eventsAny event update: close, change severity, suppressDestructive
delete_maintenanceDeletes maintenance periods permanentlyDestructive

You decide which of these your agents may call (step 4).

What you need

  • Zabbix with API tokens, served over HTTPS at an address Toolspoke can reach from the internet. Toolspoke refuses private-network addresses, so a Zabbix server only reachable on your LAN or VPN won't work.
  • A Zabbix Super admin account, to create the user, role and token below.
  • A Toolspoke workspace, and a project to install the toolkit in.

Step 1: Create a role and a user for Toolspoke

Don't hand Toolspoke your own token. A token acts as the user it belongs to, so an agent would see and change everything you can. Give it a user of its own instead.

  1. In Zabbix, open Users → User roles and create a role, for example ai-readonly. Set the user type to User.
  2. Under Access to API, tick Enabled. Then choose Allow list and add the methods the toolkit uses for reading: host.get, hostgroup.get, problem.get, event.get, trigger.get, item.get, history.get, trend.get and maintenance.get.
  3. If agents should acknowledge problems, also allow event.acknowledge, and keep Add problem comments ticked under the role's actions. Zabbix ties that action to event.acknowledge, and unticking it switches the method off.
  4. Open Users → User groups and create a group, for example ai-agents. Under Host permissions, give it Read on the host groups agents may see. In Zabbix, host access is only granted to user groups, never to individual users.
  5. Open Users → Users and create the user, for example toolspoke, with the role from step 1 and the group from step 4.
Zabbix
  1. Users
  2. User roles
  3. Create user role
Name
ai-readonly
User type
User
Options: User, Admin, Super admin
Access to API: Enabled(ticked)
API methods
Allow list
Options: Allow list, Deny list
Allowed methods
host.get, hostgroup.get, problem.get, event.get, trigger.get, item.get, history.get, trend.get, maintenance.get
Add
Add event.acknowledge to the list if agents may acknowledge problems. Illustration of Zabbix's screen. The labels are Zabbix's; the layout is ours.
Zabbix
  1. Users
  2. User groups
  3. Create user group
Group name
ai-agents
Host permissions
Read
Options: Read, Read-write, Deny
Host groups
the groups agents may see
Add
Illustration of Zabbix's screen. The labels are Zabbix's; the layout is ours.

A User-type role can't call maintenance.create, because Zabbix only allows that for Admin and Super admin types. If you want agents to schedule maintenance, use the Admin type for the role, give the group Read-write on the host groups it may put into maintenance, and add the maintenance.* methods to the allow list. set_host_status uses host.update, which also needs read-write on that host's group.

Step 2: Create an API token

  1. Open Users → API tokens and choose Create API token.
  2. Pick the user from step 1 and give the token a name, for example toolspoke.
  3. Tick Set expiration date and time if you want the token to expire. A year is a reasonable rotation. When it expires, the toolkit's calls fail until you paste a new token.
  4. Choose Add and copy the token. Zabbix shows it once.
Zabbix
  1. Users
  2. API tokens
  3. Create API token
Name
toolspoke
User
toolspoke
Set expiration date and time(ticked)
Expiry date
a year from today
Add
Copy the token straight away. Zabbix shows it once. Illustration of Zabbix's screen. The labels are Zabbix's; the layout is ours.

Step 3: Install the Zabbix toolkit in Toolspoke

  1. In Toolspoke, open the project your agents work in. Find Zabbix in the marketplace and add it.
  2. Paste the API token from step 2.
  3. Enter the Zabbix frontend URL: the address you open Zabbix at in a browser, without /api_jsonrpc.php, for example https://zabbix.example.com. A package install often serves it under /zabbix, as in https://monitor.example.com/zabbix.
CredentialZabbix
API token
••••••••••••••••
Zabbix → Users → API tokens → Create API token (or User settings → API tokens for your own user). Needs Zabbix 6.4 or later. The token acts as its user, so a user with read access to the host groups you want covers every read; acknowledging, maintenance and enabling hosts need write permission on those groups. Behind Apache, make sure the Authorization header is passed through to PHP.
Zabbix frontend URL
https://zabbix.example.com
The URL you open the Zabbix web frontend at, without /api_jsonrpc.php — for a package install this often ends in /zabbix. It has to be publicly reachable; a private-network address is refused.

get_hosts answered. The credential works.

Save and test
The Zabbix toolkit's credential card in your Toolspoke project, with its real fields.

Toolspoke checks the connection by listing one host. If that fails, see Troubleshooting.

The token is encrypted at rest and attached to each request by the gateway. The agent never sees it, and it never appears in the arguments an agent sends or in the audit log.

Step 4: Decide what agents may change

In the project's toolkit settings, Zabbix's actions are grouped as read, write and destructive. Each one can be switched on or off for everyone in the project.

A sensible start: leave the nine reads on and acknowledge_events on, and switch off update_events, delete_maintenance and set_host_status until you've seen how the team uses it. Turn create_maintenance off too while the role is a User type, since Zabbix would refuse it anyway. An action that's switched off can't be called, whatever the prompt says.

Zabbix actions in your project

Agents can call 10 of 14, and 1 of those can change something.

Read
Looks, changes nothing.
  • get_hostsList monitored hosts with their status, maintenance state, interfaces and host groups.
  • get_host_groupsList host groups with how many hosts each holds.
  • get_problemsList current problems, newest first, with severity, acknowledgement state and tags.
  • get_eventsList trigger events over a time window, newest first, including recoveries.
  • get_triggersList triggers — the conditions that raise problems — with their expanded description, priority and current state, most recently changed first.
  • get_itemsList items — the individual metrics Zabbix collects — with their key, units, value type and last value.
  • get_historyRead raw collected values for one or more items over a time window, newest first.
  • get_trendsRead hourly min, average and max for numeric items over a time window.
  • get_maintenancesList maintenance periods with their hosts, host groups and time periods.
Write
Changes something you can change back.
  • acknowledge_eventsAcknowledge problem events and leave a message on them — what an on-call engineer does to say "I am on this".
  • create_maintenanceSchedule a one-time maintenance window for hosts or host groups, so planned work does not page anyone.
  • set_host_statusEnable (status 0) or disable (status 1) monitoring of one host.
Delete
Removes or overrides something for good.
  • update_eventsApply any event update by bitmask: 1 close problem, 2 acknowledge, 4 add message, 8 change severity, 16 unacknowledge, 32 suppress, 64 unsuppress, 128 rank as cause, 256 rank as symptom.
  • delete_maintenanceDelete maintenance periods permanently.
Try the switches. They start the way this guide suggests; nothing here changes your project.

Every call is recorded with the agent and person behind it, the request, the response and the duration. You can always see what an agent looked at and what it changed.

Step 5: Build an agent that uses it

In Toolspoke, create an agent and describe its job in one sentence. The builder proposes the instructions, the toolkits it needs, a schedule and where it should answer. You add or skip each one, then create the agent. Every piece stays editable afterwards.

The same agent answers when someone asks it in Slack, emails it or mentions it on a pull request, and it replies in the thread it was asked in. If someone emails it, each write, such as acknowledging a problem, waits for a person's go-ahead unless you've allowed that action in advance.

Try it

Ask the agent the way you'd ask a colleague on call:

  • What problems are open in Zabbix right now, worst first? Which are unacknowledged?
  • How many times did the db host group raise a problem in the last 7 days, and which triggers fired most?
  • Show CPU load on web-01 for the last 24 hours. Was there a spike before the 14:00 alert?
  • Which hosts are in maintenance, and when does each window end?
  • Acknowledge the disk-space problem on backup-02 with the message "Cleaning old snapshots, back by 18:00".

For metrics, the agent first finds the item with get_items, then reads get_history with the item's value type. For anything older than your history retention, it switches to get_trends. The Zabbix toolkit page lists every action.

Troubleshooting

"Not authorized" or "Session terminated" on every call.

Usually the Authorization header never reaches Zabbix. Zabbix's own known-issues page describes this for Apache:

  • Apache in front of PHP as a reverse proxy: add SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1.
  • Apache running PHP directly (mod_cgi): add CGIPassAuth On.

Then restart Apache. Nginx passes the header by default.

"No permissions to call…".

The method isn't on the role's allow list, or Access to API is off for the role. Add the method named in the error under Users → User roles.

The call works, but hosts or problems are missing.

The user group has no Read permission on those host groups. Zabbix filters silently rather than raising an error.

The connection check fails with an address error.

The frontend URL must be public HTTPS, and Toolspoke refuses private and internal IPs. Also check you didn't include /api_jsonrpc.php.

Everything stopped working on a particular day.

The token expired. Create a new one (step 2) and paste it into the toolkit's credentials.

Questions

Does the agent see my Zabbix passwords or the token?

No. The token is attached to the request by Toolspoke's gateway, never shown to the agent, and masked in the audit log.

Can an agent run Zabbix scripts or change triggers and templates?

No. The toolkit only has the 14 actions listed above. Anything else in the Zabbix API, such as script.execute, trigger.update or template.*, isn't reachable through it.

Does it work with Zabbix Cloud?

Yes, if your Zabbix Cloud instance has a public frontend URL and you can create API tokens there. The steps are the same.

Connect Zabbix to Toolspoke

Install Zabbix in a project, give it to an agent, and every call is checked and logged.