Skip to content

Install fping and validate config in the Zabbix proxy installers - #7

Open
MarkLFT wants to merge 1 commit into
mainfrom
zabbix-proxy-fping
Open

Install fping and validate config in the Zabbix proxy installers#7
MarkLFT wants to merge 1 commit into
mainfrom
zabbix-proxy-fping

Conversation

@MarkLFT

@MarkLFT MarkLFT commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Found while bringing up a new proxy: it connected to the server fine, then logged this once a second, forever:

At least one of '/usr/sbin/fping', '/usr/sbin/fping6' must exist. Both are missing in the system.

Root cause

Neither proxy installer installs fping, and neither writes FpingLocation. 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 / icmppingloss item 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.sh and install-zabbix-proxy-full.sh:

  1. Install fping alongside the proxy package
  2. Locate it with command -v rather than hardcoding — Debian/Ubuntu and RHEL differ — and warn rather than write a bad path if it's genuinely missing
  3. Write FpingLocation / Fping6Location into the generated config
  4. Validate with zabbix_proxy -T before starting, so a bad config reports the proxy's own message instead of a bare systemd exit code

zabbix_proxy supports -T --test-config; confirmed against the binary.

README correction

It documented:

sudo systemctl restart zabbix-proxy-sqlite3   # or zabbix-proxy-mysql / -pgsql

That unit does not exist. All three backend packages ship the same zabbix-proxy.service — verified from the package contents:

package unit shipped
zabbix-proxy-sqlite3 zabbix-proxy.service
zabbix-proxy-mysql zabbix-proxy.service
zabbix-proxy-pgsql zabbix-proxy.service

Anyone 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

  • fping detected at /usr/bin/fping (not the Zabbix default)
  • both FpingLocation and Fping6Location produced — fping6 is a symlink to fping and resolves correctly
  • directives written into the generated config
  • zabbix_proxy -T validates that config
  • proxy starts
  • no missing-binary errors in the log

bash -n and shellcheck clean on both (the SC2034s are pre-existing vestigial constants, untouched).

Existing proxies

Every proxy built before this is affected. To check:

command -v fping; grep -E '^Fping' /etc/zabbix/zabbix_proxy.conf   # both empty = affected

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant