zabbix: update

This commit is contained in:
Jörg Deckert 2020-05-10 18:27:27 +02:00
parent a9c5928d63
commit b571b84bf7
6 changed files with 442 additions and 163 deletions

View File

@ -1,3 +1,7 @@
SB_COMMIT ?= 52d576be616453b3fd4c93cad4eccae29cc5b3b5
SB_TARBALL = $(SB_COMMIT).tar.gz
SB_URL = https://github.com/mickvav/snmpbuilder/archive/$(SB_TARBALL)
preinstall:
# hardcoded users and groups
$(inroot) useradd --system --comment="created from appliance building - zabbix user" --home-dir="/var/lib/zabbix/home" --shell="/sbin/nologin" --no-create-home --uid 600 --user-group zabbix
@ -10,6 +14,15 @@ preinstall:
$(inroot) $(EMERGE) $(USEPKG) --emptytree @world
$(inroot) bash -c 'yes YES | etc-update --automode -9'
install_snmpbuilder:
$(inroot) test -f /var/cache/distfiles/$(SB_TARBALL) || \
$(inroot) wget -P /var/cache/distfiles $(SB_URL)
$(inroot) tar xf /var/cache/distfiles/$(SB_TARBALL) -C /tmp
cp $(CHROOT)/tmp/snmpbuilder-$(OF_COMMIT)/snmp_builder.php $(CHROOT)/var/www/localhost/htdocs/zabbix/
cp -r $(CHROOT)/tmp/snmpbuilder-$(OF_COMMIT)/snmp_builder $(CHROOT)/var/www/localhost/htdocs/zabbix/
sed -i 's#/var/www/html/zabbix/snmp_builder/mibs#/var/www/localhost/htdocs/zabbix/snmp_builder/mibs#' $(CHROOT)/var/www/localhost/htdocs/zabbix/snmp_builder.php
patch -d $(CHROOT)/var/www/localhost/htdocs/zabbix/ -p1 < zabbix/snmp_builder.diff
postinstall: base/timesyncd.conf base/firstboot.start
# Konfigurationen anpassen
cp base/timesyncd.conf $(CHROOT)/etc/systemd/timesyncd.conf
@ -58,6 +71,8 @@ postinstall: base/timesyncd.conf base/firstboot.start
# Install Zabbix webapp
$(inroot) webapp-config -h localhost -d zabbix -I zabbix `ls $(CHROOT)/usr/share/webapps/zabbix`
cp $(CHROOT)/var/www/localhost/htdocs/zabbix/conf/zabbix.conf.php.example $(CHROOT)/var/www/localhost/htdocs/zabbix/conf/zabbix.conf.php
# enable any language
sed -i "s:'display' => false]:'display' => true]:" $(CHROOT)/var/www/localhost/htdocs/zabbix/include/locales.inc.php
# im Zabbix-Ebuild wird fowners und fperms vor webapp_src_install aufgerufen und deswegen wieder überschrieben
$(inroot) chown -R zabbix:zabbix \
/etc/zabbix \
@ -111,4 +126,9 @@ postinstall: base/timesyncd.conf base/firstboot.start
$(inroot)chmod 0775 /var/log/snmptt
$(inroot)chown zabbix:zabbix /var/log/snmptt
# Zabbix SNMP Builder
<------># oletools zur Office-Macro-Erkennung in rspamd
<------>$(MAKE) install_snmpbuilder
<------>$(MAKE) install_
clean:

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1,2 @@
# nur LTS-Versionen 4.0.x bauen
>=net-analyzer/zabbix-4.1
# nur LTS-Versionen 5.0.x bauen
>=net-analyzer/zabbix-5.1

View File

@ -20,8 +20,11 @@ sys-kernel/gentoo-sources symlink
# Zabbix
app-admin/rsyslog dbi mysql openssl snmp systemd
app-eselect/eselect-php apache2
app-text/poppler -introspection -jpeg -jpeg2k
dev-java/openjdk-bin headless-awt
dev-lang/php apache2 bcmath gd ldap mysql mysqli sockets sysvipc truetype xmlreader xmlwriter
media-libs/gd jpeg png
net-analyzer/zabbix curl frontend ldap libxml2 mysql openipmi -postgres proxy server snmp ssh xmpp
net-analyzer/zabbix curl frontend java ldap libxml2 mysql openipmi -postgres proxy server snmp ssh xmpp
net-analyzer/net-snmp perl
net-analyzer/fping suid
net-print/cups-filters -foomatic -postscript

View File

@ -11,6 +11,7 @@ sys-power/acpid
app-admin/rsyslog
dev-db/mariadb
dev-db/phpmyadmin
dev-java/openjdk-bin:8
dev-perl/Config-General
dev-perl/JSON-XS
dev-perl/libwww-perl

View File

@ -0,0 +1,28 @@
diff -Naur zabbix.orig/include/menu.inc.php zabbix/include/menu.inc.php
--- zabbix.orig/include/menu.inc.php 2020-04-23 14:29:57.501288404 +0200
+++ zabbix/include/menu.inc.php 2020-04-23 15:33:04.287832813 +0200
@@ -108,6 +108,8 @@
'host_discovery.php', 'disc_prototypes.php', 'trigger_prototypes.php',
'host_prototypes.php', 'httpconf.php'
]),
+ (new CMenuItem(_('SNMP Builder')))
+ ->setUrl(new CUrl('snmp_builder.php'), 'snmp_builder.php'),
(new CMenuItem(_('Maintenance')))
->setUrl(new CUrl('maintenance.php'), 'maintenance.php'),
(new CMenuItem(_('Actions')))
diff -Naur zabbix.orig/jsLoader.php zabbix/jsLoader.php
--- zabbix.orig/jsLoader.php 2020-04-23 14:29:57.597288801 +0200
+++ zabbix/jsLoader.php 2020-04-23 15:37:21.024675747 +0200
@@ -112,7 +112,11 @@
// page-specific scripts
'items.js' => 'pages/',
'popup.condition.common.js' => 'pages/',
- 'popup.operation.common.js' => 'pages/'
+ 'popup.operation.common.js' => 'pages/',
+ // snmp_builder
+ '../snmp_builder/Tree.js' => '',
+ '../snmp_builder/snmp_builder.js' => '',
+ '../snmp_builder/DynTable.js' => ''
];
$tranStrings = [