Install fping and validate config in the Zabbix proxy installers - #7
Open
MarkLFT wants to merge 1 commit into
Open
Install fping and validate config in the Zabbix proxy installers#7MarkLFT wants to merge 1 commit into
MarkLFT wants to merge 1 commit into
Conversation
A proxy built by these scripts could not run any ICMP check. Neither installer installed fping, and neither wrote FpingLocation, so the proxy fell back to Zabbix's default of /usr/sbin/fping — a path Debian and Ubuntu never use, since they ship it in /usr/bin. The result is every icmpping/icmppingsec/icmppingloss item on every host behind the proxy failing as unsupported, while the log fills with "At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist" once a second. Nothing fails loudly, so it goes unnoticed. Both installers now: - install fping alongside the proxy package - locate the binary with command -v rather than assuming a path, and warn instead of writing a bad path if it is genuinely absent - write FpingLocation/Fping6Location into the generated config - validate the config with `zabbix_proxy -T` before starting the service, so a bad config reports the proxy's own message rather than a systemd exit code README: corrected the proxy restart command. It documented `systemctl restart zabbix-proxy-sqlite3`, a unit that does not exist — all three backend packages (sqlite3, mysql, pgsql) ship the same zabbix-proxy.service, verified against the package contents. Added a note on checking and fixing proxies built before this change, since they are all affected. Verified in Debian 13 containers: fping detected at /usr/bin/fping, both directives written, `zabbix_proxy -T` validates the generated config, the proxy starts, and no missing-binary errors appear in the log. fping6 is a symlink to fping and is detected correctly.
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.
Found while bringing up a new proxy: it connected to the server fine, then logged this once a second, forever:
Root cause
Neither proxy installer installs
fping, and neither writesFpingLocation. Zabbix defaults to/usr/sbin/fping; Debian and Ubuntu ship it in/usr/bin/fping. So even installing the package by hand doesn't fix it — the path still has to be configured.Effect: every
icmpping/icmppingsec/icmppinglossitem on every host behind the proxy fails as unsupported. Nothing errors loudly, so it's easy to miss — most network-device templates have ping items, so this silently removes availability monitoring.Changes
Both
install-zabbix-proxy.shandinstall-zabbix-proxy-full.sh:fpingalongside the proxy packagecommand -vrather than hardcoding — Debian/Ubuntu and RHEL differ — and warn rather than write a bad path if it's genuinely missingFpingLocation/Fping6Locationinto the generated configzabbix_proxy -Tbefore starting, so a bad config reports the proxy's own message instead of a bare systemd exit codezabbix_proxysupports-T --test-config; confirmed against the binary.README correction
It documented:
sudo systemctl restart zabbix-proxy-sqlite3 # or zabbix-proxy-mysql / -pgsqlThat unit does not exist. All three backend packages ship the same
zabbix-proxy.service— verified from the package contents:zabbix-proxy-sqlite3zabbix-proxy.servicezabbix-proxy-mysqlzabbix-proxy.servicezabbix-proxy-pgsqlzabbix-proxy.serviceAnyone following the documented upgrade steps got
Unit zabbix-proxy-sqlite3.service not found. Added a note on detecting and fixing already-deployed proxies, which are all affected.Test results — Debian 13 containers, 8/8
/usr/bin/fping(not the Zabbix default)FpingLocationandFping6Locationproduced —fping6is a symlink tofpingand resolves correctlyzabbix_proxy -Tvalidates that configbash -nand shellcheck clean on both (the SC2034s are pre-existing vestigial constants, untouched).Existing proxies
Every proxy built before this is affected. To check: