Add template: Mailcow by Zabbix agent 2 (7.0, 7.4) - #761
Open
linuser wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
The three structural checks pass, but Check import to Zabbix instance fails with an internal error — UnboundLocalError: cannot access local variable 'file_type' where it is not associated with a value. This is a crash in the CI import script itself, not a template import failure: both templates import cleanly on fresh Zabbix 7.0 and 7.4 instances (manually verified before submitting). The crash may be triggered by the files/ helpers (.sh, .py, .service, .timer, and a Grafana .json, per the guidelines) tripping the import step's file-type detection. Could a maintainer take a look or re-run? Happy to adjust if anything on my side needs changing. |
The Grafana JSON is not a Zabbix import file, but the CI validation tries to import every .json under files/ as a template and crashes on it (UnboundLocalError: file_type). The dashboard stays available in the upstream project; README now links to it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a community template for monitoring Mailcow-dockerized with Zabbix Agent 2.
What it monitors
247 items across Postfix, Postfix logs, Postscreen, Dovecot, Rspamd (+ Bayes training), security (fail2ban, RBL, DNS SPF/DKIM/DMARC, open relay), a DANE/MTA-STS/TLS-RPT/BIMI security-audit score, disk, mailboxes & domains, mailflow (pflogsumm, with anomaly detection via trendavg()), ClamAV, the Mailcow watchdog, Docker container health, TLS/certificates, backups, SOGo/memcached, quarantine, queue age, sync jobs, updates and aliases.
64 triggers + 8 LLD trigger prototypes, 4 low-level discovery rules (domains, mailboxes, sync jobs, Docker containers), 19 template dashboards.
Architecture
A root collector (files/scripts/mailcow-collector.py, run once a minute by a systemd timer) gathers everything into a 0640 JSON file; the Zabbix agent only reads that file via UserParameters — no Docker access, no sudo, UnsafeUserParameters=0. All operational files (collector, check scripts, UserParameters, systemd units, installer) are in files/; setup is documented in 7.0/README.md.
Guideline conformance
Group Templates/Applications; tags class/target (template), component (every item), scope (every trigger).
Item names use Location: Metric; LLD rule keys/names end in discovery; {$MAILCOW.*} macro namespace with standard .WARN/.CRIT/… suffixes; units on quantity items; value maps for discrete states; no {HOST.NAME} / {ITEM.VALUE} in trigger names; no disaster-severity triggers in the resource template.
Imports without errors on a fresh Zabbix 7.0.
MIT licensed.
Upstream project (issues, full docs, release history): https://github.com/linuser/Mailcow-Zabbix-Monitoring