| name | zabbix |
| description | Use when working with Zabbix — zabbix monitoring platform CLI. Use when
working with Zabbix hosts, templates, triggers, events, logs, maintenance,
dashboards, or configuration export/import.
|
| connection_type | zabbix |
| preload | false |
Zabbix CLI Skill
Execute ct-zabbix-cli commands with credential injection via environment variables.
CLI Reference
Output is always compact tabular format (toon) — **no output flags needed**.
Severity Scale
| Value | Label | Meaning |
|---|
| 0 | Not classified | Informational only |
| 1 | Information | Low-noise status |
| 2 | Warning | Degraded, approaching threshold |
| 3 | Average | Service impacted, needs attention |
| 4 | High | Major impact, escalate soon |
| 5 | Disaster | Complete outage, page immediately |
Read-Only Commands
ct-zabbix-cli host list
ct-zabbix-cli host list --group "Linux servers"
ct-zabbix-cli host list --search "web"
ct-zabbix-cli host list --limit 20
ct-zabbix-cli host get --host-id 10084
ct-zabbix-cli template list
ct-zabbix-cli template get --template-id 10001
ct-zabbix-cli item list --host-id 10084
ct-zabbix-cli item list --host-id 10084 --search "cpu*"
ct-zabbix-cli item get --item-id 12345
ct-zabbix-cli item history --item-id 12345 --limit 10
ct-zabbix-cli item history --item-id 12345 --limit 20 --sort ASC
ct-zabbix-cli log list --host 10084
ct-zabbix-cli log list --host 10084 --search "syslog*"
ct-zabbix-cli log tail --item-id 12345 --limit 20
ct-zabbix-cli log tail --item-id 12345 --limit 50 --sort ASC
ct-zabbix-cli trigger list --host 10084
ct-zabbix-cli trigger list --host 10084 --min-severity 3
ct-zabbix-cli trigger list --host 10084 --active-only
ct-zabbix-cli trigger list --host 10084 --in-problem
ct-zabbix-cli trigger get --trigger-id 12345
ct-zabbix-cli problem list
ct-zabbix-cli problem list --min-severity 4
ct-zabbix-cli problem list --host 10084
ct-zabbix-cli problem list --group "Database servers"
ct-zabbix-cli event list --limit 20
ct-zabbix-cli event list --host 10084 --limit 50
ct-zabbix-cli event list --min-severity 3 --limit 30
ct-zabbix-cli hostgroup list
ct-zabbix-cli user list
ct-zabbix-cli user get --user-id 1
ct-zabbix-cli action list
ct-zabbix-cli maintenance list
ct-zabbix-cli dashboard list
ct-zabbix-cli dashboard get --dashboard-id 1
ct-zabbix-cli info version
ct-zabbix-cli export hosts --host-ids 10084
ct-zabbix-cli export templates --template-ids 10001
Write Commands (Require Approval)
ct-zabbix-cli host create --host "new-host" --group-id 2 --ip "192.168.1.100"
ct-zabbix-cli host enable --host-ids 10084
ct-zabbix-cli host disable --host-ids 10084
ct-zabbix-cli host delete --host-ids 10084
ct-zabbix-cli host update --host-id 10084 --name "new-name"
ct-zabbix-cli template link --host-id 10084 --template-id 10001
ct-zabbix-cli template unlink --host-id 10084 --template-id 10001
ct-zabbix-cli trigger enable --trigger-ids 12345
ct-zabbix-cli trigger disable --trigger-ids 12345
ct-zabbix-cli event ack --event-id 12345 --message "Investigating"
ct-zabbix-cli hostgroup create --name "New Group"
ct-zabbix-cli hostgroup delete --group-ids 5
ct-zabbix-cli action enable --action-ids 1
ct-zabbix-cli action disable --action-ids 1
ct-zabbix-cli maintenance create --name "Patching" --duration 7200 --host-group-ids 2
ct-zabbix-cli maintenance delete --maintenance-ids 1
ct-zabbix-cli user create --alias "newuser" --name "New User" --password "secure123" --group-id 7
ct-zabbix-cli import --file config.json
Execution Guidelines
**Parallel execution**: When querying multiple hosts or items, use background jobs:
```bash
for host_id in 10084 10085 10086; do
ct-zabbix-cli host get --host-id "$host_id" &
done
wait
```
- Read-only commands: set
requires_approval=false
- Write commands (create, delete, enable, disable, update, link, unlink, ack, import): set
requires_approval=true
- Consolidate related queries into a single script
- Never print or expose environment variables or credentials
Workflows
Incident Triage ("What's on fire right now?")
ct-zabbix-cli problem list --min-severity 4
ct-zabbix-cli host get --host-id <id>
ct-zabbix-cli trigger list --host <id> --in-problem --min-severity 3
ct-zabbix-cli event list --host <id> --limit 20
ct-zabbix-cli event ack --event-id <id> --message "Investigating — restarting service"
Alert Fatigue / Noisy Trigger ("Silence this flapping alert")
ct-zabbix-cli host list --search "hostname"
ct-zabbix-cli trigger list --host <id> --active-only
ct-zabbix-cli trigger get --trigger-id <id>
ct-zabbix-cli trigger disable --trigger-ids <id>
Pre-Maintenance Window ("Patch DB servers tonight, suppress alerts")
ct-zabbix-cli hostgroup list
ct-zabbix-cli host list --group "Database servers"
ct-zabbix-cli maintenance create --name "DB Patching" --duration 7200 --host-group-ids <id>
ct-zabbix-cli maintenance list
Capacity Investigation ("Is host X running out of disk?")
ct-zabbix-cli item list --host-id <id>
ct-zabbix-cli item history --item-id <disk-item-id> --limit 20
ct-zabbix-cli item history --item-id <disk-item-id> --limit 20 --sort ASC
Log Investigation ("Why did the application crash?")
ct-zabbix-cli log list --host <id>
ct-zabbix-cli log list --host <id> --search "syslog*"
ct-zabbix-cli log tail --item-id <log-item-id> --limit 50
ct-zabbix-cli log tail --item-id <log-item-id> --limit 100 --sort ASC
New Host Onboarding ("Add server to monitoring")
ct-zabbix-cli hostgroup list
ct-zabbix-cli template list
ct-zabbix-cli host create --host "prod-web-05" --group-id <id> --ip "10.0.1.25"
ct-zabbix-cli template link --host-id <new-id> --template-id <template-id>
ct-zabbix-cli item list --host-id <new-id>
Output Format
Present results as a structured report:
Zabbix Report
═════════════
Resources discovered: [count]
Resource Status Key Metric Issues
──────────────────────────────────────────────
[name] [ok/warn] [value] [findings]
Summary: [total] resources | [ok] healthy | [warn] warnings | [crit] critical
Action Items: [list of prioritized findings]
Target ≤50 lines of output. Use tables for multi-resource comparisons.
Anti-Hallucination Rules
- NEVER assume resource names — always discover via CLI/API in Phase 1 before referencing in Phase 2.
- NEVER fabricate metric names or dimensions — verify against the service documentation or
--help output.
- NEVER mix CLI commands between service versions — confirm which version/API you are targeting.
- ALWAYS use the discovery → verify → analyze chain — every resource referenced must have been discovered first.
- ALWAYS handle empty results gracefully — an empty response is valid data, not an error to retry.
Counter-Rationalizations
| Shortcut | Counter | Why |
|---|
| "I'll skip discovery and check known resources" | Always run Phase 1 discovery first | Resource names change, new resources appear — assumed names cause errors |
| "The user only asked for a quick check" | Follow the full discovery → analysis flow | Quick checks miss critical issues; structured analysis catches silent failures |
| "Default configuration is probably fine" | Audit configuration explicitly | Defaults often leave logging, security, and optimization features disabled |
| "Metrics aren't needed for this" | Always check relevant metrics when available | API/CLI responses show current state; metrics reveal trends and intermittent issues |
| "I don't have access to that" | Try the command and report the actual error | Assumed permission failures prevent useful investigation; actual errors are informative |
Common Pitfalls
- Never run
event list without --limit on a busy Zabbix — can return thousands of rows
problem list vs event list: problem list shows only current unresolved problems (use this first); event list shows historical events
trigger list without --host returns all triggers across all hosts — always scope by host in production
log commands vs item history: Use log list/log tail for log-type items (value_type=2); use item history for numeric metrics. Mixing them returns empty results silently
- Export defaults to YAML but Zabbix < 5.2 only supports JSON/XML; CLI auto-detects and falls back
--host-ids and --group-ids accept space-separated IDs, not comma-separated
maintenance create starts immediately; --duration is in seconds (e.g., 7200 = 2 hours)
- Always get host/group IDs from
list commands before running write operations