Hi Etienne,
we don't really need busybox hostname, we can read it directly from
/proc/sys/kernel/hostname
and save a fork every time zabbix needs the hostname.
Patch against the packages repository.
Signed-off-by: Stefan Hellermann <[email protected]>
diff --git a/admin/zabbix/Makefile b/admin/zabbix/Makefile
index 5ee8425..2836354 100644
--- a/admin/zabbix/Makefile
+++ b/admin/zabbix/Makefile
@@ -99,12 +99,6 @@ As it uses libiwinfo, it works with all wifi devices
supported by openwrt.
See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix
templates.
endef
-
-define Package/zabbix-agentd/config
- select BUSYBOX_CONFIG_HOSTNAME if !PACKAGE_net-tools-hostname
- select BUSYBOX_CONFIG_UNAME if !PACKAGE_coreutils-uname
-endef
-
CONFIGURE_ARGS+= \
--enable-agent \
--enable-server \
diff --git a/admin/zabbix/patches/010-change-agentd-config.patch
b/admin/zabbix/patches/010-change-agentd-config.patch
index 58424e9..a79fc72 100644
--- a/admin/zabbix/patches/010-change-agentd-config.patch
+++ b/admin/zabbix/patches/010-change-agentd-config.patch
@@ -50,7 +50,15 @@
### Option: HostnameItem
# Item used for generating Hostname if it is undefined.
# Ignored if Hostname is defined.
-@@ -213,7 +204,7 @@ Hostname=Zabbix server
+@@ -140,6 +131,7 @@ Hostname=Zabbix server
+ # Mandatory: no
+ # Default:
+ # HostnameItem=system.hostname
++HostnameItem=vfs.file.contents[/proc/sys/kernel/hostname]
+
+ ### Option: RefreshActiveChecks
+ # How often list of active checks is refreshed, in seconds.
+@@ -213,7 +205,7 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel