Hi Etienne, yes, "system.hostname" is still broken, and "system.users.num" is also broken, the last one needs busybox who. I'm using "agent.hostname" instead of "system.hostname", I don't need "system.users.num" and deploy my configuration files from a central place. But you're right, it's probably easier to just add hostname and maybe who to busybox. Additionally we should apply the first hunk of my patch to remove the selects on BUSYBOX_CONFIG_{HOSTNAME,UNAME}
What do the maintainers of openwrt/busybox think? Is it useful to have a hostname binary on a router/access point? Maybe for shell scripts or some web-interface? If yes, can you add it? Otherwise we should patch zabbix to default to read the hostname from /proc/sys/kernel/hostname. The configuration change in my patch below is not enough, as it will not update already deployed systems. Regards, Stefan 2014/1/21 Etienne CHAMPETIER <etienne.champet...@free.fr> > Hi Stefan, > > With your patch, system.hostname is still broken, and you have to > reconfigure all zabbix agent. > I prefer to patch zabbix (if busybox hostname is a nogo) > > Regards, > Etienne > > Stefan Hellermann <ste...@the2masters.de> a écrit : > > >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 <ste...@the2masters.de> > > > >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 openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel