Connect Zabbix to Toolspoke

Read hosts, problems, triggers and metric history from a self-hosted Zabbix, and acknowledge events or schedule maintenance. Toolspoke gives your agents 14 of its actions, and you decide which ones each project allows.

Connection
Provider REST API
Authentication
API token
Actions exposed
14
What a call bills
Nothing
Adapter
Maintained by Toolspoke

Connected in three steps

  1. Install Zabbix

    Open the marketplace in your workspace, add Zabbix to the project your agents work in, and it appears on the gateway immediately.

  2. Connect the credential

    Provide the credential Zabbix asks for. Where to get it, and what it has to be able to reach, is the next section.

  3. Give it to an agent

    Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every Zabbix action the project leaves on.

The whole setup, from Zabbix's side to the first question: How to connect Zabbix to Toolspoke

Where the agent answers

  • Slack

    Ask it in a channel or a thread, and it replies in the thread it was asked in.

  • Email

    Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.

  • GitHub

    Mention it on a pull request, and it answers there.

  • Schedule

    A routine wakes it on a schedule, or when a new item matches.

Any agent in the project can use Zabbix, and only the actions the project leaves on.

What Zabbix asks for

API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

API tokenRequired
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.
0424bd59b807674191e7d77572075f33
Zabbix frontend URLRequired
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.
https://zabbix.example.com

What an agent can do in Zabbix

14 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.

9 read, 3 write, 2 destructive

Reads

9

Fetches data and changes nothing.

  • get_hosts

    List monitored hosts with their status, maintenance state, interfaces and host groups. This is the entry point for most questions, it returns the hostids every other read filters on. status 0 means monitored, 1 means disabled.

  • get_host_groups

    List host groups with how many hosts each holds. Returns the groupids that the host, problem, trigger and item reads filter on.

  • get_problems

    List current problems, newest first, with severity, acknowledgement state and tags. This is what the Zabbix Problems page shows and the usual answer to "what is broken right now". severity runs 0 (not classified) to 5 (disaster). Each row's objectid is the triggerid and eventid is what acknowledge_events takes.

  • get_events

    List trigger events over a time window, newest first, including recoveries. Use this for history, "how often did this host go down last week", where get_problems answers what is open now. value 1 is a problem event, 0 a recovery.

  • get_triggers

    List triggers, the conditions that raise problems, with their expanded description, priority and current state, most recently changed first. value 1 means the trigger is in a problem state now.

  • get_items

    List items, the individual metrics Zabbix collects, with their key, units, value type and last value. Returns the itemid and value_type that get_history needs.

  • get_history

    Read raw collected values for one or more items over a time window, newest first. history must match the items' value_type from get_items, 0 float, 1 character, 2 log, 3 unsigned integer, 4 text, or Zabbix returns nothing. Log and text items can carry log lines, so results are not kept in the audit log.

  • get_trends

    Read hourly min, average and max for numeric items over a time window. Zabbix keeps trends far longer than raw history, so this is the read for "what did CPU look like last month". Only float and unsigned items have trends.

  • get_maintenances

    List maintenance periods with their hosts, host groups and time periods. Hosts in an active maintenance still collect data (type 0) or stop collecting (type 1), and their problems are suppressed.

Writes

3

Creates or updates something on the other side.

  • acknowledge_events

    Acknowledge problem events and leave a message on them, what an on-call engineer does to say "I am on this". Fixed to acknowledge plus message (action 6); it cannot close, suppress or change severity, which is update_events. The message is shown to everyone who can see the problem.

  • create_maintenance

    Schedule a one-time maintenance window for hosts or host groups, so planned work does not page anyone. The window starts at active_since and lasts period seconds; active_till must be at or after its end. Pass hostids, groupids or both. Undo it with delete_maintenance.

  • set_host_status

    Enable (status 0) or disable (status 1) monitoring of one host. Disabling stops collection and alerting for that host until it is enabled again; nothing is deleted.

Destructive

2

Deletes or permanently alters something. Worth granting on purpose.

  • update_events

    Apply 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. Sum the values to combine them. Destructive because closing a problem cannot be undone and suppressing one hides it from every alert. message is required with 4, severity with 8, suppress_until with 32 and cause_eventid with 256.

  • delete_maintenance

    Delete maintenance periods permanently. Hosts in them leave maintenance at once and their suppressed problems start alerting again.

What it will not do

The gateway enforces each of these, so they can be stated flatly.

It cannot call anything else
The 14 actions above are the whole of it. A call to any other name is refused before it reaches Zabbix rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
It reaches no further than your credential
Toolspoke holds no access to Zabbix of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
It never hears from Zabbix
Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Zabbix. An agent has to ask.
It does not smooth over provider limits
Toolspoke does not retry, queue or back off around Zabbix's own rate limits. A call that Zabbix refuses comes back to the agent as a failed call.

Before you connect it

What can an agent do in Zabbix?

14 named actions: 9 that only read, 3 that write and 2 that delete or permanently alter something. They include get_hosts, get_host_groups and get_problems. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.

What credentials does the Zabbix connector need?

API token. The connector asks for api token and zabbix frontend url. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.

How does an agent get to use Zabbix?

Install Zabbix in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.

What does the Zabbix connector not do?

The 14 actions above are the whole of it. A call to any other name is refused before it reaches Zabbix rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Zabbix of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Zabbix. An agent has to ask. Toolspoke does not retry, queue or back off around Zabbix's own rate limits. A call that Zabbix refuses comes back to the agent as a failed call.

Can I limit which actions an agent can call?

Yes, in two places. The project switches Zabbix's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.

What gets recorded when an agent calls Zabbix?

Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.

Connect Zabbix to Toolspoke

Add Zabbix to a project and give it to an agent.