mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-03 21:01:22 +02:00
testing/zabbix-agent2-alpine: new aport
This commit is contained in:
parent
0f1232ae4d
commit
c54681c22b
51
testing/zabbix-agent2-alpine/APKBUILD
Normal file
51
testing/zabbix-agent2-alpine/APKBUILD
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
|
||||||
|
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
|
||||||
|
pkgname=zabbix-agent2-alpine
|
||||||
|
pkgver=5.0.1
|
||||||
|
pkgrel=0
|
||||||
|
_plugins_version=0.2
|
||||||
|
pkgdesc="Zabbix Agent2 with additional plugins"
|
||||||
|
url="https://gitlab.alpinelinux.org/alpine/infra/infra-packages/-/tree/master/infra/zabbix-agent2-alpine"
|
||||||
|
arch="all"
|
||||||
|
license="GPL-2.0-or-later"
|
||||||
|
makedepends="go autoconf automake pcre-dev zlib-dev"
|
||||||
|
options="!check" # no test suite
|
||||||
|
subpackages="$pkgname-openrc"
|
||||||
|
source="$pkgname-$pkgver.tar.gz::https://github.com/zabbix/zabbix/archive/$pkgver.tar.gz
|
||||||
|
https://gitlab.alpinelinux.org/alpine/infra/zabbix-agent2-plugins/-/archive/v$_plugins_version/zabbix-agent2-plugins-v$_plugins_version.tar.gz
|
||||||
|
zabbix-agent2.initd
|
||||||
|
zabbix_agent2.conf
|
||||||
|
enable-plugins.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/zabbix-$pkgver"
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
default_prepare
|
||||||
|
./bootstrap.sh
|
||||||
|
|
||||||
|
cp -r "$srcdir"/zabbix-agent2-plugins-v$_plugins_version/plugins/* \
|
||||||
|
"$builddir"/src/go/plugins/
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
./configure \
|
||||||
|
--sysconfdir=/etc/zabbix \
|
||||||
|
--mandir=/usr/share/man \
|
||||||
|
--enable-agent2 \
|
||||||
|
--enable-static
|
||||||
|
make
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
install -Dm0755 src/go/bin/zabbix_agent2 $pkgdir/usr/sbin/zabbix_agent2
|
||||||
|
install -Dm0755 $srcdir/zabbix-agent2.initd $pkgdir/etc/init.d/zabbix-agent2
|
||||||
|
install -dm0755 $pkgdir/etc/zabbix/agent2.conf.d/
|
||||||
|
|
||||||
|
install -Dm0644 $srcdir/zabbix_agent2.conf $pkgdir/etc/zabbix/zabbix_agent2.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="831920f49c9d8f6d1e0da7be82a2cca2007558ea73e35584939e77a1a9f517c4e5154676afff53f31d13f887d6369add960192bbdbdb40b7b56218a907528d66 zabbix-agent2-alpine-5.0.1.tar.gz
|
||||||
|
1270b0d4166aba0e199ea66ed870eafc1fb65ed2c49317e35567504ad651ea294849656ea0b98172b896a91eeb5c87c692217a986e6bc6ed896498e7c7776197 zabbix-agent2-plugins-v0.2.tar.gz
|
||||||
|
177fafc9534a1107f91b428ddf2655e0ef617c417189afa40e3bb34b1e8492dafd53db5845fd97096b90b846da2cc27775d1bea942b0f6f8275de49778b8c154 zabbix-agent2.initd
|
||||||
|
a5668a01ef840f63516b86976f27906f1e4689fb7c1fd0864ce82028d2405fc6a5ba3b9d1bfa2828343935cbeb5fd9c6c7aba4bf1a00e3e301b12199ea61bd13 zabbix_agent2.conf
|
||||||
|
fb5b237edd229c6300867084810c9bb051e9c7ee09fc4499837d8be9f99678549de757cf2c5dbecf513322e4705e7ea2be8e4f4965fded3d09a10a69ec17b37e enable-plugins.patch"
|
12
testing/zabbix-agent2-alpine/enable-plugins.patch
Normal file
12
testing/zabbix-agent2-alpine/enable-plugins.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
This makes the go agent aware of the added plugins
|
||||||
|
|
||||||
|
diff --git a/src/go/plugins/plugins_linux.go b/src/go/plugins/plugins_linux.go
|
||||||
|
index 714f783..7a57116 100644
|
||||||
|
--- a/src/go/plugins/plugins_linux.go
|
||||||
|
+++ b/src/go/plugins/plugins_linux.go
|
||||||
|
@@ -42,4 +42,5 @@ import (
|
||||||
|
_ "zabbix.com/plugins/zabbix/async"
|
||||||
|
_ "zabbix.com/plugins/zabbix/stats"
|
||||||
|
_ "zabbix.com/plugins/zabbix/sync"
|
||||||
|
+ _ "zabbix.com/plugins/alpine"
|
||||||
|
)
|
9
testing/zabbix-agent2-alpine/zabbix-agent2.initd
Normal file
9
testing/zabbix-agent2-alpine/zabbix-agent2.initd
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/sbin/openrc-run
|
||||||
|
|
||||||
|
command=/usr/sbin/zabbix_agent2
|
||||||
|
supervisor="supervise-daemon"
|
||||||
|
|
||||||
|
start_pre() {
|
||||||
|
checkpath --directory --owner zabbix:zabbix /run/zabbix/
|
||||||
|
checkpath --directory --owner zabbix:zabbix /var/log/zabbix
|
||||||
|
}
|
8
testing/zabbix-agent2-alpine/zabbix_agent2.conf
Normal file
8
testing/zabbix-agent2-alpine/zabbix_agent2.conf
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
DebugLevel=3
|
||||||
|
HostnameItem=system.hostname
|
||||||
|
LogFile=/var/log/zabbix/zabbix_agentd.log
|
||||||
|
ControlSocket=/run/zabbix/agent2.sock
|
||||||
|
|
||||||
|
DenyKey=system.run[*]
|
||||||
|
|
||||||
|
Include=/etc/zabbix/agent2.conf.d/*.conf
|
Loading…
x
Reference in New Issue
Block a user