feat(zabbix): a native Zabbix agent through ZabbixAgentMixin (NetOrk/netork#2571) #84

Merged
christianmanivong merged 1 commits from feat/zabbix-agent-native into main 2026-11-17 04:17:02 +00:00
Owner

configure_zabbix_agent(settings) for a host without a container engine (NetOrk/netork#2571).

  • Install: zabbix-agent from the host's own packages. Where they have none, the driver adds Zabbix's repository for the server's release line: zabbix_repository_command over /etc/os-release, run as root, then a second try.
  • Configure: /etc/zabbix/zabbix_agentd.conf gets the caller's Server, ServerActive, ListenPort and Hostname, the rest stays. The old file stays as .bak, the new one is installed from a staged copy (_install_file_as_root).
  • Firewall: tcp/listen_port for the allowed sources, in firewalld, ufw or iptables.
  • The SNMP agent's firewall step is the shared _allow_sources(allowed, port, proto) now (_open_port.py). The rules for udp/161 are the same, and linux.py shrank below its baseline.

Needs napalm-device-types 4.40.0 (ZabbixAgentMixin, NAPALM/napalm-device-types#124). netOrk asks for it in "Install agent" on zabbix_unreachable wherever it has read no container engine on the device.

Checks: ruff, mypy, napalm-standard ratchet/check and 441 tests are green against device-types 4.40.0. Based on 0e1c4e7 (#83).

`configure_zabbix_agent(settings)` for a host without a container engine (NetOrk/netork#2571). - **Install:** `zabbix-agent` from the host's own packages. Where they have none, the driver adds Zabbix's repository for the server's release line: `zabbix_repository_command` over `/etc/os-release`, run as root, then a second try. - **Configure:** `/etc/zabbix/zabbix_agentd.conf` gets the caller's `Server`, `ServerActive`, `ListenPort` and `Hostname`, the rest stays. The old file stays as `.bak`, the new one is installed from a staged copy (`_install_file_as_root`). - **Firewall:** tcp/`listen_port` for the allowed sources, in firewalld, ufw or iptables. - The SNMP agent's firewall step is the shared `_allow_sources(allowed, port, proto)` now (`_open_port.py`). The rules for udp/161 are the same, and `linux.py` shrank below its baseline. Needs napalm-device-types 4.40.0 (`ZabbixAgentMixin`, NAPALM/napalm-device-types#124). netOrk asks for it in "Install agent" on `zabbix_unreachable` wherever it has read no container engine on the device. **Checks:** ruff, mypy, `napalm-standard ratchet`/`check` and 441 tests are green against device-types 4.40.0. Based on 0e1c4e7 (#83).
christianmanivong added 1 commit 2026-11-17 04:11:58 +00:00
feat(zabbix): a native Zabbix agent through ZabbixAgentMixin (NetOrk/netork#2571)
driver / lint (pull_request) Successful in 14s
driver / standard (pull_request) Successful in 17s
driver / types (pull_request) Successful in 59s
driver / test (3.13) (pull_request) Successful in 57s
driver / test (3.12) (pull_request) Successful in 1m2s
driver / lowest (pull_request) Successful in 40s
driver / build (pull_request) Successful in 37s
driver / security (pull_request) Successful in 1m17s
CI / driver (pull_request) Successful in 2m32s
driver / publish (pull_request) Skipped
2521f9f462
configure_zabbix_agent(settings) installs zabbix-agent from the host's packages,
and where they have none, from Zabbix's repository for the server's release
line. It writes the caller's values into /etc/zabbix/zabbix_agentd.conf (the old
file stays as .bak) and opens tcp/ListenPort for the allowed sources in
firewalld, ufw or iptables.

The firewall step of the SNMP agent is the shared _allow_sources(allowed, port,
proto) now, in _open_port.py; the rules it writes for udp/161 are the same.
Needs napalm-device-types 4.40.0.
christianmanivong merged commit 04ff633290 into main 2026-11-17 04:17:02 +00:00
christianmanivong deleted branch feat/zabbix-agent-native 2026-11-17 04:17:02 +00:00
Sign in to join this conversation.