summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-08-12 09:32:49 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-08-12 09:32:49 +0000
commitb347b3ec0d1cdb6ceb705f8247ec659961d52eb3 (patch)
tree300b2416b17f7a5b3b25377904186b988e7d73d0
parent4e78120156e78bc753889c13f068311ac7b45ffa (diff)
downloadaports-b347b3ec0d1cdb6ceb705f8247ec659961d52eb3.tar.bz2
aports-b347b3ec0d1cdb6ceb705f8247ec659961d52eb3.tar.xz
testing/zabbix: new aport
Enterprise-class open source distributed monitoring www.zabbix.com ref #251
-rw-r--r--testing/zabbix/APKBUILD72
-rw-r--r--testing/zabbix/zabbix-dn_skipname.patch44
-rw-r--r--testing/zabbix/zabbix_proxy.conf175
-rw-r--r--testing/zabbix/zabbix_server.conf155
-rw-r--r--testing/zabbix/zabbix_trapper.conf44
5 files changed, 490 insertions, 0 deletions
diff --git a/testing/zabbix/APKBUILD b/testing/zabbix/APKBUILD
new file mode 100644
index 000000000..0091a35d5
--- /dev/null
+++ b/testing/zabbix/APKBUILD
@@ -0,0 +1,72 @@
+# Contributor: Jeff Bilyk <jbilyk at gmail>
+# Maintainer: Natanael Copa <natanael.copa@gmail.com>
+pkgname=zabbix
+pkgver=1.8.2
+pkgrel=0
+pkgdesc="Enterprise-class open source distributed monitoring"
+url="www.zabbix.com"
+license="GPL"
+depends="sqlite php php-sqlite3 php-gd fping"
+makedepends="sqlite-dev libiconv-dev"
+install=
+pkgusers="zabbix"
+pkggroups="zabbix"
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
+ zabbix_server.conf
+ zabbix_trapper.conf
+ zabbix_proxy.conf
+ zabbix-dn_skipname.patch
+ "
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch)
+ msg "Applying $i"
+ patch -p1 -i "$srcdir"/$i || return 1
+ ;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-server \
+ --with-sqlite3
+ make || return 1
+}
+
+package() {
+ local _wwwdir="$pkgdir"/usr/share/webapp/zabbix
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -d -m0750 -o zabbix -g zabbix \
+ "$pkgdir"/var/run/zabbix "$pkgdir"/var/log/zabbix
+
+ install -d "$pkgdir"/etc/zabbix
+ install -d "$pkgdir"/usr/share/zabbix/dbms/create/data
+ install -d -m0755 "$_wwwdir"
+ install -D -m0640 "$srcdir"/zabbix_server.conf "$pkgdir"/etc/zabbix/zabbix_server.conf
+ install -D -m0640 "$srcdir"/zabbix_trapper.conf "$pkgdir"/etc/zabbix/zabbix_trapper.conf
+# install -D -m0755 "$srcdir"/zabbix-server.initd "$pkgdir"/etc/rc.d/zabbix-server
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/data.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/data.sql
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/images_mysql.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/images_mysql.sql
+ install -D -m0755 "$srcdir"/zabbix-$pkgver/create/schema/mysql.sql "$pkgdir"/usr/share/zabbix/dbms/create/mysql.sql
+ cp -r "$srcdir"/zabbix-$pkgver/frontends/php/* "$_wwwdir"
+
+}
+
+md5sums="fa4be4fa7ac20a33cc0aa5c27b827746 zabbix-1.8.2.tar.gz
+26b0401a83bdb1dce29338e5b2786620 zabbix_server.conf
+9832a81e134c8e2c11e2a06b7adbf88f zabbix_trapper.conf
+0310b92afb3f35c1075fff53db737212 zabbix_proxy.conf
+d13166483792401be2d25b37b0170b82 zabbix-dn_skipname.patch"
diff --git a/testing/zabbix/zabbix-dn_skipname.patch b/testing/zabbix/zabbix-dn_skipname.patch
new file mode 100644
index 000000000..df75e914a
--- /dev/null
+++ b/testing/zabbix/zabbix-dn_skipname.patch
@@ -0,0 +1,44 @@
+diff --git a/src/libs/zbxsysinfo/common/net.c b/src/libs/zbxsysinfo/common/net.c
+index c8956a6..645fd8c 100644
+--- a/src/libs/zbxsysinfo/common/net.c
++++ b/src/libs/zbxsysinfo/common/net.c
+@@ -26,6 +26,39 @@
+
+ #include "net.h"
+
++#if defined(__UCLIBC__) && defined(HAVE_RES_QUERY)
++/*
++ * Skip over a compressed domain name. Return the size or -1.
++ */
++int
++__dn_skipname(const u_char *comp_dn, const u_char *eom)
++{
++ const u_char *cp;
++ int n;
++
++ cp = comp_dn;
++ while (cp < eom && (n = *cp++)) {
++ /*
++ * check for indirection
++ */
++ switch (n & INDIR_MASK) {
++ case 0: /* normal case, n == len */
++ cp += n;
++ continue;
++ case INDIR_MASK: /* indirection */
++ cp++;
++ break;
++ default: /* illegal type */
++ return (-1);
++ }
++ break;
++ }
++ if (cp > eom)
++ return (-1);
++ return (cp - comp_dn);
++}
++#endif
++
+ /*
+ * 0 - NOT OK
+ * 1 - OK
diff --git a/testing/zabbix/zabbix_proxy.conf b/testing/zabbix/zabbix_proxy.conf
new file mode 100644
index 000000000..899fac246
--- /dev/null
+++ b/testing/zabbix/zabbix_proxy.conf
@@ -0,0 +1,175 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# IP address (or hostname) of ZABBIX servers.
+
+Server=127.0.0.1
+
+# Server port for sending active checks
+
+ServerPort=10051
+
+# Unique hostname.
+
+Hostname=proxy
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform sending hearbeat message
+# (in seconds)
+# Default value is 60 seconds
+# Set to 0 to disable heartbeat messages
+# This parameter must be between 0 and 3600
+#HeartbeatFrequency=60
+
+# How often ZABBIX will perform sync configuration data
+# (in seconds)
+# Default value is 3600 seconds (1h)
+# This parameter must be between 1 and 604800 (1 week)
+#ConfigFrequency=3600
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+#SenderFrequency=30
+
+# Local bufer size in hours. Proxy will keep collected data N hours.
+# Default value is 0 hours
+#ProxyLocalBuffer=0
+
+# Offline buffer size in hours. It is used when server is not available.
+# Older data is removed.
+# Default value is 1 hours
+#ProxyOfflineBuffer=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+#DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+PidFile=/var/run/zabbix/zabbix_proxy.pid
+
+# Name of log file
+# If not set, syslog is used
+LogFile=/var/log/zabbix/zabbix_proxy.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+LogFileSize=1
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of 'fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=proxy
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/tmp/mysql.sock
diff --git a/testing/zabbix/zabbix_server.conf b/testing/zabbix/zabbix_server.conf
new file mode 100644
index 000000000..39c12ef0d
--- /dev/null
+++ b/testing/zabbix/zabbix_server.conf
@@ -0,0 +1,155 @@
+# This is config file for ZABBIX server process
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# This defines unique NodeID in distributed setup,
+# Default value 0 (standalone server)
+# This parameter must be between 0 and 999
+#NodeID=0
+
+# Number of pre-forked instances of pollers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartPollers=5
+
+# Number of pre-forked instances of IPMI pollers
+# Default value is 0
+# This parameter must be between 0 and 255
+#StartIPMIPollers=0
+
+# Number of pre-forked instances of pollers for unreachable hosts
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPollersUnreachable=1
+
+# Number of pre-forked instances of trappers
+# Default value is 5
+# This parameter must be between 0 and 255
+#StartTrappers=5
+
+# Number of pre-forked instances of ICMP pingers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartPingers=1
+
+# Number of pre-forked instances of discoverers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartDiscoverers=1
+
+# Number of pre-forked instances of HTTP pollers
+# Default value is 1
+# This parameter must be between 0 and 255
+#StartHTTPPollers=1
+
+# Listen port for trapper. Default port number is 10051. This parameter
+# must be between 1024 and 32767
+
+#ListenPort=10051
+
+# Source IP address for outgouing connections
+#SourceIP=
+
+# Listen interface for trapper. Trapper will listen all network interfaces
+# if this parameter is missing.
+
+#ListenIP=127.0.0.1
+
+# How often ZABBIX will perform housekeeping procedure
+# (in hours)
+# Default value is 1 hour
+# Housekeeping is removing unnecessary information from
+# tables history, alert, and alarms
+# This parameter must be between 1 and 24
+
+#HousekeepingFrequency=1
+
+# How often ZABBIX will try to send unsent alerts
+# (in seconds)
+# Default value is 30 seconds
+SenderFrequency=30
+
+# Uncomment this line to disable housekeeping procedure
+#DisableHousekeeping=1
+
+# Specifies debug level
+# 0 - debug is not created
+# 1 - critical information
+# 2 - error information
+# 3 - warnings (default)
+# 4 - for debugging (produces lots of information)
+
+DebugLevel=3
+
+# Specifies how long we wait for agent response (in sec)
+# Must be between 1 and 30
+Timeout=5
+
+# Specifies how many seconds trapper may spend processing new data
+# Must be between 1 and 30
+#TrapperTimeout=5
+
+# After how many seconds of unreachability treat a host as unavailable
+#UnreachablePeriod=45
+
+# How ofter check host for availability during the unreachability period
+#UnavailableDelay=15
+
+# How ofter check host for availability during the unavailability period
+#UnavailableDelay=60
+
+# Name of PID file
+
+PidFile=/var/run/zabbix/zabbix_server.pid
+
+# Name of log file
+# If not set, syslog is used
+
+LogFile=/var/log/zabbix/zabbix_server.log
+
+# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
+LogFileSize=2
+
+# Location for custom alert scripts
+AlertScriptsPath=/home/zabbix/bin/
+
+# Location of external scripts
+#ExternalScripts=/etc/zabbix/externalscripts
+
+# Location of fping. Default is /usr/sbin/fping
+# Make sure that fping binary has root permissions and SUID flag set
+#FpingLocation=/usr/sbin/fping
+
+# Location of fping6. Default is /usr/sbin/fping6
+# Make sure that fping binary has root permissions and SUID flag set
+#Fping6Location=/usr/sbin/fping6
+
+# Temporary directory. Default is /tmp
+#TmpDir=/tmp
+
+# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
+#PingerFrequency=60
+
+# Database host name
+# Default is localhost
+
+#DBHost=localhost
+
+# Database name
+# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
+DBName=zabbix
+
+# Database user
+
+DBUser=root
+
+# Database password
+# Comment this line if no password used
+
+#DBPassword=<password>
+
+# Connect to MySQL using Unix socket?
+
+#DBSocket=/tmp/mysql.sock
diff --git a/testing/zabbix/zabbix_trapper.conf b/testing/zabbix/zabbix_trapper.conf
new file mode 100644
index 000000000..7f235f66b
--- /dev/null
+++ b/testing/zabbix/zabbix_trapper.conf
@@ -0,0 +1,44 @@
+# This is config file for zabbix_trapper
+# To get more information about ZABBIX,
+# go http://www.zabbix.com
+
+############ GENERAL PARAMETERS #################
+
+# Specifies debug level
+# 1 - critical information
+# 2 - warnings (default)
+# 3 - for debugging (produces lots of information)
+
+DebugLevel=2
+
+# Spend no more than Timeout seconds on processing
+# Must be between 1 and 30
+
+Timeout=3
+
+# Name of log file
+# If not set, syslog will be used
+
+LogFile=/var/log/zabbix/zabbix_trapper.log
+
+# Database host name
+# Default is localhost
+
+DBHost=localhost
+
+# Database name
+
+DBName=zabbix
+
+# Database user
+
+DBUser=zabbix
+
+# Database password
+# Comment this line if no password used
+
+DBPassword=zabbix
+
+# Connect to MySQL usig Unix socket?
+
+#DBSocket=/tmp/mysql.sock