Browse Source

zabbix: Bump to latest version

This upgrade zabbix to the newest version. Changing SQLite for PostgreSQL, because of dropping SQLite support for server/frontend.
More info:https://www.zabbix.com/documentation/3.4/manual/installation/upgrade_notes_340#dropping_sqlite_support_for_serverfrontend
In addition added required dependencies.
More info:https://www.zabbix.com/documentation/3.4/manual/installation/requirements

Compile tested: Yes, brcm2708
Run tested: Yes, brcm2708

Signed-off-by: Krystian Kozak <krystian.kozak20@gmail.com>
lilik-openwrt-22.03
Krystian Kozak 7 years ago
parent
commit
b211914fd0
3 changed files with 13 additions and 57 deletions
  1. +12
    -10
      admin/zabbix/Makefile
  2. +0
    -35
      admin/zabbix/patches/002-fix-res_send-on-uclibc.patch
  3. +1
    -12
      admin/zabbix/patches/100-musl-compat.patch

+ 12
- 10
admin/zabbix/Makefile View File

@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=zabbix PKG_NAME:=zabbix
PKG_VERSION:=3.2.7
PKG_RELEASE:=2
PKG_VERSION:=3.4.10
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=3ea0c299bd69bc728177128740f0476bc1a2c1de438330df5bbd8f5fc6090712
PKG_HASH:=cdee0fd44e11ae214b2cc252974da22f3627c326ea2c61a0315af95165c52d1b
PKG_SOURCE_URL:=@SF/zabbix PKG_SOURCE_URL:=@SF/zabbix
PKG_LICENSE:=GPL-2.0 PKG_LICENSE:=GPL-2.0
@ -33,7 +33,7 @@ define Package/zabbix/Default
SUBMENU:=zabbix SUBMENU:=zabbix
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com> MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
USERID:=zabbix=53:zabbix=53 USERID:=zabbix=53:zabbix=53
DEPENDS += $(ICONV_DEPENDS)
DEPENDS += $(ICONV_DEPENDS) +libpcre
endef endef
define Package/zabbix-agentd define Package/zabbix-agentd
@ -72,31 +72,31 @@ endef
define Package/zabbix-server define Package/zabbix-server
$(call Package/zabbix/Default) $(call Package/zabbix/Default)
TITLE+= server TITLE+= server
DEPENDS += +libsqlite3
DEPENDS += +pgsql-cli +libevent2
endef endef
define Package/zabbix-proxy define Package/zabbix-proxy
$(call Package/zabbix/Default) $(call Package/zabbix/Default)
TITLE+= proxy TITLE+= proxy
DEPENDS += +libsqlite3
DEPENDS += +pgsql-cli
endef endef
define Package/zabbix-extra-mac80211/description define Package/zabbix-extra-mac80211/description
An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters. An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root. It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root.
See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates.
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef endef
define Package/zabbix-extra-network/description define Package/zabbix-extra-network/description
An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces. An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces.
The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0) The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0)
See http://wiki.openwrt.org/doc/howto/zabbix for ready to use zabbix templates.
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef endef
define Package/zabbix-extra-wifi/description define Package/zabbix-extra-wifi/description
An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters. An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters.
As it uses libiwinfo, it works with all wifi devices supported by openwrt. 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.
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
endef endef
CONFIGURE_ARGS+= \ CONFIGURE_ARGS+= \
@ -105,7 +105,9 @@ CONFIGURE_ARGS+= \
--enable-proxy \ --enable-proxy \
$(call autoconf_bool,CONFIG_IPV6,ipv6) \ $(call autoconf_bool,CONFIG_IPV6,ipv6) \
--disable-java \ --disable-java \
--with-sqlite3="$(STAGING_DIR)/usr"
--with-postgresql \
--with-libevent=$(STAGING_DIR)/usr/include/libevent \
--with-libpcre=$(STAGING_DIR)/usr/include
MAKE_FLAGS += ARCH="linux" MAKE_FLAGS += ARCH="linux"


+ 0
- 35
admin/zabbix/patches/002-fix-res_send-on-uclibc.patch View File

@ -1,35 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,10 @@ if test "x$found_resolv" != "xyes"; then
AC_MSG_ERROR([Unable to do DNS lookups (libresolv check failed)])
fi
LIBS="${LIBS} ${RESOLV_LIBS}"
+AC_SEARCH_LIBS([res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
+AC_SEARCH_LIBS([__res_mkquery], [], [AC_DEFINE([HAVE_RES_MKQUERY], 1, [Define if res_mkquery exists])])
+AC_SEARCH_LIBS([res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
+AC_SEARCH_LIBS([__res_send], [], [AC_DEFINE([HAVE_RES_SEND], 1, [Define if res_send exists])])
dnl *****************************************************************
dnl * *
--- a/src/libs/zbxsysinfo/common/net.c
+++ b/src/libs/zbxsysinfo/common/net.c
@@ -471,6 +471,7 @@ static int dns_query(AGENT_REQUEST *requ
return SYSINFO_RET_FAIL;
}
+#if defined(HAVE_RES_MKQUERY) && defined(HAVE_RES_SEND)
if (-1 == (res = res_mkquery(QUERY, zone, C_IN, type, NULL, 0, NULL, buf, sizeof(buf))))
{
SET_MSG_RESULT(result, zbx_dsprintf(NULL, "Cannot create DNS query: %s", zbx_strerror(errno)));
@@ -505,6 +506,11 @@ static int dns_query(AGENT_REQUEST *requ
_res.retry = retry;
res = res_send(buf, res, answer.buffer, sizeof(answer.buffer));
+#else /* defined(HAVE_RES_QUERY) && defined(HAVE_RES_SEND) */
+ /* retrand and retry are ignored */
+ if (-1 == (res = res_query(zone, C_IN, type, answer.buffer, sizeof(answer.buffer))))
+ return SYSINFO_RET_FAIL;
+#endif
_res.options = saved_options;
_res.retrans = saved_retrans;

+ 1
- 12
admin/zabbix/patches/100-musl-compat.patch View File

@ -9,15 +9,4 @@
sys/socket.h sys/loadavg.h arpa/inet.h \ sys/socket.h sys/loadavg.h arpa/inet.h \
sys/vmmeter.h strings.h vm/vm_param.h \ sys/vmmeter.h strings.h vm/vm_param.h \
sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \ sys/time.h kstat.h sys/syscall.h sys/sysmacros.h \
@@ -63,6 +63,11 @@ AC_CHECK_HEADERS(stdio.h stdlib.h string
Winber.h lber.h ws2tcpip.h inttypes.h sys/file.h grp.h \
execinfo.h libperfstat.h sys/systemcfg.h sys/mnttab.h mntent.h sys/times.h \
dlfcn.h sys/utsname.h)
+AC_CHECK_HEADERS(sys/sysinfo.h, [], [], [
+#ifdef HAVE_LINUX_KERNEL_H
+# include <linux/kernel.h>
+#endif
+])
AC_CHECK_HEADERS(resolv.h, [], [], [
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>

Loading…
Cancel
Save