Appearance
Zabbix Command
safecall integrations zabbix provides setup and validation commands for SafeCall monitoring in Zabbix.
What it configures
The command provisions:
- template group (
SafeCall) - host group (
SafeCall Devices) - templates (
SafeCall Gateway,SafeCall SOS Button,SafeCall Watch) - trapper items on each template
- triggers on each template
- low-level discovery rules on the Zabbix server host
- host prototypes for discovered devices
- final verification of discovery-rule presence
Usage
bash
sudo ./util.sh integrations zabbix setup
sudo ./util.sh integrations zabbix setup --url http://zabbix.local/api_jsonrpc.php --user Admin --password secret
sudo ./util.sh integrations zabbix setup --zabbix-host "Zabbix server"
sudo ./util.sh integrations zabbix setup --dry-run
sudo ./util.sh integrations zabbix doctor
sudo ./util.sh integrations zabbix verify --url http://zabbix.local/api_jsonrpc.php --user AdminOptions
| Option | Meaning |
|---|---|
--url <url> | Zabbix API URL |
--user <user> | Zabbix API username |
--password <password> | Zabbix API password |
--zabbix-host <name> | Zabbix host name where LLD rules are attached (default "Zabbix server") |
--dry-run | Print planned actions only; do not execute API calls |
Actions:
setup(default): idempotent creation/reconciliation of monitoring objectsdoctor: SafeCall-side checks (LLD endpoints, bridge config, trapper TCP reachability)verify: read-only Zabbix API checks (no object creation/changes)
Zabbix 7.4+ compatibility
The CLI supports modern Zabbix authentication transport and legacy fallback automatically:
- tries
Authorization: Bearer <token>first - falls back to legacy JSON-RPC
authfield when required by older servers
This avoids errors like unexpected parameter "auth" on newer Zabbix versions.
Host pre-check assistance
If --zabbix-host is missing or does not match an existing host, setup and verify now print host candidates from host.get so you can retry with the exact host name.
Dry-run mode (documented hidden feature)
--dry-run computes and prints the full provisioning plan and exits immediately.
It includes:
- templates, items, and trigger definitions
- LLD rule names and target URLs
- host prototype strategy
- final disclaimer: no changes were made
This is useful for:
- auditing what will be created
- validating bridge endpoint URLs
- CI/VM testing without a running Zabbix server
LLD endpoint source
The command resolves LLD URLs from SafeCall config keys:
server_bridge_server_urlserver_bridge_endpoint_gatewayserver_bridge_endpoint_beacon
Defaults are used when config is missing.
When to use
- Initial Zabbix integration bootstrap.
- Re-running idempotent setup after partial/manual changes.
- Dry-run review before applying monitoring configuration.
Deep Documentation
For complete architecture, migration notes, troubleshooting, and full bridge/Zabbix reference, see: