Hi, I've been using zabbix agent to monitor my OWRT devices and never had problems. As of the most-recent update (I guess 7.0.29 or maybe the one before it) it fails to install as such:
apk add zabbix-agentd
(1/9) Installing libnghttp2-14 (1.70.0-r1)
Executing libnghttp2-14-1.70.0-r1.post-install
(2/9) Installing libcurl4 (8.19.0-r2)
Executing libcurl4-8.19.0-r2.post-install
(3/9) Installing libevent2-core7 (2.1.12-r2)
Executing libevent2-core7-2.1.12-r2.post-install
(4/9) Installing libevent2-pthreads7 (2.1.12-r2)
Executing libevent2-pthreads7-2.1.12-r2.post-install
(5/9) Installing libpci (3.14.0-r2)
Executing libpci-3.14.0-r2.post-install
(6/9) Installing libnetsnmp-ssl (5.9.4-r6)
Executing libnetsnmp-ssl-5.9.4-r6.post-install
(7/9) Installing libsasl2 (2.1.28-r4)
Executing libsasl2-2.1.28-r4.post-install
(8/9) Installing libopenldap (2.6.10-r2)
Executing libopenldap-2.6.10-r2.post-install
(9/9) Installing zabbix-agentd (7.0.29-r1)
Installing file to etc/zabbix_agentd.conf.apk-new
Executing zabbix-agentd-7.0.29-r1.post-install
OK: 54.8 MiB in 314 packages
Errors
* /proc/self/fd/7: .: line 9: can't open '/etc/uci-defaults/90_zabbix_agentd': No such file or directory
Both zabbix-agentd and zabbix-agentd-basic fail the same way. I have another device which runs 7.0.27-r1 which still works fine, I guess I was running that version before as I update my boxes at the same time.
Anyone else having issues? What could fix this?
@SensitiveRambo A question and some info:
- Does the error you see prevent installation or is it just 'noise'?
- I believe the issue is the old-style postinst
define Package/zabbix-proxy/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || (. /etc/uci-defaults/90_zabbix_agentd) && rm -f /etc/uci-defaults/90_zabbix_agentd
exit 0
endef
I have recently learned this has not actually been needed on OpenWrt for quite some time as the default postinst automatically handles, and deletes the uci-defaults script (so it only runs once). What you are seeing is the postinst trying to run a script that no longer exists (for the reason mentioned).
This is something for me to fix in the packaging.
If the issue is that the agent is not running, you need to edit /etc/config/zabbix_agentd so that
config zabbix_agentd 'general'
option enabled 0
# option never_root 1
is instead
config zabbix_agentd 'general'
option enabled 1
# option never_root 1
2 Likes
So I guess indeed the post install script that runs into a problem. When I try to reload/restart the agentd, I get this entry in syslog:
[2026. szept. 2. 10:57:23 CEST] user.notice: root: service not enabled in /etc/config/zabbix_agentd
Changing "option enabled" from 0 to 1 seems indeed worked though - thank you!
1 Like
To clarify: the post-install issue is a mostly cosmetic error message; the need for enabled is a result of adding a new UCI config file for zabbix_agentd, and there being no clean way to migrate current agentd instances to default enabled that doesn't have some other unintended consequence.