Connect Zabbix to Claude Code

Read hosts, problems, triggers and metric history from a self-hosted Zabbix, and acknowledge events or schedule maintenance. Add Toolspoke to Claude Code once and it can use 14 Zabbix actions. Your Zabbix credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Zabbix and connect it

    Add Zabbix to a project in your Toolspoke workspace.

    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 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
    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.
  3. Choose what Claude Code may do

    All 14 actions start on. Switch off any of the 5 actions that change something in Zabbix, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Zabbix actions that only read, so they are safe to try first.

  • List monitored hosts with their status, maintenance state, interfaces and host groups
  • List host groups with how many hosts each holds
  • List current problems, newest first, with severity, acknowledgement state and tags
  • List trigger events over a time window, newest first, including recoveries

What Claude Code can do in Zabbix

9 actions read, 3 write and 2 delete or permanently change something.

Reads

  • 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

  • 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.

Deletes or permanently changes

  • 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.

Zabbix in Claude Code: questions

Does Claude Code see my Zabbix credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Zabbix?

Yes. Each of the 14 actions can be switched off for a project. Turn off the 5 that change something and Claude Code can only read.

Will 14 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Zabbix action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Zabbix call does not run in a sandbox, so it bills nothing.

Try Zabbix in Claude Code

Free to start, and tool calls cost nothing on any plan.