Gentoo Archives: gentoo-commits

From: Patrick Lauer <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/zabbix/
Date: Thu, 09 Mar 2017 08:48:10
Message-Id: 1489049283.ee06ad828fc8b5c5f5591959543261cd7815fe01.patrick@gentoo
1 commit: ee06ad828fc8b5c5f5591959543261cd7815fe01
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Thu Mar 9 08:47:45 2017 +0000
4 Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org>
5 CommitDate: Thu Mar 9 08:48:03 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee06ad82
7
8 net-analyzer/zabbix: Bump
9
10 Package-Manager: Portage-2.3.4, Repoman-2.3.2
11
12 net-analyzer/zabbix/Manifest | 3 +
13 net-analyzer/zabbix/zabbix-2.2.17.ebuild | 341 +++++++++++++++++++++++++++++++
14 net-analyzer/zabbix/zabbix-3.0.7.ebuild | 331 ++++++++++++++++++++++++++++++
15 net-analyzer/zabbix/zabbix-3.2.4.ebuild | 328 +++++++++++++++++++++++++++++
16 4 files changed, 1003 insertions(+)
17
18 diff --git a/net-analyzer/zabbix/Manifest b/net-analyzer/zabbix/Manifest
19 index ee1ad30c64b..18f6a5fd13a 100644
20 --- a/net-analyzer/zabbix/Manifest
21 +++ b/net-analyzer/zabbix/Manifest
22 @@ -1,4 +1,7 @@
23 DIST zabbix-2.2.16.tar.gz 15498413 SHA256 3cfcd8c7c11a2e18298e93f33701210b963a7c0e61d8c14fccfd9a8beef08041 SHA512 5d92c17e86608359fff220416d5eed2d4ac10edfe56f4162f4b7660c472cf6f609ba01034d76e5b7164c22d55a1fc5be753f5d0e0ce7ac71d00a6f68dca14afd WHIRLPOOL 2b219d17624ef40a8844193a3d836326160249549775db31c7c68597d17d9fa3d71ddbc9aa30e73c2255606957d0d2f5f562fbf2b0c0654d794c8e61e96e7ead
24 +DIST zabbix-2.2.17.tar.gz 15494053 SHA256 cf42c5db31c27466a9ec33b6bf22289bbc43ee4e5711e6d323d71644b743e535 SHA512 1abd60d05443cdb7b7ecdeca4d0b97414b249fe8be8c3ceaca137722af93e77101151bde59faaac4a3b61b8256bab68b0d1416192d8f72480703575794068a1f WHIRLPOOL 0ab0df7723ac6403fb26d53369fbc1d207b08343bd24f27832b2a2c7a1f043e6fe95ae99d79210f5baa5e5bd9ed9dd89acb74ce66114dfe4702d7913a26a4bb9
25 DIST zabbix-3.0.6.tar.gz 15513412 SHA256 4fe972b061cae8cc91bf2870f2caabc967096f31def5a3f53e8789154b05a97b SHA512 ccffc58f3555bea62011bad272e8a3085d1723d8cb200e00a3e657696104c3fd055b8b963a26d9c726ef45a5381c7f9625498e99b756a3dd97b147d8b7884d1f WHIRLPOOL 137eb724b5205e5d38d00f96c62da5f96ef91c57b01280489bafb67c54d10e7c40304b4674fcefedda9381dfe6d2721b81dbcda1822f56f6d538e067c2588fea
26 +DIST zabbix-3.0.7.tar.gz 15514134 SHA256 67fa5afbc407af405ddf27754c5eb1fd52396efd4020920e80c7abeeba678f13 SHA512 19ba97347127c451ed91a6fbf0487c8eeb075f68075d7ed192fe7920c6a048947952d875007e4b7e0c0f5371d743e86050964013fde2bc1222499c462f866aa7 WHIRLPOOL 9d64b529b8f449f14502d990f644b03f7701d1ad9b9b67d62f2e5d204ca114350e58e818d83296709cca9ac5e6a51dd1e0a0d970acd23e8de27700852ac99bd3
27 DIST zabbix-3.2.2.tar.gz 15915015 SHA256 f9760dde57b1faee4bbecf00c39877678d58aaf4b6205e010d6b049d9cf4535e SHA512 1f6cb6344d24ed91c49fa116d6862cfd78caab9cd3297329369dd2df5cf9c83fda67bc9faa1a59f2b605bfeda73a69a3e29653fca320eda1b67f4d0931bfdb9b WHIRLPOOL a3e9c22459376b29b3f041f0e57b369976e2fa6eb752dd79e3f862a3095c216c91e08854dff350505c33c0a5e1b73b0c4b677d5a2bb1c0c872791023c741ac77
28 DIST zabbix-3.2.3.tar.gz 15922416 SHA256 e6dba74039d8d6efff86ec3da99909f4daeaeb66d48781bbb666e3094533da25 SHA512 5a704282765fa66d1aa53ae546d3a49a35050d6830a25a3a9ad64d73f8aff48b31e8d13f37d147c8d6244bb0f2dab21bceb5d022f1c3ffa726c10edc6e7bd1f6 WHIRLPOOL cab23a3edfa53f7b505f0d7e03fbcf0a2f59a52e441e195b5f7ff5555ee7bd0258ba7cb93e45f894e16ba4ad1a1b236cfef0cc65c7b7905ee0ebde2e11972710
29 +DIST zabbix-3.2.4.tar.gz 15924840 SHA256 22cf19ef5a9478df2281bf518e8be38adc7dbc508bf63111e02388ca7aabeef4 SHA512 62e532bcf6a5ab82b1f943e28d46d1e64782758a405680d2c1a54e9c1092a340a50987045acbbad2b57439e3c2640d8a11fe1a29a234764859befa6a7fd779d1 WHIRLPOOL 8cac552472bb186a1e16bc809d68a7dd7a63eaec7503f204bec58cd03ce9f813247d47e95b6a17baa3765dca9a51835c2dc4d6efbc69bcf03ff64cb976ac716f
30
31 diff --git a/net-analyzer/zabbix/zabbix-2.2.17.ebuild b/net-analyzer/zabbix/zabbix-2.2.17.ebuild
32 new file mode 100644
33 index 00000000000..6a201569afd
34 --- /dev/null
35 +++ b/net-analyzer/zabbix/zabbix-2.2.17.ebuild
36 @@ -0,0 +1,341 @@
37 +# Copyright 1999-2017 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI="6"
41 +
42 +# needed to make webapp-config dep optional
43 +WEBAPP_OPTIONAL="yes"
44 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
45 +
46 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
47 +HOMEPAGE="http://www.zabbix.com/"
48 +MY_P=${P/_/}
49 +MY_PV=${PV/_/}
50 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
51 +LICENSE="GPL-2"
52 +SLOT="0"
53 +WEBAPP_MANUAL_SLOT="yes"
54 +KEYWORDS="~amd64 ~x86"
55 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh snmp sqlite odbc static"
56 +REQUIRED_USE="|| ( agent frontend proxy server )
57 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
58 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
59 + static? ( !oracle !snmp )"
60 +
61 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
62 + ldap? (
63 + net-nds/openldap
64 + =dev-libs/cyrus-sasl-2*
65 + net-libs/gnutls
66 + )
67 + mysql? ( >=virtual/mysql-5.0.3 )
68 + sqlite? ( >=dev-db/sqlite-3.3.5 )
69 + postgres? ( dev-db/postgresql:* )
70 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
71 + xmpp? ( dev-libs/iksemel )
72 + libxml2? ( dev-libs/libxml2 )
73 + curl? ( net-misc/curl )
74 + openipmi? ( sys-libs/openipmi )
75 + ssh? ( net-libs/libssh2 )
76 + java? ( virtual/jdk:* )
77 + odbc? ( dev-db/unixODBC )"
78 +
79 +RDEPEND="${COMMON_DEPEND}
80 + proxy? ( net-analyzer/fping )
81 + server? ( net-analyzer/fping
82 + app-admin/webapp-config )
83 + java? (
84 + >=virtual/jre-1.4
85 + dev-java/slf4j-api
86 + )
87 + frontend? (
88 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
89 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
90 + mysql? ( dev-lang/php[mysqli] )
91 + odbc? ( dev-lang/php[odbc] )
92 + oracle? ( dev-lang/php[oci8-instant-client] )
93 + postgres? ( dev-lang/php[postgres] )
94 + sqlite? ( dev-lang/php[sqlite] )
95 + media-libs/gd[png]
96 + app-admin/webapp-config )"
97 +DEPEND="${COMMON_DEPEND}
98 + static? (
99 + ldap? (
100 + net-nds/openldap[static-libs]
101 + =dev-libs/cyrus-sasl-2*[static-libs]
102 + net-libs/gnutls[static-libs]
103 + )
104 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
105 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
106 + postgres? ( dev-db/postgresql:*[static-libs] )
107 + libxml2? ( dev-libs/libxml2[static-libs] )
108 + curl? ( net-misc/curl[static-libs] )
109 + ssh? ( net-libs/libssh2[static-libs] )
110 + odbc? ( dev-db/unixODBC[static-libs] )
111 + )
112 + virtual/pkgconfig"
113 +
114 +S=${WORKDIR}/${MY_P}
115 +
116 +ZABBIXJAVA_BASE="opt/zabbix_java"
117 +
118 +pkg_setup() {
119 + if use oracle; then
120 + if [ -z "${ORACLE_HOME}" ]; then
121 + eerror
122 + eerror "The environment variable ORACLE_HOME must be set"
123 + eerror "and point to the correct location."
124 + eerror "It looks like you don't have Oracle installed."
125 + eerror
126 + die "Environment variable ORACLE_HOME is not set"
127 + fi
128 + if has_version 'dev-db/oracle-instantclient-basic'; then
129 + ewarn
130 + ewarn "Please ensure you have a full install of the Oracle client."
131 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
132 + ewarn
133 + fi
134 + fi
135 +
136 + if use frontend; then
137 + webapp_pkg_setup
138 + fi
139 +
140 + enewgroup zabbix
141 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
142 +}
143 +
144 +java_prepare() {
145 + cd "${S}/src/zabbix_java/lib"
146 + rm -v *.jar || die
147 +
148 + java-pkg_jar-from slf4j-api
149 +}
150 +
151 +src_prepare() {
152 + default
153 +}
154 +
155 +src_configure() {
156 + econf \
157 + $(use_enable server) \
158 + $(use_enable proxy) \
159 + $(use_enable agent) \
160 + $(use_enable ipv6) \
161 + $(use_enable static) \
162 + $(use_enable java) \
163 + $(use_with ldap) \
164 + $(use_with snmp net-snmp) \
165 + $(use_with mysql) \
166 + $(use_with postgres postgresql) \
167 + $(use_with oracle) \
168 + $(use_with sqlite sqlite3) \
169 + $(use_with xmpp jabber) \
170 + $(use_with curl libcurl) \
171 + $(use_with openipmi openipmi) \
172 + $(use_with ssh ssh2) \
173 + $(use_with libxml2) \
174 + $(use_with odbc unixodbc) \
175 + || die "econf failed"
176 +}
177 +
178 +src_compile() {
179 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
180 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
181 + fi
182 +}
183 +
184 +src_install() {
185 + dodir \
186 + /etc/zabbix \
187 + /var/lib/zabbix \
188 + /var/lib/zabbix/home \
189 + /var/lib/zabbix/scripts \
190 + /var/lib/zabbix/alertscripts \
191 + /var/lib/zabbix/externalscripts \
192 + /var/log/zabbix
193 +
194 + keepdir \
195 + /etc/zabbix \
196 + /var/lib/zabbix \
197 + /var/lib/zabbix/home \
198 + /var/lib/zabbix/scripts \
199 + /var/lib/zabbix/alertscripts \
200 + /var/lib/zabbix/externalscripts \
201 + /var/log/zabbix
202 +
203 + if use server; then
204 + insinto /etc/zabbix
205 + doins "${FILESDIR}/2.2"/zabbix_server.conf
206 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-server
207 + dosbin src/zabbix_server/zabbix_server
208 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
209 + fperms 0640 /etc/zabbix/zabbix_server.conf
210 + dodir /usr/share/zabbix
211 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
212 + systemd_dounit "${FILESDIR}/zabbix-server.service"
213 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
214 + fi
215 +
216 + if use proxy; then
217 + doinitd \
218 + "${FILESDIR}/2.2"/init.d/zabbix-proxy
219 + dosbin \
220 + src/zabbix_proxy/zabbix_proxy
221 + insinto /etc/zabbix
222 + doins \
223 + "${FILESDIR}/2.2"/zabbix_proxy.conf
224 + dodir /usr/share/zabbix
225 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
226 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
227 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
228 + fi
229 +
230 + if use agent; then
231 + insinto /etc/zabbix
232 + doins \
233 + "${FILESDIR}/2.2"/zabbix_agent.conf \
234 + "${FILESDIR}/2.2"/zabbix_agentd.conf
235 + doinitd "${FILESDIR}/2.2"/init.d/zabbix-agentd
236 + dosbin \
237 + src/zabbix_agent/zabbix_agent \
238 + src/zabbix_agent/zabbix_agentd
239 + dobin \
240 + src/zabbix_sender/zabbix_sender \
241 + src/zabbix_get/zabbix_get
242 + fowners zabbix:zabbix \
243 + /etc/zabbix/zabbix_agent.conf \
244 + /etc/zabbix/zabbix_agentd.conf
245 + fperms 0640 \
246 + /etc/zabbix/zabbix_agent.conf \
247 + /etc/zabbix/zabbix_agentd.conf
248 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
249 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
250 + fi
251 +
252 + fowners zabbix:zabbix \
253 + /etc/zabbix \
254 + /var/lib/zabbix \
255 + /var/lib/zabbix/home \
256 + /var/lib/zabbix/scripts \
257 + /var/lib/zabbix/alertscripts \
258 + /var/lib/zabbix/externalscripts \
259 + /var/log/zabbix
260 + fperms 0750 \
261 + /etc/zabbix \
262 + /var/lib/zabbix \
263 + /var/lib/zabbix/home \
264 + /var/lib/zabbix/scripts \
265 + /var/lib/zabbix/alertscripts \
266 + /var/lib/zabbix/externalscripts \
267 + /var/log/zabbix
268 +
269 + dodoc README INSTALL NEWS ChangeLog \
270 + conf/zabbix_agent.conf \
271 + conf/zabbix_agentd.conf \
272 + conf/zabbix_proxy.conf \
273 + conf/zabbix_agentd/userparameter_examples.conf \
274 + conf/zabbix_agentd/userparameter_mysql.conf \
275 + conf/zabbix_server.conf
276 +
277 + if use frontend; then
278 + webapp_src_preinst
279 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
280 + webapp_configfile \
281 + "${MY_HTDOCSDIR}"/include/db.inc.php \
282 + "${MY_HTDOCSDIR}"/include/config.inc.php
283 + webapp_src_install
284 + fi
285 +
286 + if use java; then
287 + dodir \
288 + /${ZABBIXJAVA_BASE} \
289 + /${ZABBIXJAVA_BASE}/bin \
290 + /${ZABBIXJAVA_BASE}/lib
291 + keepdir /${ZABBIXJAVA_BASE}
292 + exeinto /${ZABBIXJAVA_BASE}/bin
293 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
294 + exeinto /${ZABBIXJAVA_BASE}/lib
295 + doexe \
296 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
297 + src/zabbix_java/lib/logback-console.xml \
298 + src/zabbix_java/lib/logback-core-0.9.27.jar \
299 + src/zabbix_java/lib/logback.xml \
300 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
301 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
302 + exeinto /${ZABBIXJAVA_BASE}/
303 + doexe \
304 + src/zabbix_java/settings.sh \
305 + src/zabbix_java/startup.sh \
306 + src/zabbix_java/shutdown.sh
307 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
308 + fi
309 +}
310 +
311 +pkg_postinst() {
312 + if use server || use proxy ; then
313 + elog
314 + elog "You may need to configure your database for Zabbix,"
315 + elog "if you have not already done so. "
316 + elog
317 +
318 + zabbix_homedir=$(egethome zabbix)
319 + if [ -n "${zabbix_homedir}" ] && \
320 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
321 + ewarn
322 + ewarn "The user 'zabbix' should have his homedir changed"
323 + ewarn "to /var/lib/zabbix/home if you want to use"
324 + ewarn "custom alert scripts."
325 + ewarn
326 + ewarn "A real homedir might be needed for configfiles"
327 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
328 + ewarn "using sendxmpp for Jabber alerts)."
329 + ewarn
330 + ewarn "To change the homedir use:"
331 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
332 + ewarn
333 + fi
334 + fi
335 +
336 + if use server; then
337 + elog
338 + elog "For distributed monitoring you have to run:"
339 + elog
340 + elog "zabbix_server -n <nodeid>"
341 + elog
342 + elog "This will convert database data for use with Node ID"
343 + elog "and also adds a local node."
344 + elog
345 + fi
346 +
347 + elog "--"
348 + elog
349 + elog "You may need to add these lines to /etc/services:"
350 + elog
351 + elog "zabbix-agent 10050/tcp Zabbix Agent"
352 + elog "zabbix-agent 10050/udp Zabbix Agent"
353 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
354 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
355 + elog
356 +
357 + if use server || use proxy ; then
358 + # check for fping
359 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
360 + case "${fping_perms}" in
361 + 4[157][157][157])
362 + ;;
363 + *)
364 + ewarn
365 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
366 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
367 + ewarn "by everyone. Run the following command to fix it:"
368 + ewarn
369 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
370 + ewarn
371 + ewarn "Please be aware that this might impose a security risk,"
372 + ewarn "depending on the code quality of fping."
373 + ewarn
374 + ;;
375 + esac
376 + fi
377 +}
378
379 diff --git a/net-analyzer/zabbix/zabbix-3.0.7.ebuild b/net-analyzer/zabbix/zabbix-3.0.7.ebuild
380 new file mode 100644
381 index 00000000000..13448bdf670
382 --- /dev/null
383 +++ b/net-analyzer/zabbix/zabbix-3.0.7.ebuild
384 @@ -0,0 +1,331 @@
385 +# Copyright 1999-2017 Gentoo Foundation
386 +# Distributed under the terms of the GNU General Public License v2
387 +
388 +EAPI="6"
389 +
390 +# needed to make webapp-config dep optional
391 +WEBAPP_OPTIONAL="yes"
392 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
393 +
394 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
395 +HOMEPAGE="http://www.zabbix.com/"
396 +MY_P=${P/_/}
397 +MY_PV=${PV/_/}
398 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
399 +LICENSE="GPL-2"
400 +SLOT="0"
401 +WEBAPP_MANUAL_SLOT="yes"
402 +KEYWORDS="~amd64 ~x86"
403 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
404 +REQUIRED_USE="|| ( agent frontend proxy server )
405 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
406 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
407 + static? ( !oracle !snmp )"
408 +
409 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
410 + ldap? (
411 + net-nds/openldap
412 + =dev-libs/cyrus-sasl-2*
413 + net-libs/gnutls
414 + )
415 + mysql? ( >=virtual/mysql-5.0.3 )
416 + sqlite? ( >=dev-db/sqlite-3.3.5 )
417 + postgres? ( dev-db/postgresql:* )
418 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
419 + xmpp? ( dev-libs/iksemel )
420 + libxml2? ( dev-libs/libxml2 )
421 + curl? ( net-misc/curl )
422 + openipmi? ( sys-libs/openipmi )
423 + ssh? ( net-libs/libssh2 )
424 + java? ( virtual/jdk:* )
425 + odbc? ( dev-db/unixODBC )
426 + ssl? ( dev-libs/openssl:=[-bindist] )"
427 +
428 +RDEPEND="${COMMON_DEPEND}
429 + proxy? ( net-analyzer/fping )
430 + server? ( net-analyzer/fping
431 + app-admin/webapp-config )
432 + java? (
433 + >=virtual/jre-1.4
434 + dev-java/slf4j-api
435 + )
436 + frontend? (
437 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
438 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
439 + mysql? ( dev-lang/php[mysqli] )
440 + odbc? ( dev-lang/php[odbc] )
441 + oracle? ( dev-lang/php[oci8-instant-client] )
442 + postgres? ( dev-lang/php[postgres] )
443 + sqlite? ( dev-lang/php[sqlite] )
444 + media-libs/gd[png]
445 + app-admin/webapp-config )"
446 +DEPEND="${COMMON_DEPEND}
447 + static? (
448 + ldap? (
449 + net-nds/openldap[static-libs]
450 + =dev-libs/cyrus-sasl-2*[static-libs]
451 + net-libs/gnutls[static-libs]
452 + )
453 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
454 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
455 + postgres? ( dev-db/postgresql:*[static-libs] )
456 + libxml2? ( dev-libs/libxml2[static-libs] )
457 + curl? ( net-misc/curl[static-libs] )
458 + ssh? ( net-libs/libssh2[static-libs] )
459 + odbc? ( dev-db/unixODBC[static-libs] )
460 + )
461 + virtual/pkgconfig"
462 +
463 +S=${WORKDIR}/${MY_P}
464 +
465 +ZABBIXJAVA_BASE="opt/zabbix_java"
466 +
467 +pkg_setup() {
468 + if use oracle; then
469 + if [ -z "${ORACLE_HOME}" ]; then
470 + eerror
471 + eerror "The environment variable ORACLE_HOME must be set"
472 + eerror "and point to the correct location."
473 + eerror "It looks like you don't have Oracle installed."
474 + eerror
475 + die "Environment variable ORACLE_HOME is not set"
476 + fi
477 + if has_version 'dev-db/oracle-instantclient-basic'; then
478 + ewarn
479 + ewarn "Please ensure you have a full install of the Oracle client."
480 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
481 + ewarn
482 + fi
483 + fi
484 +
485 + if use frontend; then
486 + webapp_pkg_setup
487 + fi
488 +
489 + enewgroup zabbix
490 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
491 +}
492 +
493 +java_prepare() {
494 + cd "${S}/src/zabbix_java/lib"
495 + rm -v *.jar || die
496 +
497 + java-pkg_jar-from slf4j-api
498 +}
499 +
500 +src_prepare() {
501 + default
502 +}
503 +
504 +src_configure() {
505 + econf \
506 + $(use_enable server) \
507 + $(use_enable proxy) \
508 + $(use_enable agent) \
509 + $(use_enable ipv6) \
510 + $(use_enable static) \
511 + $(use_enable java) \
512 + $(use_with ldap) \
513 + $(use_with snmp net-snmp) \
514 + $(use_with mysql) \
515 + $(use_with postgres postgresql) \
516 + $(use_with oracle) \
517 + $(use_with sqlite sqlite3) \
518 + $(use_with xmpp jabber) \
519 + $(use_with curl libcurl) \
520 + $(use_with openipmi openipmi) \
521 + $(use_with ssh ssh2) \
522 + $(use_with libxml2) \
523 + $(use_with odbc unixodbc) \
524 + $(use_with ssl openssl) \
525 + || die "econf failed"
526 +}
527 +
528 +src_compile() {
529 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
530 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
531 + fi
532 +}
533 +
534 +src_install() {
535 + dodir \
536 + /etc/zabbix \
537 + /var/lib/zabbix \
538 + /var/lib/zabbix/home \
539 + /var/lib/zabbix/scripts \
540 + /var/lib/zabbix/alertscripts \
541 + /var/lib/zabbix/externalscripts \
542 + /var/log/zabbix
543 +
544 + keepdir \
545 + /etc/zabbix \
546 + /var/lib/zabbix \
547 + /var/lib/zabbix/home \
548 + /var/lib/zabbix/scripts \
549 + /var/lib/zabbix/alertscripts \
550 + /var/lib/zabbix/externalscripts \
551 + /var/log/zabbix
552 +
553 + if use server; then
554 + insinto /etc/zabbix
555 + doins "${FILESDIR}/3.0"/zabbix_server.conf
556 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
557 + dosbin src/zabbix_server/zabbix_server
558 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
559 + fperms 0640 /etc/zabbix/zabbix_server.conf
560 + dodir /usr/share/zabbix
561 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
562 + systemd_dounit "${FILESDIR}/zabbix-server.service"
563 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
564 + fi
565 +
566 + if use proxy; then
567 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
568 + dosbin src/zabbix_proxy/zabbix_proxy
569 + insinto /etc/zabbix
570 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
571 + dodir /usr/share/zabbix
572 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
573 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
574 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
575 + fi
576 +
577 + if use agent; then
578 + insinto /etc/zabbix
579 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
580 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
581 + dosbin src/zabbix_agent/zabbix_agentd
582 + dobin \
583 + src/zabbix_sender/zabbix_sender \
584 + src/zabbix_get/zabbix_get
585 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
586 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
587 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
588 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
589 + fi
590 +
591 + fowners zabbix:zabbix \
592 + /etc/zabbix \
593 + /var/lib/zabbix \
594 + /var/lib/zabbix/home \
595 + /var/lib/zabbix/scripts \
596 + /var/lib/zabbix/alertscripts \
597 + /var/lib/zabbix/externalscripts \
598 + /var/log/zabbix
599 + fperms 0750 \
600 + /etc/zabbix \
601 + /var/lib/zabbix \
602 + /var/lib/zabbix/home \
603 + /var/lib/zabbix/scripts \
604 + /var/lib/zabbix/alertscripts \
605 + /var/lib/zabbix/externalscripts \
606 + /var/log/zabbix
607 +
608 + dodoc README INSTALL NEWS ChangeLog \
609 + conf/zabbix_agentd.conf \
610 + conf/zabbix_proxy.conf \
611 + conf/zabbix_agentd/userparameter_examples.conf \
612 + conf/zabbix_agentd/userparameter_mysql.conf \
613 + conf/zabbix_server.conf
614 +
615 + if use frontend; then
616 + webapp_src_preinst
617 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
618 + webapp_configfile \
619 + "${MY_HTDOCSDIR}"/include/db.inc.php \
620 + "${MY_HTDOCSDIR}"/include/config.inc.php
621 + webapp_src_install
622 + fi
623 +
624 + if use java; then
625 + dodir \
626 + /${ZABBIXJAVA_BASE} \
627 + /${ZABBIXJAVA_BASE}/bin \
628 + /${ZABBIXJAVA_BASE}/lib
629 + keepdir /${ZABBIXJAVA_BASE}
630 + exeinto /${ZABBIXJAVA_BASE}/bin
631 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
632 + exeinto /${ZABBIXJAVA_BASE}/lib
633 + doexe \
634 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
635 + src/zabbix_java/lib/logback-console.xml \
636 + src/zabbix_java/lib/logback-core-0.9.27.jar \
637 + src/zabbix_java/lib/logback.xml \
638 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
639 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
640 + exeinto /${ZABBIXJAVA_BASE}/
641 + doexe \
642 + src/zabbix_java/settings.sh \
643 + src/zabbix_java/startup.sh \
644 + src/zabbix_java/shutdown.sh
645 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
646 + fi
647 +}
648 +
649 +pkg_postinst() {
650 + if use server || use proxy ; then
651 + elog
652 + elog "You may need to configure your database for Zabbix,"
653 + elog "if you have not already done so. "
654 + elog
655 +
656 + zabbix_homedir=$(egethome zabbix)
657 + if [ -n "${zabbix_homedir}" ] && \
658 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
659 + ewarn
660 + ewarn "The user 'zabbix' should have his homedir changed"
661 + ewarn "to /var/lib/zabbix/home if you want to use"
662 + ewarn "custom alert scripts."
663 + ewarn
664 + ewarn "A real homedir might be needed for configfiles"
665 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
666 + ewarn "using sendxmpp for Jabber alerts)."
667 + ewarn
668 + ewarn "To change the homedir use:"
669 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
670 + ewarn
671 + fi
672 + fi
673 +
674 + if use server; then
675 + elog
676 + elog "For distributed monitoring you have to run:"
677 + elog
678 + elog "zabbix_server -n <nodeid>"
679 + elog
680 + elog "This will convert database data for use with Node ID"
681 + elog "and also adds a local node."
682 + elog
683 + fi
684 +
685 + elog "--"
686 + elog
687 + elog "You may need to add these lines to /etc/services:"
688 + elog
689 + elog "zabbix-agent 10050/tcp Zabbix Agent"
690 + elog "zabbix-agent 10050/udp Zabbix Agent"
691 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
692 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
693 + elog
694 +
695 + if use server || use proxy ; then
696 + # check for fping
697 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
698 + case "${fping_perms}" in
699 + 4[157][157][157])
700 + ;;
701 + *)
702 + ewarn
703 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
704 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
705 + ewarn "by everyone. Run the following command to fix it:"
706 + ewarn
707 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
708 + ewarn
709 + ewarn "Please be aware that this might impose a security risk,"
710 + ewarn "depending on the code quality of fping."
711 + ewarn
712 + ;;
713 + esac
714 + fi
715 +}
716
717 diff --git a/net-analyzer/zabbix/zabbix-3.2.4.ebuild b/net-analyzer/zabbix/zabbix-3.2.4.ebuild
718 new file mode 100644
719 index 00000000000..31176f59177
720 --- /dev/null
721 +++ b/net-analyzer/zabbix/zabbix-3.2.4.ebuild
722 @@ -0,0 +1,328 @@
723 +# Copyright 1999-2017 Gentoo Foundation
724 +# Distributed under the terms of the GNU General Public License v2
725 +
726 +EAPI="6"
727 +
728 +# needed to make webapp-config dep optional
729 +WEBAPP_OPTIONAL="yes"
730 +inherit flag-o-matic webapp java-pkg-opt-2 user systemd toolchain-funcs
731 +
732 +DESCRIPTION="ZABBIX is software for monitoring of your applications, network and servers"
733 +HOMEPAGE="http://www.zabbix.com/"
734 +MY_P=${P/_/}
735 +MY_PV=${PV/_/}
736 +SRC_URI="http://prdownloads.sourceforge.net/zabbix/${MY_P}.tar.gz"
737 +LICENSE="GPL-2"
738 +SLOT="0"
739 +WEBAPP_MANUAL_SLOT="yes"
740 +KEYWORDS="~amd64 ~x86"
741 +IUSE="+agent java curl frontend ipv6 xmpp ldap libxml2 mysql openipmi oracle postgres proxy server ssh ssl snmp sqlite odbc static"
742 +REQUIRED_USE="|| ( agent frontend proxy server )
743 + proxy? ( ^^ ( mysql oracle postgres sqlite odbc ) )
744 + server? ( ^^ ( mysql oracle postgres sqlite odbc ) )
745 + static? ( !oracle !snmp )"
746 +
747 +COMMON_DEPEND="snmp? ( net-analyzer/net-snmp )
748 + ldap? (
749 + net-nds/openldap
750 + =dev-libs/cyrus-sasl-2*
751 + net-libs/gnutls
752 + )
753 + mysql? ( >=virtual/mysql-5.0.3 )
754 + sqlite? ( >=dev-db/sqlite-3.3.5 )
755 + postgres? ( dev-db/postgresql:* )
756 + oracle? ( >=dev-db/oracle-instantclient-basic-10.0.0.0 )
757 + xmpp? ( dev-libs/iksemel )
758 + libxml2? ( dev-libs/libxml2 )
759 + curl? ( net-misc/curl )
760 + openipmi? ( sys-libs/openipmi )
761 + ssh? ( net-libs/libssh2 )
762 + java? ( virtual/jdk:* )
763 + odbc? ( dev-db/unixODBC )
764 + ssl? ( dev-libs/openssl:=[-bindist] )"
765 +
766 +RDEPEND="${COMMON_DEPEND}
767 + proxy? ( net-analyzer/fping[suid] )
768 + server? ( net-analyzer/fping[suid]
769 + app-admin/webapp-config )
770 + java? (
771 + >=virtual/jre-1.4
772 + dev-java/slf4j-api
773 + )
774 + frontend? (
775 + >=dev-lang/php-5.3.0[bcmath,ctype,sockets,gd,truetype,xml,session,xmlreader,xmlwriter,nls,sysvipc,unicode]
776 + || ( dev-lang/php[apache2] dev-lang/php[cgi] dev-lang/php[fpm] )
777 + mysql? ( dev-lang/php[mysqli] )
778 + odbc? ( dev-lang/php[odbc] )
779 + oracle? ( dev-lang/php[oci8-instant-client] )
780 + postgres? ( dev-lang/php[postgres] )
781 + sqlite? ( dev-lang/php[sqlite] )
782 + media-libs/gd[png]
783 + app-admin/webapp-config )"
784 +DEPEND="${COMMON_DEPEND}
785 + static? (
786 + ldap? (
787 + net-nds/openldap[static-libs]
788 + =dev-libs/cyrus-sasl-2*[static-libs]
789 + net-libs/gnutls[static-libs]
790 + )
791 + mysql? ( >=virtual/mysql-5.0.3[static-libs] )
792 + sqlite? ( >=dev-db/sqlite-3.3.5[static-libs] )
793 + postgres? ( dev-db/postgresql:*[static-libs] )
794 + libxml2? ( dev-libs/libxml2[static-libs] )
795 + curl? ( net-misc/curl[static-libs] )
796 + ssh? ( net-libs/libssh2[static-libs] )
797 + odbc? ( dev-db/unixODBC[static-libs] )
798 + )
799 + virtual/pkgconfig"
800 +
801 +S=${WORKDIR}/${MY_P}
802 +
803 +ZABBIXJAVA_BASE="opt/zabbix_java"
804 +
805 +pkg_setup() {
806 + if use oracle; then
807 + if [ -z "${ORACLE_HOME}" ]; then
808 + eerror
809 + eerror "The environment variable ORACLE_HOME must be set"
810 + eerror "and point to the correct location."
811 + eerror "It looks like you don't have Oracle installed."
812 + eerror
813 + die "Environment variable ORACLE_HOME is not set"
814 + fi
815 + if has_version 'dev-db/oracle-instantclient-basic'; then
816 + ewarn
817 + ewarn "Please ensure you have a full install of the Oracle client."
818 + ewarn "dev-db/oracle-instantclient* is NOT sufficient."
819 + ewarn
820 + fi
821 + fi
822 +
823 + if use frontend; then
824 + webapp_pkg_setup
825 + fi
826 +
827 + enewgroup zabbix
828 + enewuser zabbix -1 -1 /var/lib/zabbix/home zabbix
829 +}
830 +
831 +java_prepare() {
832 + cd "${S}/src/zabbix_java/lib"
833 + rm -v *.jar || die
834 +
835 + java-pkg_jar-from slf4j-api
836 +}
837 +
838 +src_prepare() {
839 + default
840 +}
841 +
842 +src_configure() {
843 + econf \
844 + $(use_enable server) \
845 + $(use_enable proxy) \
846 + $(use_enable agent) \
847 + $(use_enable ipv6) \
848 + $(use_enable static) \
849 + $(use_enable java) \
850 + $(use_with ldap) \
851 + $(use_with snmp net-snmp) \
852 + $(use_with mysql) \
853 + $(use_with postgres postgresql) \
854 + $(use_with oracle) \
855 + $(use_with sqlite sqlite3) \
856 + $(use_with xmpp jabber) \
857 + $(use_with curl libcurl) \
858 + $(use_with openipmi openipmi) \
859 + $(use_with ssh ssh2) \
860 + $(use_with libxml2) \
861 + $(use_with odbc unixodbc) \
862 + $(use_with ssl openssl) \
863 + || die "econf failed"
864 +}
865 +
866 +src_compile() {
867 + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then
868 + emake AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" || die "emake failed"
869 + fi
870 +}
871 +
872 +src_install() {
873 + dodir \
874 + /etc/zabbix \
875 + /var/lib/zabbix \
876 + /var/lib/zabbix/home \
877 + /var/lib/zabbix/scripts \
878 + /var/lib/zabbix/alertscripts \
879 + /var/lib/zabbix/externalscripts \
880 + /var/log/zabbix
881 +
882 + keepdir \
883 + /etc/zabbix \
884 + /var/lib/zabbix \
885 + /var/lib/zabbix/home \
886 + /var/lib/zabbix/scripts \
887 + /var/lib/zabbix/alertscripts \
888 + /var/lib/zabbix/externalscripts \
889 + /var/log/zabbix
890 +
891 + if use server; then
892 + insinto /etc/zabbix
893 + doins "${FILESDIR}/3.0"/zabbix_server.conf
894 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-server
895 + dosbin src/zabbix_server/zabbix_server
896 + fowners zabbix:zabbix /etc/zabbix/zabbix_server.conf
897 + fperms 0640 /etc/zabbix/zabbix_server.conf
898 + dodir /usr/share/zabbix
899 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
900 + systemd_dounit "${FILESDIR}/zabbix-server.service"
901 + systemd_newtmpfilesd "${FILESDIR}/zabbix-server.tmpfiles" zabbix-server.conf
902 + fi
903 +
904 + if use proxy; then
905 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-proxy
906 + dosbin src/zabbix_proxy/zabbix_proxy
907 + insinto /etc/zabbix
908 + doins "${FILESDIR}/3.0"/zabbix_proxy.conf
909 + dodir /usr/share/zabbix
910 + /bin/cp -R "${S}/database/" "${D}"/usr/share/zabbix/
911 + systemd_dounit "${FILESDIR}/zabbix-proxy.service"
912 + systemd_newtmpfilesd "${FILESDIR}/zabbix-proxy.tmpfiles" zabbix-proxy.conf
913 + fi
914 +
915 + if use agent; then
916 + insinto /etc/zabbix
917 + doins "${FILESDIR}/3.0"/zabbix_agentd.conf
918 + doinitd "${FILESDIR}/3.0"/init.d/zabbix-agentd
919 + dosbin src/zabbix_agent/zabbix_agentd
920 + dobin \
921 + src/zabbix_sender/zabbix_sender \
922 + src/zabbix_get/zabbix_get
923 + fowners zabbix:zabbix /etc/zabbix/zabbix_agentd.conf
924 + fperms 0640 /etc/zabbix/zabbix_agentd.conf
925 + systemd_dounit "${FILESDIR}/zabbix-agentd.service"
926 + systemd_newtmpfilesd "${FILESDIR}/zabbix-agentd.tmpfiles" zabbix-agentd.conf
927 + fi
928 +
929 + fowners zabbix:zabbix \
930 + /etc/zabbix \
931 + /var/lib/zabbix \
932 + /var/lib/zabbix/home \
933 + /var/lib/zabbix/scripts \
934 + /var/lib/zabbix/alertscripts \
935 + /var/lib/zabbix/externalscripts \
936 + /var/log/zabbix
937 + fperms 0750 \
938 + /etc/zabbix \
939 + /var/lib/zabbix \
940 + /var/lib/zabbix/home \
941 + /var/lib/zabbix/scripts \
942 + /var/lib/zabbix/alertscripts \
943 + /var/lib/zabbix/externalscripts \
944 + /var/log/zabbix
945 +
946 + dodoc README INSTALL NEWS ChangeLog \
947 + conf/zabbix_agentd.conf \
948 + conf/zabbix_proxy.conf \
949 + conf/zabbix_agentd/userparameter_examples.conf \
950 + conf/zabbix_agentd/userparameter_mysql.conf \
951 + conf/zabbix_server.conf
952 +
953 + if use frontend; then
954 + webapp_src_preinst
955 + cp -R frontends/php/* "${D}/${MY_HTDOCSDIR}"
956 + webapp_configfile \
957 + "${MY_HTDOCSDIR}"/include/db.inc.php \
958 + "${MY_HTDOCSDIR}"/include/config.inc.php
959 + webapp_src_install
960 + fi
961 +
962 + if use java; then
963 + dodir \
964 + /${ZABBIXJAVA_BASE} \
965 + /${ZABBIXJAVA_BASE}/bin \
966 + /${ZABBIXJAVA_BASE}/lib
967 + keepdir /${ZABBIXJAVA_BASE}
968 + exeinto /${ZABBIXJAVA_BASE}/bin
969 + doexe src/zabbix_java/bin/zabbix-java-gateway-${MY_PV}.jar
970 + exeinto /${ZABBIXJAVA_BASE}/lib
971 + doexe \
972 + src/zabbix_java/lib/logback-classic-0.9.27.jar \
973 + src/zabbix_java/lib/logback-console.xml \
974 + src/zabbix_java/lib/logback-core-0.9.27.jar \
975 + src/zabbix_java/lib/logback.xml \
976 + src/zabbix_java/lib/android-json-4.3_r3.1.jar \
977 + src/zabbix_java/lib/slf4j-api-1.6.1.jar
978 + fowners -R zabbix:zabbix /${ZABBIXJAVA_BASE}
979 + doinitd "${FILESDIR}"/3.0/init.d/zabbix-jmx-proxy
980 + doconfd "${FILESDIR}"/3.0/conf.d/zabbix-jmx-proxy
981 + fi
982 +}
983 +
984 +pkg_postinst() {
985 + if use server || use proxy ; then
986 + elog
987 + elog "You may need to configure your database for Zabbix,"
988 + elog "if you have not already done so. "
989 + elog
990 +
991 + zabbix_homedir=$(egethome zabbix)
992 + if [ -n "${zabbix_homedir}" ] && \
993 + [ "${zabbix_homedir}" != "/var/lib/zabbix/home" ]; then
994 + ewarn
995 + ewarn "The user 'zabbix' should have his homedir changed"
996 + ewarn "to /var/lib/zabbix/home if you want to use"
997 + ewarn "custom alert scripts."
998 + ewarn
999 + ewarn "A real homedir might be needed for configfiles"
1000 + ewarn "for custom alert scripts (e.g. ~/.sendxmpprc when"
1001 + ewarn "using sendxmpp for Jabber alerts)."
1002 + ewarn
1003 + ewarn "To change the homedir use:"
1004 + ewarn " usermod -d /var/lib/zabbix/home zabbix"
1005 + ewarn
1006 + fi
1007 + fi
1008 +
1009 + if use server; then
1010 + elog
1011 + elog "For distributed monitoring you have to run:"
1012 + elog
1013 + elog "zabbix_server -n <nodeid>"
1014 + elog
1015 + elog "This will convert database data for use with Node ID"
1016 + elog "and also adds a local node."
1017 + elog
1018 + fi
1019 +
1020 + elog "--"
1021 + elog
1022 + elog "You may need to add these lines to /etc/services:"
1023 + elog
1024 + elog "zabbix-agent 10050/tcp Zabbix Agent"
1025 + elog "zabbix-agent 10050/udp Zabbix Agent"
1026 + elog "zabbix-trapper 10051/tcp Zabbix Trapper"
1027 + elog "zabbix-trapper 10051/udp Zabbix Trapper"
1028 + elog
1029 +
1030 + if use server || use proxy ; then
1031 + # check for fping
1032 + fping_perms=$(stat -c %a /usr/sbin/fping 2>/dev/null)
1033 + case "${fping_perms}" in
1034 + 4[157][157][157])
1035 + ;;
1036 + *)
1037 + ewarn
1038 + ewarn "If you want to use the checks 'icmpping' and 'icmppingsec',"
1039 + ewarn "you have to make /usr/sbin/fping setuid root and executable"
1040 + ewarn "by everyone. Run the following command to fix it:"
1041 + ewarn
1042 + ewarn " chmod u=rwsx,g=rx,o=rx /usr/sbin/fping"
1043 + ewarn
1044 + ewarn "Please be aware that this might impose a security risk,"
1045 + ewarn "depending on the code quality of fping."
1046 + ewarn
1047 + ;;
1048 + esac
1049 + fi
1050 +}