aboutsummaryrefslogtreecommitdiff
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)
downloadalpine_aports-b347b3ec0d1cdb6ceb705f8247ec659961d52eb3.tar.bz2
alpine_aports-b347b3ec0d1cdb6ceb705f8247ec659961d52eb3.tar.xz
alpine_aports-b347b3ec0d1cdb6ceb705f8247ec659961d52eb3.zip
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 0000000000..0091a35d5d
--- /dev/null
+++ b/testing/zabbix/APKBUILD
@@ -0,0 +1,72 @@
1# Contributor: Jeff Bilyk <jbilyk at gmail>
2# Maintainer: Natanael Copa <natanael.copa@gmail.com>
3pkgname=zabbix
4pkgver=1.8.2
5pkgrel=0
6pkgdesc="Enterprise-class open source distributed monitoring"
7url="www.zabbix.com"
8license="GPL"
9depends="sqlite php php-sqlite3 php-gd fping"
10makedepends="sqlite-dev libiconv-dev"
11install=
12pkgusers="zabbix"
13pkggroups="zabbix"
14subpackages="$pkgname-dev $pkgname-doc"
15source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
16 zabbix_server.conf
17 zabbix_trapper.conf
18 zabbix_proxy.conf
19 zabbix-dn_skipname.patch
20 "
21
22_builddir="$srcdir"/$pkgname-$pkgver
23
24prepare() {
25 cd "$_builddir"
26 for i in $source; do
27 case $i in
28 *.patch)
29 msg "Applying $i"
30 patch -p1 -i "$srcdir"/$i || return 1
31 ;;
32 esac
33 done
34}
35
36build() {
37 cd "$_builddir"
38 ./configure --prefix=/usr \
39 --sysconfdir=/etc \
40 --mandir=/usr/share/man \
41 --infodir=/usr/share/info \
42 --enable-server \
43 --with-sqlite3
44 make || return 1
45}
46
47package() {
48 local _wwwdir="$pkgdir"/usr/share/webapp/zabbix
49 cd "$_builddir"
50 make DESTDIR="$pkgdir" install
51
52 install -d -m0750 -o zabbix -g zabbix \
53 "$pkgdir"/var/run/zabbix "$pkgdir"/var/log/zabbix
54
55 install -d "$pkgdir"/etc/zabbix
56 install -d "$pkgdir"/usr/share/zabbix/dbms/create/data
57 install -d -m0755 "$_wwwdir"
58 install -D -m0640 "$srcdir"/zabbix_server.conf "$pkgdir"/etc/zabbix/zabbix_server.conf
59 install -D -m0640 "$srcdir"/zabbix_trapper.conf "$pkgdir"/etc/zabbix/zabbix_trapper.conf
60# install -D -m0755 "$srcdir"/zabbix-server.initd "$pkgdir"/etc/rc.d/zabbix-server
61 install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/data.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/data.sql
62 install -D -m0755 "$srcdir"/zabbix-$pkgver/create/data/images_mysql.sql "$pkgdir"/usr/share/zabbix/dbms/create/data/images_mysql.sql
63 install -D -m0755 "$srcdir"/zabbix-$pkgver/create/schema/mysql.sql "$pkgdir"/usr/share/zabbix/dbms/create/mysql.sql
64 cp -r "$srcdir"/zabbix-$pkgver/frontends/php/* "$_wwwdir"
65
66}
67
68md5sums="fa4be4fa7ac20a33cc0aa5c27b827746 zabbix-1.8.2.tar.gz
6926b0401a83bdb1dce29338e5b2786620 zabbix_server.conf
709832a81e134c8e2c11e2a06b7adbf88f zabbix_trapper.conf
710310b92afb3f35c1075fff53db737212 zabbix_proxy.conf
72d13166483792401be2d25b37b0170b82 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 0000000000..df75e914a1
--- /dev/null
+++ b/testing/zabbix/zabbix-dn_skipname.patch
@@ -0,0 +1,44 @@
1diff --git a/src/libs/zbxsysinfo/common/net.c b/src/libs/zbxsysinfo/common/net.c
2index c8956a6..645fd8c 100644
3--- a/src/libs/zbxsysinfo/common/net.c
4+++ b/src/libs/zbxsysinfo/common/net.c
5@@ -26,6 +26,39 @@
6
7 #include "net.h"
8
9+#if defined(__UCLIBC__) && defined(HAVE_RES_QUERY)
10+/*
11+ * Skip over a compressed domain name. Return the size or -1.
12+ */
13+int
14+__dn_skipname(const u_char *comp_dn, const u_char *eom)
15+{
16+ const u_char *cp;
17+ int n;
18+
19+ cp = comp_dn;
20+ while (cp < eom && (n = *cp++)) {
21+ /*
22+ * check for indirection
23+ */
24+ switch (n & INDIR_MASK) {
25+ case 0: /* normal case, n == len */
26+ cp += n;
27+ continue;
28+ case INDIR_MASK: /* indirection */
29+ cp++;
30+ break;
31+ default: /* illegal type */
32+ return (-1);
33+ }
34+ break;
35+ }
36+ if (cp > eom)
37+ return (-1);
38+ return (cp - comp_dn);
39+}
40+#endif
41+
42 /*
43 * 0 - NOT OK
44 * 1 - OK
diff --git a/testing/zabbix/zabbix_proxy.conf b/testing/zabbix/zabbix_proxy.conf
new file mode 100644
index 0000000000..899fac2465
--- /dev/null
+++ b/testing/zabbix/zabbix_proxy.conf
@@ -0,0 +1,175 @@
1# This is config file for ZABBIX server process
2# To get more information about ZABBIX,
3# go http://www.zabbix.com
4
5############ GENERAL PARAMETERS #################
6
7# IP address (or hostname) of ZABBIX servers.
8
9Server=127.0.0.1
10
11# Server port for sending active checks
12
13ServerPort=10051
14
15# Unique hostname.
16
17Hostname=proxy
18
19# Number of pre-forked instances of pollers
20# Default value is 5
21# This parameter must be between 0 and 255
22#StartPollers=5
23
24# Number of pre-forked instances of IPMI pollers
25# Default value is 0
26# This parameter must be between 0 and 255
27#StartIPMIPollers=0
28
29# Number of pre-forked instances of pollers for unreachable hosts
30# Default value is 1
31# This parameter must be between 0 and 255
32#StartPollersUnreachable=1
33
34# Number of pre-forked instances of trappers
35# Default value is 5
36# This parameter must be between 0 and 255
37#StartTrappers=5
38
39# Number of pre-forked instances of ICMP pingers
40# Default value is 1
41# This parameter must be between 0 and 255
42#StartPingers=1
43
44# Number of pre-forked instances of discoverers
45# Default value is 1
46# This parameter must be between 0 and 255
47#StartDiscoverers=1
48
49# Number of pre-forked instances of HTTP pollers
50# Default value is 1
51# This parameter must be between 0 and 255
52#StartHTTPPollers=1
53
54# Listen port for trapper. Default port number is 10051. This parameter
55# must be between 1024 and 32767
56#ListenPort=10051
57
58# Source IP address for outgouing connections
59#SourceIP=
60
61# Listen interface for trapper. Trapper will listen all network interfaces
62# if this parameter is missing.
63#ListenIP=127.0.0.1
64
65# How often ZABBIX will perform sending hearbeat message
66# (in seconds)
67# Default value is 60 seconds
68# Set to 0 to disable heartbeat messages
69# This parameter must be between 0 and 3600
70#HeartbeatFrequency=60
71
72# How often ZABBIX will perform sync configuration data
73# (in seconds)
74# Default value is 3600 seconds (1h)
75# This parameter must be between 1 and 604800 (1 week)
76#ConfigFrequency=3600
77
78# How often ZABBIX will perform housekeeping procedure
79# (in hours)
80# Default value is 1 hour
81# Housekeeping is removing unnecessary information from
82# tables history, alert, and alarms
83# This parameter must be between 1 and 24
84#HousekeepingFrequency=1
85
86# How often ZABBIX will try to send unsent alerts
87# (in seconds)
88# Default value is 30 seconds
89#SenderFrequency=30
90
91# Local bufer size in hours. Proxy will keep collected data N hours.
92# Default value is 0 hours
93#ProxyLocalBuffer=0
94
95# Offline buffer size in hours. It is used when server is not available.
96# Older data is removed.
97# Default value is 1 hours
98#ProxyOfflineBuffer=1
99
100# Specifies debug level
101# 0 - debug is not created
102# 1 - critical information
103# 2 - error information
104# 3 - warnings (default)
105# 4 - for debugging (produces lots of information)
106#DebugLevel=3
107
108# Specifies how long we wait for agent response (in sec)
109# Must be between 1 and 30
110Timeout=5
111
112# Specifies how many seconds trapper may spend processing new data
113# Must be between 1 and 30
114#TrapperTimeout=5
115
116# After how many seconds of unreachability treat a host as unavailable
117#UnreachablePeriod=45
118
119# How ofter check host for availability during the unreachability period
120#UnavailableDelay=15
121
122# How ofter check host for availability during the unavailability period
123#UnavailableDelay=60
124
125# Name of PID file
126PidFile=/var/run/zabbix/zabbix_proxy.pid
127
128# Name of log file
129# If not set, syslog is used
130LogFile=/var/log/zabbix/zabbix_proxy.log
131
132# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
133LogFileSize=1
134
135# Location for custom alert scripts
136AlertScriptsPath=/home/zabbix/bin/
137
138# Location of external scripts
139#ExternalScripts=/etc/zabbix/externalscripts
140
141# Location of 'fping. Default is /usr/sbin/fping
142# Make sure that fping binary has root permissions and SUID flag set
143#FpingLocation=/usr/sbin/fping
144
145# Location of fping6. Default is /usr/sbin/fping6
146# Make sure that fping binary has root permissions and SUID flag set
147#Fping6Location=/usr/sbin/fping6
148
149# Temporary directory. Default is /tmp
150#TmpDir=/tmp
151
152# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
153#PingerFrequency=60
154
155# Database host name
156# Default is localhost
157
158#DBHost=localhost
159
160# Database name
161# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
162DBName=proxy
163
164# Database user
165
166DBUser=root
167
168# Database password
169# Comment this line if no password used
170
171#DBPassword=<password>
172
173# Connect to MySQL using Unix socket?
174
175#DBSocket=/tmp/mysql.sock
diff --git a/testing/zabbix/zabbix_server.conf b/testing/zabbix/zabbix_server.conf
new file mode 100644
index 0000000000..39c12ef0d9
--- /dev/null
+++ b/testing/zabbix/zabbix_server.conf
@@ -0,0 +1,155 @@
1# This is config file for ZABBIX server process
2# To get more information about ZABBIX,
3# go http://www.zabbix.com
4
5############ GENERAL PARAMETERS #################
6
7# This defines unique NodeID in distributed setup,
8# Default value 0 (standalone server)
9# This parameter must be between 0 and 999
10#NodeID=0
11
12# Number of pre-forked instances of pollers
13# Default value is 5
14# This parameter must be between 0 and 255
15#StartPollers=5
16
17# Number of pre-forked instances of IPMI pollers
18# Default value is 0
19# This parameter must be between 0 and 255
20#StartIPMIPollers=0
21
22# Number of pre-forked instances of pollers for unreachable hosts
23# Default value is 1
24# This parameter must be between 0 and 255
25#StartPollersUnreachable=1
26
27# Number of pre-forked instances of trappers
28# Default value is 5
29# This parameter must be between 0 and 255
30#StartTrappers=5
31
32# Number of pre-forked instances of ICMP pingers
33# Default value is 1
34# This parameter must be between 0 and 255
35#StartPingers=1
36
37# Number of pre-forked instances of discoverers
38# Default value is 1
39# This parameter must be between 0 and 255
40#StartDiscoverers=1
41
42# Number of pre-forked instances of HTTP pollers
43# Default value is 1
44# This parameter must be between 0 and 255
45#StartHTTPPollers=1
46
47# Listen port for trapper. Default port number is 10051. This parameter
48# must be between 1024 and 32767
49
50#ListenPort=10051
51
52# Source IP address for outgouing connections
53#SourceIP=
54
55# Listen interface for trapper. Trapper will listen all network interfaces
56# if this parameter is missing.
57
58#ListenIP=127.0.0.1
59
60# How often ZABBIX will perform housekeeping procedure
61# (in hours)
62# Default value is 1 hour
63# Housekeeping is removing unnecessary information from
64# tables history, alert, and alarms
65# This parameter must be between 1 and 24
66
67#HousekeepingFrequency=1
68
69# How often ZABBIX will try to send unsent alerts
70# (in seconds)
71# Default value is 30 seconds
72SenderFrequency=30
73
74# Uncomment this line to disable housekeeping procedure
75#DisableHousekeeping=1
76
77# Specifies debug level
78# 0 - debug is not created
79# 1 - critical information
80# 2 - error information
81# 3 - warnings (default)
82# 4 - for debugging (produces lots of information)
83
84DebugLevel=3
85
86# Specifies how long we wait for agent response (in sec)
87# Must be between 1 and 30
88Timeout=5
89
90# Specifies how many seconds trapper may spend processing new data
91# Must be between 1 and 30
92#TrapperTimeout=5
93
94# After how many seconds of unreachability treat a host as unavailable
95#UnreachablePeriod=45
96
97# How ofter check host for availability during the unreachability period
98#UnavailableDelay=15
99
100# How ofter check host for availability during the unavailability period
101#UnavailableDelay=60
102
103# Name of PID file
104
105PidFile=/var/run/zabbix/zabbix_server.pid
106
107# Name of log file
108# If not set, syslog is used
109
110LogFile=/var/log/zabbix/zabbix_server.log
111
112# Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
113LogFileSize=2
114
115# Location for custom alert scripts
116AlertScriptsPath=/home/zabbix/bin/
117
118# Location of external scripts
119#ExternalScripts=/etc/zabbix/externalscripts
120
121# Location of fping. Default is /usr/sbin/fping
122# Make sure that fping binary has root permissions and SUID flag set
123#FpingLocation=/usr/sbin/fping
124
125# Location of fping6. Default is /usr/sbin/fping6
126# Make sure that fping binary has root permissions and SUID flag set
127#Fping6Location=/usr/sbin/fping6
128
129# Temporary directory. Default is /tmp
130#TmpDir=/tmp
131
132# Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls is 60 seconds.
133#PingerFrequency=60
134
135# Database host name
136# Default is localhost
137
138#DBHost=localhost
139
140# Database name
141# SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
142DBName=zabbix
143
144# Database user
145
146DBUser=root
147
148# Database password
149# Comment this line if no password used
150
151#DBPassword=<password>
152
153# Connect to MySQL using Unix socket?
154
155#DBSocket=/tmp/mysql.sock
diff --git a/testing/zabbix/zabbix_trapper.conf b/testing/zabbix/zabbix_trapper.conf
new file mode 100644
index 0000000000..7f235f66bc
--- /dev/null
+++ b/testing/zabbix/zabbix_trapper.conf
@@ -0,0 +1,44 @@
1# This is config file for zabbix_trapper
2# To get more information about ZABBIX,
3# go http://www.zabbix.com
4
5############ GENERAL PARAMETERS #################
6
7# Specifies debug level
8# 1 - critical information
9# 2 - warnings (default)
10# 3 - for debugging (produces lots of information)
11
12DebugLevel=2
13
14# Spend no more than Timeout seconds on processing
15# Must be between 1 and 30
16
17Timeout=3
18
19# Name of log file
20# If not set, syslog will be used
21
22LogFile=/var/log/zabbix/zabbix_trapper.log
23
24# Database host name
25# Default is localhost
26
27DBHost=localhost
28
29# Database name
30
31DBName=zabbix
32
33# Database user
34
35DBUser=zabbix
36
37# Database password
38# Comment this line if no password used
39
40DBPassword=zabbix
41
42# Connect to MySQL usig Unix socket?
43
44#DBSocket=/tmp/mysql.sock