Skip to content
SZ-MCP
Get Support

Send alert state to Zabbix

SZ-MCP sends Zabbix the same per-rule results it sends Nagios, packed as one JSON value on a single trapper item, szmcp.results. A template discovers one service per element, so adding or removing an alert rule needs no change in Zabbix. A nodata trigger tells you when SZ-MCP stops sending. Set it up under Configure › Integrations (admins only). The rules every integration follows apply here too.

TransportUse whenNeeds
API (Zabbix 7.0 or later, https) (the default)Your Zabbix front end is reachable over httpsThe Zabbix front end URL (api_jsonrpc.php is added for you) and an API token for a user who can write to the host
Sender (trapper port, unencrypted)Your Zabbix server’s trapper port is reachable from the internetThe Zabbix server and Port (default 10051). No token

The sender protocol is plain TCP. Zabbix encrypts it only with a PSK or client certificates, which SZ-MCP can’t present, so the values cross the internet unencrypted. Prefer the API where you can.

  1. In SZ-MCP, open Configure › Integrations, click Add an integration, choose Zabbix, and pick the transport.
  2. Fill in the URL and API token, or the server and port. Set Host name in Zabbix (default sz-mcp), then click Save.
  3. Click Template and import the YAML it opens (sz-mcp-zabbix-template.yaml) into Zabbix. It creates the SZ-MCP alerts template in the Templates/Applications group.
  4. In Zabbix, create a host with exactly the host name you entered, and link the SZ-MCP alerts template to it.
  5. Back in SZ-MCP, click Send now.
  • SZ-MCP results, the trapper item szmcp.results. Its value is a JSON array of {service, code, state, text}, one element per enabled rule plus the SZ-MCP summary.
  • A discovery rule that creates a state item and a text item for each {#SERVICE}.
  • Three trigger prototypes per service: CRITICAL (priority High), WARNING (Warning) and UNKNOWN (Average), named {#SERVICE} is CRITICAL: … with the result text.
  • SZ-MCP: no results for …s (sz-mcp stopped sending), a nodata trigger (Average) on the trapper item, after three intervals without a value.

The nodata period is three times the integration’s interval. Import the template again after changing the interval.

The host name, Service name prefix, Send everything every (minutes) (default 5, 1–60), The SZ-MCP summary service and Acknowledged, in-downtime and unreachable problems raise the state too work as they do for Nagios and Icinga. So does the state each service reports: the worst unhandled HARD problem of its rule.

Errors show on the integration and under Recent deliveries as zabbix:<name>:

MessageWhat to check
Zabbix API: … (history.push needs Zabbix 7.0 or later)The API transport needs Zabbix 7.0 or later. Use the sender on older versions
Zabbix API: HTTP <status> …The URL or the token
Zabbix sender: the server refused the value (no host "<host>" with the SZ-MCP alerts template linked, or this address is not in the item's allowed hosts)The host name, the template link, and the item’s allowed hosts
Zabbix closed the connection without a reply (is this host allowed to send to the trapper?)The trapper’s allowed hosts, or a firewall
the Zabbix sender needs outbound TCP, which this server does not haveThe sender is unavailable on this deployment. Use the API