From da622cbcca23ec60f99c25a32c06a35c70065936 Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Thu, 16 Jul 2026 21:09:43 -0400 Subject: [PATCH 1/4] zabbix: preserve user config files across sysupgrade Add the user config file directories (/etc/zabbix_x.conf.d) to the list of directories and files to preserve across sysupgrade. Signed-off-by: Daniel F. Dickinson --- admin/zabbix/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index f5693437632a6..4c875d2f5a1bb 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -492,6 +492,7 @@ endef define Package/zabbix-agentd/conffiles /etc/zabbix_agentd.conf +/etc/zabbix_agentd.conf.d/ endef define Package/zabbix-agentd/install @@ -503,6 +504,7 @@ endef define Package/zabbix-agentd-basic/conffiles /etc/zabbix_agentd.conf +/etc/zabbix_agentd.conf.d/ endef define Package/zabbix-agentd-basic/install @@ -514,6 +516,7 @@ endef define Package/zabbix-proxy/conffiles /etc/zabbix_proxy.conf +/etc/zabbix_proxy.conf.d/ endef define Package/zabbix-proxy/install @@ -524,6 +527,7 @@ endef define Package/zabbix-proxy-basic-sqlite/conffiles /etc/zabbix_proxy.conf +/etc/zabbix_proxy.conf.d/ endef define Package/zabbix-proxy-basic-sqlite/install @@ -534,6 +538,7 @@ endef define Package/zabbix-server/conffiles /etc/zabbix_server.conf +/etc/zabbix_server.conf.d/ /etc/config/zabbix_server /etc/sysctl.d/90-zabbix-discovery-workers.conf endef From a68f1f91974229f51183eb98947781b600b0c44b Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Thu, 16 Jul 2026 23:56:31 -0400 Subject: [PATCH 2/4] zabbix: reorganize files dir for clarity and to better follow the FHS Reorganize the extra files under the 'files' dir so that it is more clear where they go and what they are for, and to avoid having a disorganized mass of files. Move the extra C source file out of files and into 'src-extra'. Avoid treating openwrt-supplied params files as configuration data. Instead have them in a separate directory under /usr/share which is included in the zabbix_agentd configuration by default. This also better follows the FHS. Hopefully these changes make sense on their own, as well as helping the CI accept the changes. Signed-off-by: Daniel F. Dickinson --- admin/zabbix/Makefile | 12 +++++++----- .../share/acl.d}/zabbix-network-ubus-acl.json | 0 .../{ => usr/share/acl.d}/zabbix-wifi-ubus-acl.json | 0 .../share/zabbix_agentd.openwrt-params.d}/mac80211 | 0 .../share/zabbix_agentd.openwrt-params.d}/network | 0 .../share/zabbix_agentd.openwrt-params.d}/wifi | 0 admin/zabbix/patches/010-change-agentd-config.patch | 3 ++- .../{files => src-extra}/zabbix_helper_mac80211.c | 0 8 files changed, 9 insertions(+), 6 deletions(-) rename admin/zabbix/files/{ => usr/share/acl.d}/zabbix-network-ubus-acl.json (100%) rename admin/zabbix/files/{ => usr/share/acl.d}/zabbix-wifi-ubus-acl.json (100%) rename admin/zabbix/files/{ => usr/share/zabbix_agentd.openwrt-params.d}/mac80211 (100%) rename admin/zabbix/files/{ => usr/share/zabbix_agentd.openwrt-params.d}/network (100%) rename admin/zabbix/files/{ => usr/share/zabbix_agentd.openwrt-params.d}/wifi (100%) rename admin/zabbix/{files => src-extra}/zabbix_helper_mac80211.c (100%) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index 4c875d2f5a1bb..b53ea9df9d971 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -446,7 +446,7 @@ ifdef CONFIG_PACKAGE_zabbix-extra-mac80211 define Build/Prepare $(call Build/Prepare/Default) mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211 - $(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/ + $(CP) ./src-extra/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/ endef define Build/Configure @@ -486,8 +486,8 @@ define Package/zabbix/install/init.d endef define Package/zabbix/install/zabbix.conf.d - $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d - $(INSTALL_BIN) ./files/$(2) $(1)/etc/zabbix_agentd.conf.d/$(2) + $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d + $(INSTALL_DATA) ./files/usr/share/zabbix_agentd.openwrt-params.d/$(2) $(1)/usr/share/zabbix_agentd.openwrt-params.d/$(2) endef define Package/zabbix-agentd/conffiles @@ -497,6 +497,7 @@ endef define Package/zabbix-agentd/install $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d + $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d $(call Package/zabbix/install/sbin,$(1),agentd) $(call Package/zabbix/install/etc,$(1),agentd) $(call Package/zabbix/install/init.d,$(1),agentd) @@ -509,6 +510,7 @@ endef define Package/zabbix-agentd-basic/install $(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d + $(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d $(call Package/zabbix/install/sbin,$(1),agentd) $(call Package/zabbix/install/etc,$(1),agentd) $(call Package/zabbix/install/init.d,$(1),agentd) @@ -580,7 +582,7 @@ endef define Package/zabbix-extra-network/install $(call Package/zabbix/install/zabbix.conf.d,$(1),network) $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json + $(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json endef define Package/zabbix-extra-network/postinst @@ -593,7 +595,7 @@ endef define Package/zabbix-extra-wifi/install $(call Package/zabbix/install/zabbix.conf.d,$(1),wifi) $(INSTALL_DIR) $(1)/usr/share/acl.d - $(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json + $(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json endef define Package/zabbix-extra-wifi/postinst diff --git a/admin/zabbix/files/zabbix-network-ubus-acl.json b/admin/zabbix/files/usr/share/acl.d/zabbix-network-ubus-acl.json similarity index 100% rename from admin/zabbix/files/zabbix-network-ubus-acl.json rename to admin/zabbix/files/usr/share/acl.d/zabbix-network-ubus-acl.json diff --git a/admin/zabbix/files/zabbix-wifi-ubus-acl.json b/admin/zabbix/files/usr/share/acl.d/zabbix-wifi-ubus-acl.json similarity index 100% rename from admin/zabbix/files/zabbix-wifi-ubus-acl.json rename to admin/zabbix/files/usr/share/acl.d/zabbix-wifi-ubus-acl.json diff --git a/admin/zabbix/files/mac80211 b/admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/mac80211 similarity index 100% rename from admin/zabbix/files/mac80211 rename to admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/mac80211 diff --git a/admin/zabbix/files/network b/admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/network similarity index 100% rename from admin/zabbix/files/network rename to admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/network diff --git a/admin/zabbix/files/wifi b/admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/wifi similarity index 100% rename from admin/zabbix/files/wifi rename to admin/zabbix/files/usr/share/zabbix_agentd.openwrt-params.d/wifi diff --git a/admin/zabbix/patches/010-change-agentd-config.patch b/admin/zabbix/patches/010-change-agentd-config.patch index 7450e81e62326..b94fbe693fdff 100644 --- a/admin/zabbix/patches/010-change-agentd-config.patch +++ b/admin/zabbix/patches/010-change-agentd-config.patch @@ -83,10 +83,11 @@ Signed-off-by: Daniel F. Dickinson ####### USER-DEFINED MONITORED PARAMETERS ####### -@@ -547,5 +541,5 @@ Hostname=Zabbix server +@@ -547,5 +541,6 @@ Hostname=Zabbix server # Include= # Include=/usr/local/etc/zabbix_agentd.userparams.conf -# Include=/usr/local/etc/zabbix_agentd.conf.d/ # Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf ++Include=/usr/share/zabbix_agentd.openwrt-params.d/ +Include=/etc/zabbix_agentd.conf.d/ diff --git a/admin/zabbix/files/zabbix_helper_mac80211.c b/admin/zabbix/src-extra/zabbix_helper_mac80211.c similarity index 100% rename from admin/zabbix/files/zabbix_helper_mac80211.c rename to admin/zabbix/src-extra/zabbix_helper_mac80211.c From f38aa814bcfdcf165b99220a117d1772332cc9bc Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Fri, 17 Jul 2026 02:28:30 -0400 Subject: [PATCH 3/4] zabbix: stop shipping sysctl.d conf in package The sysctl file increases max files to allow the default full complement of discovery workers, however this is probably not a hard requirement and such a conf not shipped elsewhere in tree, so leave that to the user to configure. (The syslog messages from zabbix-server and/or zabbix-proxy provided the needed information). Signed-off-by: Daniel F. Dickinson --- admin/zabbix/Makefile | 3 --- admin/zabbix/files/zabbix-discovery-workers.conf.sysctl | 1 - 2 files changed, 4 deletions(-) delete mode 100644 admin/zabbix/files/zabbix-discovery-workers.conf.sysctl diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index b53ea9df9d971..000734f9caf0f 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -542,7 +542,6 @@ define Package/zabbix-server/conffiles /etc/zabbix_server.conf /etc/zabbix_server.conf.d/ /etc/config/zabbix_server -/etc/sysctl.d/90-zabbix-discovery-workers.conf endef define Package/zabbix-server/install @@ -550,8 +549,6 @@ define Package/zabbix-server/install $(call Package/zabbix/install/sbin,$(1),server) $(call Package/zabbix/install/etc,$(1),server) $(call Package/zabbix/install/init.d,$(1),server) - $(INSTALL_DIR) $(1)/etc/sysctl.d - $(INSTALL_CONF) ./files/zabbix-discovery-workers.conf.sysctl $(1)/etc/sysctl.d/90-zabbix-discovery-workers.conf $(INSTALL_DIR) $(1)/etc/config $(INSTALL_CONF) ./files/zabbix_server.config $(1)/etc/config/zabbix_server $(INSTALL_DIR) $(1)/etc/uci-defaults diff --git a/admin/zabbix/files/zabbix-discovery-workers.conf.sysctl b/admin/zabbix/files/zabbix-discovery-workers.conf.sysctl deleted file mode 100644 index e88c23943f991..0000000000000 --- a/admin/zabbix/files/zabbix-discovery-workers.conf.sysctl +++ /dev/null @@ -1 +0,0 @@ -fs.file-max=100000 From 376c3c307fa503c3fc0a6903623ee891953fb3eb Mon Sep 17 00:00:00 2001 From: "Daniel F. Dickinson" Date: Fri, 17 Jul 2026 02:48:36 -0400 Subject: [PATCH 4/4] zabbix: add php8-mod-simplexml dependency to frontend While the frontend can mostly operate without php8-mod-simplexml, when trying to import XML templates the user only gets unhelpful error messages and is unlikely to realize the module is required for that functionality. Therefore have the frontend depend on php8-mod-simplexml. Signed-off-by: Daniel F. Dickinson --- admin/zabbix/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile index 000734f9caf0f..2d841ab0c5965 100644 --- a/admin/zabbix/Makefile +++ b/admin/zabbix/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zabbix PKG_VERSION:=7.0.28 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://cdn.zabbix.com/zabbix/sources/stable/$(basename $(PKG_VERSION))/ \ @@ -360,6 +360,7 @@ define Package/zabbix-frontend-server +php8-mod-mbstring \ +php8-mod-openssl \ +php8-mod-session \ + +php8-mod-simplexml \ +php8-mod-sockets \ +php8-mod-xmlreader \ +php8-mod-xmlwriter