New ports: net-mgmt/zabbix52-[agent|frontend|java|proxy|server]
net-mgmt/zabbix5 -> net-mgmt/zabbix52 What's new in Zabbix 5.2: https://www.zabbix.com/documentation/current/manual/introduction/whatsnew520 Changelog: https://www.zabbix.com/rn/rn5.2.0 PR: 250775 Approved by: pg@pakhom.spb.ru (maintainer)
This commit is contained in:
parent
6632bb2838
commit
dbfcfa6d13
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553988
17 changed files with 1936 additions and 0 deletions
|
@ -403,5 +403,10 @@
|
|||
SUBDIR += zabbix5-java
|
||||
SUBDIR += zabbix5-proxy
|
||||
SUBDIR += zabbix5-server
|
||||
SUBDIR += zabbix52-agent
|
||||
SUBDIR += zabbix52-frontend
|
||||
SUBDIR += zabbix52-java
|
||||
SUBDIR += zabbix52-proxy
|
||||
SUBDIR += zabbix52-server
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
|
14
net-mgmt/zabbix52-agent/Makefile
Normal file
14
net-mgmt/zabbix52-agent/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix52
|
||||
CATEGORIES= net-mgmt
|
||||
PKGNAMESUFFIX= -agent
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../zabbix52-server
|
||||
PLIST= ${PKGDIR}/pkg-plist.agent
|
||||
|
||||
OPTIONS_DEFINE= CURL IPV6
|
||||
OPTIONS_DEFAULT= CURL OPENSSL
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
34
net-mgmt/zabbix52-frontend/Makefile
Normal file
34
net-mgmt/zabbix52-frontend/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix52
|
||||
CATEGORIES= net-mgmt
|
||||
PKGNAMESUFFIX= -frontend
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../zabbix52-server
|
||||
|
||||
NO_BUILD= yes
|
||||
NO_ARCH= yes
|
||||
PATCHDIR=
|
||||
PLIST= ${PKGDIR}/pkg-plist.frontend
|
||||
|
||||
USE_PHP= bcmath ctype dom fileinfo filter gd gettext hash json ldap mbstring \
|
||||
openssl pcre session simplexml snmp sockets xml xmlreader xmlwriter
|
||||
USES+= php:web
|
||||
|
||||
OPTIONS_DEFINE= MYSQLI PGSQL ORACLE
|
||||
OPTIONS_DEFAULT= MYSQLI
|
||||
MYSQLI_DESC= MySQLI backend
|
||||
|
||||
MYSQLI_USE= PHP=mysqli
|
||||
|
||||
PGSQL_USE= PHP=pgsql
|
||||
|
||||
ORACLE_CONFIGURE_WITH= oracle
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${WWWDIR}
|
||||
(cd ${WRKSRC}/ui && \
|
||||
${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR})
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
14
net-mgmt/zabbix52-java/Makefile
Normal file
14
net-mgmt/zabbix52-java/Makefile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix52
|
||||
CATEGORIES= net-mgmt
|
||||
PKGNAMESUFFIX= -java
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../zabbix52-server
|
||||
PLIST= ${PKGDIR}/pkg-plist.java
|
||||
|
||||
OPTIONS_DEFINE= IPV6
|
||||
|
||||
USE_JAVA= yes
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
12
net-mgmt/zabbix52-proxy/Makefile
Normal file
12
net-mgmt/zabbix52-proxy/Makefile
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix52
|
||||
CATEGORIES= net-mgmt
|
||||
PKGNAMESUFFIX= -proxy
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../zabbix52-server
|
||||
|
||||
OPTIONS_SINGLE_DB= MYSQL PGSQL SQLITE ORACLE
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
219
net-mgmt/zabbix52-server/Makefile
Normal file
219
net-mgmt/zabbix52-server/Makefile
Normal file
|
@ -0,0 +1,219 @@
|
|||
# Created by: Pakhom Golynga <pg@pakhom.spb.ru>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= zabbix52
|
||||
PORTVERSION= 5.2.0
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= https://cdn.zabbix.com/zabbix/sources/stable/${PORTVERSION:R}/
|
||||
PKGNAMESUFFIX?= -server
|
||||
DISTNAME= zabbix-${PORTVERSION}
|
||||
|
||||
MAINTAINER= pg@pakhom.spb.ru
|
||||
COMMENT= Enterprise-class open source distributed monitoring (${PKGNAMESUFFIX:S/^-//})
|
||||
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
LIB_DEPENDS= libpcre.so:devel/pcre
|
||||
|
||||
CONFLICTS_INSTALL= zabbix[0-46-9][0-9]${PKGNAMESUFFIX} \
|
||||
zabbix5[0-13-9]${PKGNAMESUFFIX} \
|
||||
zabbix[0-9]${PKGNAMESUFFIX}
|
||||
|
||||
ZABBIX_BUILD= ${PKGNAMESUFFIX:S/^-//}
|
||||
|
||||
.if ${ZABBIX_BUILD} != "frontend" # frontend only needs the version/distribution settings
|
||||
.if ${ZABBIX_BUILD} != "agent"
|
||||
CONFIGURE_ARGS+= --with-libevent=${LOCALBASE} --cache-file=${WRKSRC}/config.cache
|
||||
LIB_DEPENDS+= libevent.so:devel/libevent
|
||||
USE_RC_SUBR= zabbix_${ZABBIX_BUILD}
|
||||
.else
|
||||
USE_RC_SUBR= zabbix_${ZABBIX_BUILD}d
|
||||
.endif
|
||||
|
||||
USES= pkgconfig iconv
|
||||
|
||||
USERS= zabbix
|
||||
GROUPS= zabbix
|
||||
|
||||
.if ${ZABBIX_BUILD} != "proxy"
|
||||
PLIST_SUB= PROXY="@comment "
|
||||
.else
|
||||
PLIST_SUB= PROXY=""
|
||||
PLIST_FILES+= bin/zabbix_proxy_js
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "server"
|
||||
PLIST_SUB+= SERVER=""
|
||||
PLIST_FILES+= bin/zabbix_js
|
||||
.else
|
||||
PLIST_SUB+= SERVER="@comment "
|
||||
.endif
|
||||
|
||||
PLIST_SUB+= ZABBIX_BUILD=${ZABBIX_BUILD} PORTVERSION=${PORTVERSION}
|
||||
SUB_LIST= ZABBIX_BUILD=${ZABBIX_BUILD}
|
||||
|
||||
MAKE_ARGS+= ARCH=freebsd
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS+= --enable-${ZABBIX_BUILD} \
|
||||
--sysconfdir=${ETCDIR} \
|
||||
--datadir=${ETCDIR} \
|
||||
--with-iconv=${ICONV_PREFIX}
|
||||
|
||||
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
|
||||
LIB_DEPENDS+= libnetsnmp.so:net-mgmt/net-snmp
|
||||
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
CONFIGURE_ARGS+= --with-net-snmp
|
||||
|
||||
OPTIONS_DEFINE= IPV6 FPING CURL LDAP IPMI SSH NMAP LIBXML2 UNIXODBC
|
||||
|
||||
OPTIONS_DEFAULT= FPING CURL UNIXODBC MYSQL OPENSSL
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
FPING_DESC= Build/install fping for ping checks
|
||||
IPMI_DESC= Support for IPMI checks
|
||||
LDAP_DESC= Support for LDAP server checks
|
||||
NMAP_DESC= Build/install nmap for o/s detection
|
||||
SSH_DESC= Support for SSH-based checks
|
||||
UNIXODBC_DESC= Support for database checks via ODBC
|
||||
LIBXML2_DESC= Support for libxml2 (required by monitoring VMware)
|
||||
|
||||
OPTIONS_SINGLE= DB SSL
|
||||
OPTIONS_SINGLE_DB?= MYSQL PGSQL ORACLE
|
||||
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
|
||||
|
||||
MYSQL_CONFIGURE_WITH= mysql
|
||||
MYSQL_USES+= compiler:c11 mysql
|
||||
|
||||
PGSQL_CONFIGURE_WITH= postgresql
|
||||
PGSQL_USES+= pgsql
|
||||
|
||||
SQLITE_CONFIGURE_WITH= sqlite3
|
||||
SQLITE_USES+= sqlite:3
|
||||
|
||||
ORACLE_CONFIGURE_WITH= oracle
|
||||
|
||||
LDAP_CONFIGURE_WITH= ldap
|
||||
LDAP_USE= OPENLDAP=yes
|
||||
|
||||
IPMI_CONFIGURE_WITH= openipmi
|
||||
IPMI_LIB_DEPENDS= libOpenIPMI.so:sysutils/openipmi
|
||||
|
||||
FPING_RUN_DEPENDS= fping:net/fping
|
||||
|
||||
SSH_CONFIGURE_WITH= ssh2
|
||||
SSH_LIB_DEPENDS= libssh2.so:security/libssh2
|
||||
|
||||
UNIXODBC_CONFIGURE_WITH=unixodbc
|
||||
UNIXODBC_LIB_DEPENDS= libodbc.so:databases/unixODBC
|
||||
.elif ${ZABBIX_BUILD} == "agent"
|
||||
OPTIONS_SINGLE= SSL
|
||||
OPTIONS_SINGLE_SSL= OPENSSL GNUTLS
|
||||
.endif # if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
|
||||
|
||||
CURL_DESC= Support for web monitoring
|
||||
CURL_CONFIGURE_WITH= libcurl
|
||||
CURL_LIB_DEPENDS= libcurl.so:ftp/curl
|
||||
|
||||
IPV6_CONFIGURE_ENABLE= ipv6
|
||||
|
||||
NMAP_RUN_DEPENDS= nmap:security/nmap \
|
||||
sudo:security/sudo
|
||||
|
||||
LIBXML2_CONFIGURE_WITH= libxml2=${LOCALBASE}
|
||||
LIBXML2_LIB_DEPENDS= libxml2.so:textproc/libxml2
|
||||
|
||||
OPENSSL_CONFIGURE_WITH= openssl
|
||||
OPENSSL_USES= ssl
|
||||
OPENSSL_VARS= BROKEN_SSL="libressl libressl-devel" \
|
||||
BROKEN_SSL_REASON="PSK is not provided by LibreSSL"
|
||||
|
||||
GNUTLS_CONFIGURE_WITH= gnutls
|
||||
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-patch:
|
||||
@${GREP} -rl "/etc/zabbix" ${WRKSRC} \
|
||||
| ${XARGS} ${REINPLACE_CMD} -e 's#/usr/local/etc#${ETCDIR}#g'
|
||||
|
||||
@${REINPLACE_CMD} -e 's#/usr/sbin/fping#${LOCALBASE}/sbin/fping#g' \
|
||||
${WRKSRC}/conf/zabbix_*.conf \
|
||||
${WRKSRC}/src/zabbix_proxy/proxy.c \
|
||||
${WRKSRC}/src/zabbix_server/server.c
|
||||
|
||||
.if ${ZABBIX_BUILD} == "server"
|
||||
@${REINPLACE_CMD} -e 's#/tmp/zabbix_server.pid#/var/run/zabbix/zabbix_server.pid#g' \
|
||||
${WRKSRC}/conf/zabbix_server.conf \
|
||||
${WRKSRC}/src/zabbix_server/server.c
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "proxy"
|
||||
@${REINPLACE_CMD} -e 's#/tmp/zabbix_proxy.pid#/var/run/zabbix/zabbix_proxy.pid#g' \
|
||||
${WRKSRC}/conf/zabbix_proxy.conf \
|
||||
${WRKSRC}/src/zabbix_proxy/proxy.c
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "agent"
|
||||
@${REINPLACE_CMD} -e 's#/tmp/zabbix_agentd.pid#/var/run/zabbix/zabbix_agentd.pid#g' \
|
||||
${WRKSRC}/conf/zabbix_agentd.conf \
|
||||
${WRKSRC}/src/zabbix_agent/zabbix_agentd.c
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "java"
|
||||
@${REINPLACE_CMD} -e 's#/tmp/zabbix_java.pid#/var/run/zabbix/zabbix_java.pid#g' \
|
||||
${WRKSRC}/src/zabbix_java/settings.sh
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} != "agent"
|
||||
. for d in mysql oracle postgresql sqlite3
|
||||
@${REINPLACE_CMD} \
|
||||
-e 's|/usr/bin/traceroute|/usr/sbin/traceroute|g' \
|
||||
-e 's|sudo /usr/bin/nmap|sudo ${LOCALBASE}/bin/nmap|g' \
|
||||
${WRKSRC}/database/${d}/data.sql
|
||||
. endfor
|
||||
.endif
|
||||
@${FIND} ${WRKSRC} -type f \( -name '*.bak' -or -name '*.orig' \) \
|
||||
-exec ${RM} {} +
|
||||
|
||||
pre-configure:
|
||||
@echo "ac_cv_env_PKG_CONFIG_set=${LOCALBASE}/bin/pkgconf" > ${WRKSRC}/config.cache
|
||||
|
||||
post-install:
|
||||
.if ${ZABBIX_BUILD} == "java"
|
||||
${MV} ${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh \
|
||||
${STAGEDIR}${PREFIX}/sbin/zabbix_java/settings.sh.sample
|
||||
@${MKDIR} ${STAGEDIR}/var/run/zabbix
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} != "agent" && ${ZABBIX_BUILD} != "java"
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database
|
||||
@${RM} ${WRKSRC}/database/*/Makefile*
|
||||
(cd ${WRKSRC}/database/ && \
|
||||
${COPYTREE_SHARE} "mysql oracle postgresql sqlite3" \
|
||||
${STAGEDIR}${DATADIR}/${ZABBIX_BUILD:Q}/database/)
|
||||
|
||||
${MV} ${STAGEDIR}${ETCDIR}/zabbix_${ZABBIX_BUILD}.conf \
|
||||
${STAGEDIR}${ETCDIR}/zabbix_${ZABBIX_BUILD}.conf.sample
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "agent"
|
||||
${MV} ${STAGEDIR}${ETCDIR}/zabbix_${ZABBIX_BUILD}d.conf \
|
||||
${STAGEDIR}${ETCDIR}/zabbix_${ZABBIX_BUILD}d.conf.sample
|
||||
.endif
|
||||
|
||||
.if ${ZABBIX_BUILD} == "proxy"
|
||||
${MV} ${STAGEDIR}${LOCALBASE}/bin/zabbix_js \
|
||||
${STAGEDIR}${LOCALBASE}/bin/zabbix_proxy_js
|
||||
.endif
|
||||
|
||||
.else # frontend
|
||||
.include <bsd.port.pre.mk>
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
net-mgmt/zabbix52-server/distinfo
Normal file
3
net-mgmt/zabbix52-server/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1604238703
|
||||
SHA256 (zabbix-5.2.0.tar.gz) = b4452b1f6d60a1cbbc7a79d263c5a3b657640bba7ba2c11b93644dfe628a1e99
|
||||
SIZE (zabbix-5.2.0.tar.gz) = 19509362
|
45
net-mgmt/zabbix52-server/files/pkg-message.in
Normal file
45
net-mgmt/zabbix52-server/files/pkg-message.in
Normal file
|
@ -0,0 +1,45 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
For Zabbix server and proxy daemons, as well as Zabbix frontend, a database is
|
||||
required. It is not needed to run Zabbix agent.
|
||||
|
||||
% cd %%DATADIR%%/%%ZABBIX_BUILD%%/database
|
||||
|
||||
And follow the instructions:
|
||||
https://www.zabbix.com/documentation/5.2/manual/appendix/install/db_scripts
|
||||
|
||||
Upgrade notes for 5.2.0:
|
||||
https://www.zabbix.com/documentation/5.2/manual/installation/upgrade_notes_520
|
||||
|
||||
Upgrade procedure:
|
||||
https://www.zabbix.com/documentation/5.2/manual/installation/upgrade/sources
|
||||
|
||||
Please see https://www.zabbix.com/ for detailed information about Zabbix.
|
||||
|
||||
Official Zabbix documentation:
|
||||
https://www.zabbix.com/documentation/5.2/start
|
||||
|
||||
For Zabbix frontend "Welcome" screen. Enter the user name Admin with password
|
||||
zabbix to log in as a Zabbix superuser.
|
||||
|
||||
For use NMAP please edit sudoers.
|
||||
|
||||
This is a Zabbix Standard release!
|
||||
|
||||
Standard Zabbix releases are supported for Zabbix customers during six (6)
|
||||
months of Full Support (general, critical and security issues) until the next
|
||||
Zabbix stable release, plus one (1) additional month of Limited Support
|
||||
(critical and security issues only). Zabbix Standard version release will result
|
||||
in change of the second version number.
|
||||
|
||||
Stable release: Zabbix 5.2
|
||||
Release date: Oct 27, 2020
|
||||
End of Full Support: Apr 30, 2021
|
||||
End of Limited Support: May 31, 2021
|
||||
|
||||
Zabbix Life Cycle & Release Policy:
|
||||
https://www.zabbix.com/life_cycle_and_release_policy
|
||||
EOM
|
||||
}
|
||||
]
|
64
net-mgmt/zabbix52-server/files/zabbix_agentd.in
Normal file
64
net-mgmt/zabbix52-server/files/zabbix_agentd.in
Normal file
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: zabbix_agentd
|
||||
# REQUIRE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
|
||||
# enable zabbix_agentd:
|
||||
#
|
||||
# zabbix_agentd_enable (bool): Set to NO by default. Set it to YES to
|
||||
# enable zabbix_agentd.
|
||||
# zabbix_agentd_config (string): Set to the standard config file path by
|
||||
# default.
|
||||
# zabbix_agentd_pidfile (string): Location of the zabbix_agent pid file
|
||||
# Default is /var/run/zabbix/zabbix_agentd.pid
|
||||
# zabbix_agentd_paths (string): Set to standard path by default. Set a search
|
||||
# if you have custom userparams that need binaries elsewhere.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="zabbix_agentd"
|
||||
rcvar=zabbix_agentd_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${zabbix_agentd_enable:=NO}
|
||||
: ${zabbix_agentd_config:=%%ETCDIR%%/${name}.conf}
|
||||
: ${zabbix_agentd_pidfile:=/var/run/zabbix/zabbix_agentd.pid}
|
||||
: ${zabbix_agentd_paths:=$PATH}
|
||||
|
||||
command="%%PREFIX%%/sbin/${name}"
|
||||
required_files="${zabbix_agentd_config}"
|
||||
|
||||
start_cmd=zabbix_agentd_cmd
|
||||
start_precmd=zabbix_agentd_precmd
|
||||
status_precmd=zabbix_agentd_precmd
|
||||
stop_precmd=zabbix_agentd_precmd
|
||||
|
||||
zabbix_agentd_precmd()
|
||||
{
|
||||
if get_pidfile_from_conf PidFile ${zabbix_agentd_config}; then
|
||||
pidfile="$_pidfile_from_conf"
|
||||
else
|
||||
pidfile=${zabbix_agentd_pidfile}
|
||||
local rundir=${zabbix_agentd_pidfile%/*}
|
||||
if [ ! -d $rundir ] ; then
|
||||
install -d -m 0755 -o zabbix -g zabbix $rundir
|
||||
fi
|
||||
fi
|
||||
|
||||
# This shouldn't be necessary with pidfile, but empirically it was the
|
||||
# only way to reap the parent PID instead of all PIDs from
|
||||
# check_process, which may leak SysV IPC objects and prevent restart
|
||||
# and/or race condition on restart.
|
||||
rc_pid=$(check_pidfile ${pidfile} ${command})
|
||||
}
|
||||
|
||||
zabbix_agentd_cmd()
|
||||
{
|
||||
PATH=$zabbix_agentd_paths $command -c $zabbix_agentd_config
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
47
net-mgmt/zabbix52-server/files/zabbix_java.in
Normal file
47
net-mgmt/zabbix52-server/files/zabbix_java.in
Normal file
|
@ -0,0 +1,47 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: zabbix_java
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Options to configure zabbix_java via /etc/rc.conf:
|
||||
#
|
||||
# zabbix_java_enable (bool):
|
||||
# Enable service on boot.
|
||||
# Default: NO
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="zabbix_java"
|
||||
rcvar=zabbix_java_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${zabbix_java_enable:=NO}
|
||||
|
||||
start_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/startup.sh"
|
||||
stop_cmd="/usr/bin/su -m zabbix -c %%PREFIX%%/sbin/zabbix_java/shutdown.sh"
|
||||
status_cmd="zabbix_java_status"
|
||||
|
||||
extra_commands="status"
|
||||
|
||||
zabbix_java_status() {
|
||||
if get_pidfile_from_conf PID_FILE %%PREFIX%%/sbin/zabbix_java/settings.sh; then
|
||||
PID_FILE="$_pidfile_from_conf"
|
||||
fi
|
||||
|
||||
if [ -n "$PID_FILE" -a -f "$PID_FILE" ]; then
|
||||
PID=`cat "$PID_FILE"`
|
||||
if ps -p "$PID" > /dev/null 2>&1; then
|
||||
echo "${name} is running as pid ${PID}"
|
||||
else
|
||||
echo "${name} is not running"
|
||||
fi
|
||||
else
|
||||
echo "${name} is not running"
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
65
net-mgmt/zabbix52-server/files/zabbix_proxy.in
Normal file
65
net-mgmt/zabbix52-server/files/zabbix_proxy.in
Normal file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: zabbix_proxy
|
||||
# REQUIRE: DAEMON
|
||||
%%PGSQL%%# REQUIRE: postgresql
|
||||
%%MYSQL%%# REQUIRE: mysql
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
|
||||
# enable zabbix_proxy:
|
||||
#
|
||||
# zabbix_proxy_enable (bool): Set to NO by default. Set it to YES to
|
||||
# enable zabbix_proxy.
|
||||
# zabbix_proxy_config (string): Set to the standard config file path by
|
||||
# default.
|
||||
# zabbix_proxy_pidfile (string): Location of the zabbix_proxy pid file
|
||||
# Default is /var/run/zabbix/zabbix_proxy.pid
|
||||
# zabbix_proxy_paths (string): Set to standard path by default. Set a search
|
||||
# if you have custom userparams that need binaries elsewhere.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="zabbix_proxy"
|
||||
rcvar=zabbix_proxy_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${zabbix_proxy_enable:=NO}
|
||||
: ${zabbix_proxy_config:=%%ETCDIR%%/${name}.conf}
|
||||
: ${zabbix_proxy_pidfile:=/var/run/zabbix/zabbix_proxy.pid}
|
||||
|
||||
command="%%PREFIX%%/sbin/${name}"
|
||||
required_files="${zabbix_proxy_config}"
|
||||
|
||||
start_cmd=zabbix_proxy_cmd
|
||||
start_precmd=zabbix_proxy_precmd
|
||||
status_precmd=zabbix_proxy_precmd
|
||||
stop_precmd=zabbix_proxy_precmd
|
||||
|
||||
zabbix_proxy_precmd()
|
||||
{
|
||||
if get_pidfile_from_conf PidFile ${zabbix_proxy_config}; then
|
||||
pidfile="$_pidfile_from_conf"
|
||||
else
|
||||
pidfile=${zabbix_proxy_pidfile}
|
||||
local rundir=${zabbix_proxy_pidfile%/*}
|
||||
if [ ! -d $rundir ] ; then
|
||||
install -d -m 0755 -o zabbix -g zabbix $rundir
|
||||
fi
|
||||
fi
|
||||
|
||||
# This shouldn't be necessary with pidfile, but empirically it was the
|
||||
# only way to reap the parent PID instead of all PIDs from
|
||||
# check_process, which may leak SysV IPC objects and prevent restart
|
||||
# and/or race condition on restart.
|
||||
rc_pid=$(check_pidfile ${pidfile} ${command})
|
||||
}
|
||||
|
||||
zabbix_proxy_cmd()
|
||||
{
|
||||
PATH=$zabbix_proxy_paths $command -c $zabbix_proxy_config
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
66
net-mgmt/zabbix52-server/files/zabbix_server.in
Normal file
66
net-mgmt/zabbix52-server/files/zabbix_server.in
Normal file
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: zabbix_server
|
||||
# REQUIRE: DAEMON
|
||||
%%PGSQL%%# REQUIRE: postgresql
|
||||
%%MYSQL%%# REQUIRE: mysql
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
|
||||
# enable zabbix_server:
|
||||
#
|
||||
# zabbix_server_enable (bool): Set to NO by default. Set it to YES to
|
||||
# enable zabbix_server.
|
||||
# zabbix_server_config (string): Set to the standard config file path by
|
||||
# default.
|
||||
# zabbix_server_pidfile (string): Location of the zabbix_server pid file
|
||||
# Default is /var/run/zabbix/zabbix_server.pid
|
||||
# zabbix_server_paths (string): Set to standard path by default. Set a search
|
||||
# if you have custom userparams that need binaries elsewhere.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="zabbix_server"
|
||||
rcvar=zabbix_server_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${zabbix_server_enable:=NO}
|
||||
: ${zabbix_server_config:=%%ETCDIR%%/${name}.conf}
|
||||
: ${zabbix_server_pidfile:=/var/run/zabbix/zabbix_server.pid}
|
||||
: ${zabbix_server_paths:=$PATH}
|
||||
|
||||
command="%%PREFIX%%/sbin/${name}"
|
||||
required_files="${zabbix_server_config}"
|
||||
|
||||
start_cmd=zabbix_server_cmd
|
||||
start_precmd=zabbix_server_precmd
|
||||
status_precmd=zabbix_server_precmd
|
||||
stop_precmd=zabbix_server_precmd
|
||||
|
||||
zabbix_server_precmd()
|
||||
{
|
||||
if get_pidfile_from_conf PidFile ${zabbix_server_config}; then
|
||||
pidfile="$_pidfile_from_conf"
|
||||
else
|
||||
pidfile=${zabbix_server_pidfile}
|
||||
local rundir=${zabbix_server_pidfile%/*}
|
||||
if [ ! -d $rundir ] ; then
|
||||
install -d -m 0755 -o zabbix -g zabbix $rundir
|
||||
fi
|
||||
fi
|
||||
|
||||
# This shouldn't be necessary with pidfile, but empirically it was the
|
||||
# only way to reap the parent PID instead of all PIDs from
|
||||
# check_process, which may leak SysV IPC objects and prevent restart
|
||||
# and/or race condition on restart.
|
||||
rc_pid=$(check_pidfile ${pidfile} ${command})
|
||||
}
|
||||
|
||||
zabbix_server_cmd()
|
||||
{
|
||||
PATH=$zabbix_server_paths $command -c $zabbix_server_config
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
10
net-mgmt/zabbix52-server/pkg-descr
Normal file
10
net-mgmt/zabbix52-server/pkg-descr
Normal file
|
@ -0,0 +1,10 @@
|
|||
Zabbix is an enterprise-class open source distributed monitoring solution.
|
||||
|
||||
Zabbix is software that monitors numerous parameters of a network and the
|
||||
health and integrity of servers. Zabbix uses a flexible notification
|
||||
mechanism that allows users to configure e-mail based alerts for virtually
|
||||
any event. This allows a fast reaction to server problems. Zabbix offers
|
||||
excellent reporting and data visualisation features based on the stored
|
||||
data. This makes Zabbix ideal for capacity planning.
|
||||
|
||||
WWW: https://www.zabbix.com/
|
24
net-mgmt/zabbix52-server/pkg-plist
Normal file
24
net-mgmt/zabbix52-server/pkg-plist
Normal file
|
@ -0,0 +1,24 @@
|
|||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/mysql/data.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/mysql/double.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/mysql/images.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/mysql/schema.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/oracle/data.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/oracle/double.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/oracle/images.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/oracle/schema.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/postgresql/data.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/postgresql/double.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/postgresql/images.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/postgresql/schema.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/postgresql/timescaledb.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/data.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/images.sql
|
||||
%%DATADIR%%/%%ZABBIX_BUILD%%/database/sqlite3/schema.sql
|
||||
%%ETCDIR%%/zabbix_%%ZABBIX_BUILD%%.conf.sample
|
||||
%%PROXY%%@dir %%ETCDIR%%/zabbix_proxy.conf.d
|
||||
%%SERVER%%@dir %%ETCDIR%%/zabbix_server.conf.d
|
||||
%%SERVER%%@dir %%ETCDIR%%/zabbix/alertscripts
|
||||
man/man8/zabbix_%%ZABBIX_BUILD%%.8.gz
|
||||
sbin/zabbix_%%ZABBIX_BUILD%%
|
||||
@dir %%ETCDIR%%/zabbix/externalscripts
|
||||
@dir lib/modules
|
9
net-mgmt/zabbix52-server/pkg-plist.agent
Normal file
9
net-mgmt/zabbix52-server/pkg-plist.agent
Normal file
|
@ -0,0 +1,9 @@
|
|||
%%ETCDIR%%/zabbix_agentd.conf.sample
|
||||
bin/zabbix_get
|
||||
bin/zabbix_sender
|
||||
man/man1/zabbix_get.1.gz
|
||||
man/man1/zabbix_sender.1.gz
|
||||
man/man8/zabbix_%%ZABBIX_BUILD%%d.8.gz
|
||||
sbin/zabbix_agentd
|
||||
@dir %%ETCDIR%%/zabbix_agentd.conf.d
|
||||
@dir lib/modules
|
1294
net-mgmt/zabbix52-server/pkg-plist.frontend
Normal file
1294
net-mgmt/zabbix52-server/pkg-plist.frontend
Normal file
File diff suppressed because it is too large
Load diff
11
net-mgmt/zabbix52-server/pkg-plist.java
Normal file
11
net-mgmt/zabbix52-server/pkg-plist.java
Normal file
|
@ -0,0 +1,11 @@
|
|||
sbin/zabbix_java/shutdown.sh
|
||||
sbin/zabbix_java/lib/logback-console.xml
|
||||
sbin/zabbix_java/lib/logback-core-0.9.27.jar
|
||||
sbin/zabbix_java/lib/logback-classic-0.9.27.jar
|
||||
sbin/zabbix_java/lib/logback.xml
|
||||
sbin/zabbix_java/lib/slf4j-api-1.6.1.jar
|
||||
sbin/zabbix_java/lib/android-json-4.3_r3.1.jar
|
||||
@sample sbin/zabbix_java/settings.sh.sample
|
||||
sbin/zabbix_java/startup.sh
|
||||
sbin/zabbix_java/bin/zabbix-java-gateway-%%PORTVERSION%%.jar
|
||||
@dir(zabbix,zabbix,755) /var/run/zabbix
|
Loading…
Reference in a new issue