diff --git a/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd new file mode 100644 index 0000000..d264bd7 --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-agentd,v 1.2 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start() { + ebegin "Starting Zabbix agent" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd + eend $? +} + +stop() { + ebegin "Stopping Zabbix agent" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server new file mode 100644 index 0000000..83aaf4c --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.4.6/init.d/zabbix-server,v 1.2 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + use mysql postgresql +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt b/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt new file mode 100644 index 0000000..9d13a9f --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/postinstall-en.txt @@ -0,0 +1,8 @@ +Please change the values of the following variables in +${MY_HTDOCSDIR}/include/db.inc.php: + + DB_TYPE + DB_SERVER + DB_DATABASE + DB_USER + DB_PASSWORD diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf new file mode 100644 index 0000000..4299738 --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/zabbix_agent.conf @@ -0,0 +1,25 @@ +# This is config file for zabbix_agent +# To get more information about ZABBIX, +# go http://www.zabbix.com + +# IP address of ZABBIX server +# Connections from other hosts will be denied +Server=127.0.0.1 + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf new file mode 100644 index 0000000..e040f17 --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/zabbix_agentd.conf @@ -0,0 +1,70 @@ +# This is config file for zabbix_agentd +# To get more information about ZABBIX, go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# List of comma delimited IP addresses (or hostnames) of ZABBIX servers. +# No spaces allowed. First entry is used for sending active checks. +# Note that hostnames must resolve hostname->IP address and +# IP address->hostname. +Server=127.0.0.1 + +# Server port for sending active checks +ServerPort=10051 + +# Unique hostname. Required for active checks. +Hostname=localhost + +# Listen port. Default is 10050 +ListenPort=10050 + +# IP address to bind agent +# If missing, bind to all available IPs +ListenIP=127.0.0.1 + +# Number of pre-forked instances of zabbix_agentd. +# Default value is 5 +# This parameter must be between 1 and 16 +StartAgents=5 + +# How often refresh list of active checks. 2 minutes by default. +#RefreshActiveChecks=120 + +# Disable active checks. The agent will work in passive mode listening server. +#DisableActive=1 + +# Enable remote commands for ZABBIX agent. By default remote commands disabled. +#EnableRemoteCommands=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 + +# Name of PID file +PidFile=/var/run/zabbix/zabbix_agentd.pid + +# Name of log file. +# If not set, syslog will be used +LogFile=/var/log/zabbix/zabbix_agentd.log + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V diff --git a/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf b/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf new file mode 100644 index 0000000..12490f8 --- /dev/null +++ b/net-analyzer/zabbix/files/1.4.6/zabbix_server.conf @@ -0,0 +1,98 @@ +# This is config file for ZABBIX server process +# To get more information about ZABBIX, +# go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# This defines which server this is. +# Default value 1 +# This parameter must be between 1 and 255 +Server=1 + +# Number of pre-forked instances of pollers +# Default value is 6 +# This parameter must be between 6 and 255 +StartPollers=6 + +# Number of pre-forked instances of trappers +# Default value is 5 +# This parameter must be between 2 and 255 +StartTrappers=5 + +# Listen interface for trapper. Trapper will listen all network interfaces +# if this parameter is missing. +ListenIP=127.0.0.1 + +# Listen port for trapping. Default port number is 10051. This parameter +# must be between 1024 and 32767 +ListenPort=10051 + +# 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 (in sec) +# Must be between 1 and 30 +Timeout=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 + +#Location for custom alert scripts +AlertScriptsPath=/var/lib/zabbix/scripts + +#Location of 'fping. Default is /usr/sbin/fping +FpingLocation=/usr/sbin/fping + +# Frequency of ICMP pings. Defauls is 30 second. +PingerFrequency=30 + +# 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 using Unix socket? +#DBSocket=/var/run/mysqld/mysqld.sock diff --git a/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd new file mode 100644 index 0000000..1e8e459 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-agentd,v 1.2 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start() { + ebegin "Starting Zabbix agent" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd + eend $? +} + +stop() { + ebegin "Stopping Zabbix agent" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server new file mode 100644 index 0000000..277132e --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.5/init.d/zabbix-server,v 1.2 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + use mysql postgresql +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt b/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt new file mode 100644 index 0000000..9d13a9f --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/postinstall-en.txt @@ -0,0 +1,8 @@ +Please change the values of the following variables in +${MY_HTDOCSDIR}/include/db.inc.php: + + DB_TYPE + DB_SERVER + DB_DATABASE + DB_USER + DB_PASSWORD diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf new file mode 100644 index 0000000..dfa5c1b --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/zabbix_agent.conf @@ -0,0 +1,27 @@ +# This is config file for zabbix_agent +# To get more information about ZABBIX, +# go http://www.zabbix.com + +# IP address of ZABBIX server +# Connections from other hosts will be denied + +Server=127.0.0.1 + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 + +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf new file mode 100644 index 0000000..44ce9d8 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/zabbix_agentd.conf @@ -0,0 +1,90 @@ +# This is config file for zabbix_agentd +# To get more information about ZABBIX, go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# List of comma delimited IP addresses (or hostnames) of ZABBIX servers. +# No spaces allowed. First entry is used for sending active checks. +# Note that hostnames must resolve hostname->IP address and +# IP address->hostname. + +Server=127.0.0.1 + +# Server port for sending active checks + +#ServerPort=10051 + +# Unique hostname. Required for active checks. + +Hostname=ZABBIX Server + +# Listen port. Default is 10050 + +#ListenPort=10050 + +# IP address to bind agent +# If missing, bind to all available IPs + +#ListenIP=127.0.0.1 + +# Source IP address for outgouing connections +#SourceIP= + +# Number of pre-forked instances of zabbix_agentd. +# Default value is 5 +# This parameter must be between 1 and 16 + +StartAgents=5 + +# How often refresh list of active checks. 2 minutes by default. + +#RefreshActiveChecks=120 + +# Disable active checks. The agent will work in passive mode listening server. + +#DisableActive=1 + +# Enable remote commands for ZABBIX agent. By default remote commands disabled. + +#EnableRemoteCommands=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 + +# Name of PID file + +PidFile=/var/run/zabbix/zabbix_agentd.pid + +# Name of log file. +# If not set, syslog will be used + +LogFile=/tmp/zabbix_agentd.log + +# Maximum size of log file in MB. Set to 0 to disable automatic log rotation. +#LogFileSize=1 + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 + +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V + diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_proxy.conf new file mode 100644 index 0000000..a09a7b6 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/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/tmp/zabbix_proxy.pid + +# Name of log file +# If not set, syslog is used +LogFile=/tmp/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= + +# Connect to MySQL using Unix socket? + +#DBSocket=/tmp/mysql.sock diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_server.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_server.conf new file mode 100644 index 0000000..2821ed2 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/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=/tmp/zabbix_server.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=zabbix + +# Database user + +DBUser=root + +# Database password +# Comment this line if no password used + +#DBPassword= + +# Connect to MySQL using Unix socket? + +#DBSocket=/tmp/mysql.sock diff --git a/net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf b/net-analyzer/zabbix/files/1.6.5/zabbix_trapper.conf new file mode 100644 index 0000000..2022295 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.5/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=/tmp/zabbix_trapper.log + +# Database host name +# Default is localhost + +#DBHost=localhost + +# Database name + +DBName=zabbix + +# Database user + +DBUser=root + +# Database password +# Comment this line if no password used + +#DBPassword= + +# Connect to MySQL usig Unix socket? + +#DBSocket=/tmp/mysql.sock diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd new file mode 100644 index 0000000..afd0a35 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-agentd,v 1.3 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start() { + ebegin "Starting Zabbix agent" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd + eend $? +} + +stop() { + ebegin "Stopping Zabbix agent" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_agentd.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy new file mode 100644 index 0000000..e982406 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-proxy,v 1.3 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + #use mysql postgresql +} + +start() { + ebegin "Starting Zabbix proxy" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy + eend $? +} + +stop() { + ebegin "Stopping Zabbix proxy" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_proxy.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server new file mode 100644 index 0000000..d5d616e --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server @@ -0,0 +1,21 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/1.6.6/init.d/zabbix-server,v 1.3 2011/12/31 20:47:13 idl0r Exp $ + +depend() { + need net + use mysql postgresql +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start --user zabbix --group zabbix --exec /usr/sbin/zabbix_server + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop --pidfile /var/run/zabbix/zabbix_server.pid + eend $? +} diff --git a/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt b/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt new file mode 100644 index 0000000..9d13a9f --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/postinstall-en.txt @@ -0,0 +1,8 @@ +Please change the values of the following variables in +${MY_HTDOCSDIR}/include/db.inc.php: + + DB_TYPE + DB_SERVER + DB_DATABASE + DB_USER + DB_PASSWORD diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf new file mode 100644 index 0000000..dfa5c1b --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/zabbix_agent.conf @@ -0,0 +1,27 @@ +# This is config file for zabbix_agent +# To get more information about ZABBIX, +# go http://www.zabbix.com + +# IP address of ZABBIX server +# Connections from other hosts will be denied + +Server=127.0.0.1 + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 + +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf new file mode 100644 index 0000000..aac55ee --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/zabbix_agentd.conf @@ -0,0 +1,90 @@ +# This is config file for zabbix_agentd +# To get more information about ZABBIX, go http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +# List of comma delimited IP addresses (or hostnames) of ZABBIX servers. +# No spaces allowed. First entry is used for sending active checks. +# Note that hostnames must resolve hostname->IP address and +# IP address->hostname. + +Server=127.0.0.1 + +# Server port for sending active checks + +#ServerPort=10051 + +# Unique hostname. Required for active checks. + +Hostname=ZABBIX Server + +# Listen port. Default is 10050 + +#ListenPort=10050 + +# IP address to bind agent +# If missing, bind to all available IPs + +#ListenIP=127.0.0.1 + +# Source IP address for outgouing connections +#SourceIP= + +# Number of pre-forked instances of zabbix_agentd. +# Default value is 5 +# This parameter must be between 1 and 16 + +StartAgents=5 + +# How often refresh list of active checks. 2 minutes by default. + +#RefreshActiveChecks=120 + +# Disable active checks. The agent will work in passive mode listening server. + +#DisableActive=1 + +# Enable remote commands for ZABBIX agent. By default remote commands disabled. + +#EnableRemoteCommands=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 + +# Name of PID file + +PidFile=/var/run/zabbix/zabbix_agentd.pid + +# Name of log file. +# If not set, syslog will be used + +LogFile=/var/log/zabbix/zabbix_agentd.log + +# Maximum size of log file in MB. Set to 0 to disable automatic log rotation. +#LogFileSize=1 + +# Spend no more than Timeout seconds on processing +# Must be between 1 and 30 + +Timeout=3 + +####### USER-DEFINED MONITORED PARAMETERS ####### +# Format: UserParameter=, +# Note that shell command must not return empty string or EOL only +#UserParameter=system.test,who|wc -l +### Set of parameter for monitoring MySQL server (v3.23.42 and later) +### Change -u and add -p if required +#UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l +#UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T" +#UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q" +#UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S" +#UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O" +#UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":" +#UserParameter=mysql.version,mysql -V + diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_proxy.conf new file mode 100644 index 0000000..e0380d4 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/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= + +# Connect to MySQL using Unix socket? + +#DBSocket=/var/run/mysqld/mysqld.sock diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_server.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_server.conf new file mode 100644 index 0000000..63f14c5 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/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=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=zabbix + +# Database user + +DBUser=root + +# Database password +# Comment this line if no password used + +#DBPassword= + +# Connect to MySQL using Unix socket? + +#DBSocket=/var/run/mysqld/mysqld.sock diff --git a/net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf b/net-analyzer/zabbix/files/1.6.6/zabbix_trapper.conf new file mode 100644 index 0000000..8bbe0f9 --- /dev/null +++ b/net-analyzer/zabbix/files/1.6.6/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=/tmp/zabbix_trapper.log + +# Database host name +# Default is localhost + +#DBHost=localhost + +# Database name + +DBName=zabbix + +# Database user + +DBUser=root + +# Database password +# Comment this line if no password used + +#DBPassword= + +# Connect to MySQL usig Unix socket? + +#DBSocket=/var/run/mysqld/mysqld.sock diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd b/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd new file mode 100644 index 0000000..3ed764a --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.0/init.d/zabbix-agentd,v 1.5 2013/01/18 23:58:34 mattm Exp $ + +pid_file="/var/run/zabbix/zabbix_agentd.pid" + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix +} + +start() { + ebegin "Starting Zabbix agent" + start-stop-daemon --start --pidfile ${pid_file} \ + --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix agent" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy b/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy new file mode 100644 index 0000000..f312cc8 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.0/init.d/zabbix-proxy,v 1.2 2013/07/19 04:27:55 mattm Exp $ + +pid_file="/var/run/zabbix/zabbix_proxy.pid" + +depend() { + need net + provide zabbix-proxy +} + +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix +} + +start() { + ebegin "Starting Zabbix proxy" + start-stop-daemon --start --pidfile ${pid_file} \ + --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy -- -c /etc/zabbix/zabbix_proxy.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix proxy" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.0/init.d/zabbix-server b/net-analyzer/zabbix/files/2.0/init.d/zabbix-server new file mode 100644 index 0000000..5f91941 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/init.d/zabbix-server @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.0/init.d/zabbix-server,v 1.4 2013/01/18 23:58:34 mattm Exp $ + +pid_file="/var/run/zabbix/zabbix_server.pid" + +depend() { + need net + use mysql postgresql +} +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /var/run/zabbix +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start --user zabbix --group zabbix --pidfile ${pid_file} \ + --exec /usr/sbin/zabbix_server -- -c /etc/zabbix/zabbix_server.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx282.patch b/net-analyzer/zabbix/files/2.0/patches/zbx282.patch new file mode 100644 index 0000000..4f8ed94 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/patches/zbx282.patch @@ -0,0 +1,182 @@ +--- configure.in 2013-02-12 04:27:27.000000000 -0700 ++++ configure.in 2013-05-03 07:59:46.318882346 -0600 +@@ -903,19 +903,32 @@ + AC_MSG_CHECKING([for the linux kernel version]) + + kernel=`uname -r` ++ kernel_major=`uname -r|cut -d. -f1` ++ kernel_minor=`uname -r|cut -d. -f2` + +- case "${kernel}" in +- 2.6.*) +- AC_MSG_RESULT([2.6 family (${kernel})]) +- AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you are using Linux 2.6.x]) +- ;; +- 2.4.*) +- AC_MSG_RESULT([2.4 family (${kernel})]) +- AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you are using Linux 2.4.x]) +- ;; +- *) +- AC_MSG_RESULT([unknown family (${kernel})]) +- ;; ++ case "${kernel_major}" in ++ 2) ++ case "${$kernel_minor}" in ++ 6) ++ AC_MSG_RESULT([Linux Kernel >= 2.6.x family (${kernel})]) ++ AC_DEFINE([KERNEL_2_6_Xplus], 1, [Define to 1 if you are using Linux >= 2.6.x]) ++ ;; ++ 4) ++ AC_MSG_RESULT([2.4 family (${kernel})]) ++ AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you are using Linux 2.4.x]) ++ ;; ++ esac ++ ;; ++ 1) ++ echo ++ ;; ++ 0) ++ echo ++ ;; ++ *) ++ AC_MSG_RESULT([Linux Kernel >= 2.6.x family (${kernel})]) ++ AC_DEFINE([KERNEL_2_6_Xplus], 1, [Define to 1 if you are using Linux >= 2.6.x]) ++ ;; + esac + fi + +--- include/config.h.in 2013-02-12 04:27:41.000000000 -0700 ++++ include/config.h.in 2013-05-03 07:47:39.658588709 -0600 +@@ -507,8 +507,8 @@ + /* Define to 1 if you are using Linux 2.4.x */ + #undef KERNEL_2_4 + +-/* Define to 1 if you are using Linux 2.6.x */ +-#undef KERNEL_2_6 ++/* Define to 1 if you are using Linux >= 2.6.x */ ++#undef KERNEL_2_6_Xplus + + /* Define to 1 if LDAP depricated functions is used. */ + #undef LDAP_DEPRECATED + +--- src/libs/zbxsysinfo/linux/sensors.c 2013-02-12 04:27:22.000000000 -0700 ++++ src/libs/zbxsysinfo/linux/sensors.c 2013-05-03 07:47:39.658588709 -0600 +@@ -20,14 +20,21 @@ + #include "common.h" + #include "sysinfo.h" + +-#ifdef KERNEL_2_4 ++#if defined(KERNEL_2_4) || defined(KERNEL_2_6_Xplus) + + #define DO_ONE 0 + #define DO_AVG 1 + #define DO_MAX 2 + #define DO_MIN 3 + ++#if defined(KERNEL_2_4) + #define DEVICE_DIR "/proc/sys/dev/sensors" ++#endif ++ ++#if defined(KERNEL_2_6_Xplus) ++#define DEVICE_DIR "/sys/class/hwmon" ++#define EXTRA "device" ++#endif + + static void count_sensor(int do_task, const char *filename, double *aggr, int *cnt) + { +@@ -46,9 +53,17 @@ + + zbx_fclose(f); + +- if (1 == sscanf(line, "%*f\t%*f\t%lf\n", &value)) ++#if defined(KERNEL_2_6_Xplus) ++ if (1 == sscanf(line, "%lf", &value)) ++#else ++ if (1 == sscanf(line, "%*lf\t%*lf\t%lf\n", &value)) ++#endif + { + (*cnt)++; ++#if defined(KERNEL_2_6_Xplus) ++ if(NULL == strstr(filename, "fan")) ++ value = value / 1000; ++#endif + + switch (do_task) + { +@@ -70,11 +85,35 @@ + + static void get_device_sensors(int do_task, const char *device, const char *name, double *aggr, int *cnt) + { ++#if defined(KERNEL_2_6_Xplus) ++ struct stat buffer; ++ int use_extra = 0; ++#endif + char sensorname[MAX_STRING_LEN]; ++ char sensortest[MAX_STRING_LEN]; ++ ++#if defined(KERNEL_2_6_Xplus) ++ zbx_snprintf(sensortest, sizeof(sensortest), "%s/%s/name", DEVICE_DIR, device); ++ if(stat(sensortest, &buffer) != 0) ++ { ++ zbx_snprintf(sensortest, sizeof(sensortest), "%s/%s/device/name", DEVICE_DIR, device); ++ if(stat(sensortest, &buffer) == 0) ++ { ++ use_extra = 1; ++ } ++ } ++#endif + + if (DO_ONE == do_task) + { ++#if defined(KERNEL_2_6_Xplus) ++ if(use_extra) ++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s/%s_input", DEVICE_DIR, device, EXTRA, name); ++ else ++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s_input", DEVICE_DIR, device, name); ++#else + zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s", DEVICE_DIR, device, name); ++#endif + count_sensor(do_task, sensorname, aggr, cnt); + } + else +@@ -94,7 +133,14 @@ + if (NULL == zbx_regexp_match(deviceent->d_name, device, NULL)) + continue; + ++#if defined(KERNEL_2_6_Xplus) ++ if(use_extra) ++ zbx_snprintf(devicename, sizeof(devicename), "%s/%s/%s", DEVICE_DIR, deviceent->d_name, EXTRA); ++ else ++ zbx_snprintf(devicename, sizeof(devicename), "%s/%s", DEVICE_DIR, deviceent->d_name); ++#else + zbx_snprintf(devicename, sizeof(devicename), "%s/%s", DEVICE_DIR, deviceent->d_name); ++#endif + + if (NULL == (sensordir = opendir(devicename))) + continue; +@@ -107,7 +153,19 @@ + if (NULL == zbx_regexp_match(sensorent->d_name, name, NULL)) + continue; + ++#if defined(KERNEL_2_6_Xplus) ++ if (0 != strcmp(sensorent->d_name + strlen(sensorent->d_name) - 6, "_input")) ++ continue; ++#endif ++ ++#if defined(KERNEL_2_6_Xplus) ++ if(use_extra) ++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s/%s", devicename, sensorent->d_name, EXTRA); ++ else ++ zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s", devicename, sensorent->d_name); ++#else + zbx_snprintf(sensorname, sizeof(sensorname), "%s/%s", devicename, sensorent->d_name); ++#endif + count_sensor(do_task, sensorname, aggr, cnt); + } + closedir(sensordir); +@@ -162,4 +220,4 @@ + return SYSINFO_RET_FAIL; + } + +-#endif /* KERNEL_2_4 */ ++#endif /* KERNEL_2_4 || KERNEL_2_6_Xplus */ diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch b/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch new file mode 100644 index 0000000..65d92a8 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/patches/zbx6097.patch @@ -0,0 +1,66 @@ +Index: frontends/php/authentication.php +=================================================================== +--- frontends/php/authentication.php (revision 32376) ++++ frontends/php/authentication.php (revision 32393) +@@ -101,12 +101,11 @@ + $config['authentication_type'] = $_REQUEST['config']; + + // check login/password +- $login = API::User()->ldapLogin(array( +- 'user' => get_request('user', $USER_DETAILS['alias']), +- 'password' => get_request('user_password', ''), +- 'cnf' => $ldap_cnf +- )); ++ $ldap = new CLdap($ldap_cnf); ++ $ldap->connect(); ++ $login = $ldap->checkPass(get_request('user', $USER_DETAILS['alias']), get_request('user_password', '')); + if (!$login) { ++ error(_('Login name or password is incorrect')); + throw new Exception(); + } + +@@ -129,12 +128,13 @@ + } + elseif (isset($_REQUEST['test'])) { + // check login/password +- $result = API::User()->ldapLogin(array( +- 'user' => get_request('user', $USER_DETAILS['alias']), +- 'password' => get_request('user_password', ''), +- 'cnf' => $ldap_cnf +- )); ++ $ldap = new CLdap($ldap_cnf); ++ $ldap->connect(); ++ $result = $ldap->checkPass(get_request('user', $USER_DETAILS['alias']), get_request('user_password', '')); + ++ if (!$result) ++ error(_('Login name or password is incorrect'));{ ++ } + show_messages($result, _('LDAP login successful'), _('LDAP login was not successful')); + } + } +Index: frontends/php/api/classes/CUser.php +=================================================================== +--- frontends/php/api/classes/CUser.php (revision 32376) ++++ frontends/php/api/classes/CUser.php (revision 32393) +@@ -822,15 +822,12 @@ + // ****************************************************************************** + // LOGIN Methods + // ****************************************************************************** +- public function ldapLogin($user) { +- $cnf = isset($user['cnf']) ? $user['cnf'] : null; +- +- if (is_null($cnf)) { +- $config = select_config(); +- foreach ($config as $id => $value) { +- if (zbx_strpos($id, 'ldap_') !== false) { +- $cnf[str_replace('ldap_', '', $id)] = $config[$id]; +- } ++ protected function ldapLogin($user) { ++ $config = select_config(); ++ $cnf = array(); ++ foreach ($config as $id => $value) { ++ if (zbx_strpos($id, 'ldap_') !== false) { ++ $cnf[str_replace('ldap_', '', $id)] = $config[$id]; + } + } + diff --git a/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch b/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch new file mode 100644 index 0000000..52cabd4 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/patches/zbx7479.patch @@ -0,0 +1,83 @@ +Index: src/libs/zbxsysinfo/sysinfo.c +=================================================================== +--- src/libs/zbxsysinfo/sysinfo.c (revision 40346) ++++ src/libs/zbxsysinfo/sysinfo.c (working copy) +@@ -267,13 +267,49 @@ + test_parameter(commands[i].key, PROCESS_TEST | PROCESS_USE_TEST_PARAM); + } + ++static int zbx_check_user_parameter(const char *param, char *error, int max_error_len) ++{ ++ const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@\n", *c; ++ char *buf = NULL; ++ size_t buf_alloc = 128, buf_offset = 0; ++ ++ if (0 != CONFIG_UNSAFE_USER_PARAMETERS) ++ return SUCCEED; ++ ++ for (c = suppressed_chars; '\0' != *c; c++) ++ { ++ if (NULL == strchr(param, *c)) ++ continue; ++ ++ buf = zbx_malloc(buf, buf_alloc); ++ ++ for (c = suppressed_chars; '\0' != *c; c++) ++ { ++ if (c != suppressed_chars) ++ zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, ", "); ++ ++ if (0 != isprint(*c)) ++ zbx_chrcpy_alloc(&buf, &buf_alloc, &buf_offset, *c); ++ else ++ zbx_snprintf_alloc(&buf, &buf_alloc, &buf_offset, "0x%02x", *c); ++ } ++ ++ zbx_snprintf(error, max_error_len, "special characters \"%s\" are not allowed in the parameters", buf); ++ ++ zbx_free(buf); ++ ++ return FAIL; ++ } ++ ++ return SUCCEED; ++} ++ + static int replace_param(const char *cmd, const char *param, char *out, int outlen, char *error, int max_error_len) + { + int ret = SUCCEED; + char buf[MAX_STRING_LEN]; + char command[MAX_STRING_LEN]; + char *pl, *pr; +- const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@", *c; + + assert(out); + +@@ -305,25 +341,10 @@ + { + get_param(param, (int)(pr[1] - '0'), buf, sizeof(buf)); + +- if (0 == CONFIG_UNSAFE_USER_PARAMETERS) +- { +- for (c = suppressed_chars; '\0' != *c; c++) +- { +- if (NULL != strchr(buf, *c)) +- { +- zbx_snprintf(error, max_error_len, "Special characters '%s'" +- " are not allowed in the parameters", +- suppressed_chars); +- ret = FAIL; +- break; +- } +- } +- } ++ if (SUCCEED != (ret = zbx_check_user_parameter(buf, error, max_error_len))) ++ break; + } + +- if (FAIL == ret) +- break; +- + zbx_strlcat(out, buf, outlen); + outlen -= MIN((int)strlen(buf), (int)outlen); + diff --git a/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf b/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf new file mode 100644 index 0000000..21eed90 --- /dev/null +++ b/net-analyzer/zabbix/files/2.0/zabbix_proxy.conf @@ -0,0 +1,463 @@ +# This is a configuration file for Zabbix Proxy process +# To get more information about Zabbix, +# visit http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +### Option: ProxyMode +# Proxy operating mode +# 0 - proxy in the active mode +# 1 - proxy in the passive mode +# +# Mandatory: no +# Default: +# ProxyMode=0 + +### Option: Server +# IP address (or hostname) of Zabbix server. +# Active proxy will get configuration data from the server. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: yes (if ProxyMode is set to 0) +# Default: +# Server= + +Server=127.0.0.1 + +### Option: ServerPort +# Port of Zabbix trapper on Zabbix server. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ServerPort=10051 + +### Option: Hostname +# Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server! +# Value is acquired from HostnameItem if undefined. +# +# Mandatory: no +# Default: +# Hostname= + +Hostname=proxy + +### Option: HostnameItem +# Item used for generating Hostname if it is undefined. +# Ignored if Hostname is defined. +# +# Mandatory: no +# Default: +# HostnameItem=system.hostname + +### Option: ListenPort +# Listen port for trapper. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10051 + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +### Option: LogFile +# Name of log file. +# If not set, syslog is used. +# +# Mandatory: no +# Default: +# LogFile= + +LogFile=/var/log/zabbix/zabbix_proxy.log + +### Option: LogFileSize +# Maximum size of log file in MB. +# 0 - disable automatic log rotation. +# +# Mandatory: no +# Range: 0-1024 +# Default: +# LogFileSize=1 + +### Option: DebugLevel +# Specifies debug level +# 0 - no debug +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# +# Mandatory: no +# Range: 0-4 +# Default: +# DebugLevel=3 + +### Option: PidFile +# Name of PID file. +# +# Mandatory: no +# Default: +# PidFile=/tmp/zabbix_proxy.pid + +### Option: DBHost +# Database host name. +# If set to localhost, socket is used for MySQL. +# If set to empty string, socket is used for PostgreSQL. +# +# Mandatory: no +# Default: +# DBHost=localhost + +### Option: DBName +# Database name. +# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. +# Warning: do not attempt to use the same database Zabbix server is using. +# +# Mandatory: yes +# Default: +# DBName= + +DBName=zabbix_proxy + +### Option: DBSchema +# Schema name. Used for IBM DB2. +# +# Mandatory: no +# Default: +# DBSchema= + +### Option: DBUser +# Database user. Ignored for SQLite. +# +# Default: +# DBUser= + +DBUser=zabbix + +### Option: DBPassword +# Database password. Ignored for SQLite. +# Comment this line if no password is used. +# +# Mandatory: no +# Default: +# DBPassword= + +### Option: DBSocket +# Path to MySQL socket. +# +# Mandatory: no +# Default: +# DBSocket=/tmp/mysql.sock + +# Option: DBPort +# Database port when not using local socket. Ignored for SQLite. +# +# Mandatory: no +# Default (for MySQL): +# DBPort=3306 + +######### PROXY SPECIFIC PARAMETERS ############# + +### Option: ProxyLocalBuffer +# Proxy will keep data locally for N hours, even if the data have already been synced with the server. +# This parameter may be used if local data will be used by third party applications. +# +# Mandatory: no +# Range: 0-720 +# Default: +# ProxyLocalBuffer=0 + +### Option: ProxyOfflineBuffer +# Proxy will keep data for N hours in case if no connectivity with Zabbix Server. +# Older data will be lost. +# +# Mandatory: no +# Range: 1-720 +# Default: +# ProxyOfflineBuffer=1 + +### Option: HeartbeatFrequency +# Frequency of heartbeat messages in seconds. +# Used for monitoring availability of Proxy on server side. +# 0 - heartbeat messages disabled. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 0-3600 +# Default: +# HeartbeatFrequency=60 + +### Option: ConfigFrequency +# How often proxy retrieves configuration data from Zabbix Server in seconds. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1-3600*24*7 +# Default: +# ConfigFrequency=3600 + +### Option: DataSenderFrequency +# Proxy will send collected data to the Server every N seconds. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# DataSenderFrequency=1 + +############ ADVANCED PARAMETERS ################ + +### Option: StartPollers +# Number of pre-forked instances of pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollers=5 + +### Option: StartIPMIPollers +# Number of pre-forked instances of IPMI pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartIPMIPollers=0 + +### Option: StartPollersUnreachable +# Number of pre-forked instances of pollers for unreachable hosts (including IPMI). +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollersUnreachable=1 + +### Option: StartTrappers +# Number of pre-forked instances of trappers. +# Trappers accept incoming connections from Zabbix sender and active agents. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartTrappers=5 + +### Option: StartPingers +# Number of pre-forked instances of ICMP pingers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPingers=1 + +### Option: StartDiscoverers +# Number of pre-forked instances of discoverers. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartDiscoverers=1 + +### Option: StartHTTPPollers +# Number of pre-forked instances of HTTP pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartHTTPPollers=1 + +### Option: JavaGateway +# IP address (or hostname) of Zabbix Java gateway. +# Only required if Java pollers are started. +# +# Mandatory: no +# Default: +# JavaGateway= + +### Option: JavaGatewayPort +# Port that Zabbix Java gateway listens on. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# JavaGatewayPort=10052 + +### Option: StartJavaPollers +# Number of pre-forked instances of Java pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartJavaPollers=0 + +### Option: SNMPTrapperFile +# Temporary file used for passing data from SNMP trap daemon to the proxy. +# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file. +# +# Mandatory: no +# Default: +# SNMPTrapperFile=/tmp/zabbix_traps.tmp + +### Option: StartSNMPTrapper +# If 1, SNMP trapper process is started. +# +# Mandatory: no +# Range: 0-1 +# Default: +# StartSNMPTrapper=0 + +### Option: ListenIP +# List of comma delimited IP addresses that the trapper should listen on. +# Trapper will listen on all network interfaces if this parameter is missing. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +### Option: HousekeepingFrequency +# How often Zabbix will perform housekeeping procedure (in hours). +# Housekeeping is removing unnecessary information from history, alert, and alarms tables. +# +# Mandatory: no +# Range: 1-24 +# Default: +# HousekeepingFrequency=1 + +### Option: CacheSize +# Size of configuration cache, in bytes. +# Shared memory size, for storing hosts and items data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# CacheSize=8M + +### Option: StartDBSyncers +# Number of pre-forked instances of DB Syncers +# +# Mandatory: no +# Range: 1-100 +# Default: +# StartDBSyncers=4 + +### Option: HistoryCacheSize +# Size of history cache, in bytes. +# Shared memory size for storing history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryCacheSize=8M + +### Option: HistoryTextCacheSize +# Size of text history cache, in bytes. +# Shared memory size for storing character, text or log history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryTextCacheSize=16M + +### Option: Timeout +# Specifies how long we wait for agent, SNMP device or external check (in seconds). +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +### Option: TrapperTimeout +# Specifies how many seconds trapper may spend processing new data. +# +# Mandatory: no +# Range: 1-300 +# Default: +# TrapperTimeout=300 + +### Option: UnreachablePeriod +# After how many seconds of unreachability treat a host as unavailable. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachablePeriod=45 + +### Option: UnavailableDelay +# How often host is checked for availability during the unavailability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnavailableDelay=60 + +### Option: UnreachableDelay +# How often host is checked for availability during the unreachability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachableDelay=15 + +### Option: ExternalScripts +# Full path to location of external scripts. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# ExternalScripts=${datadir}/zabbix/externalscripts + +### Option: FpingLocation +# Location of fping. +# Make sure that fping binary has root ownership and SUID flag set. +# +# Mandatory: no +# Default: +# FpingLocation=/usr/sbin/fping + +### Option: Fping6Location +# Location of fping6. +# Make sure that fping6 binary has root ownership and SUID flag set. +# Make empty if your fping utility is capable to process IPv6 addresses. +# +# Mandatory: no +# Default: +# Fping6Location=/usr/sbin/fping6 + +### Option: SSHKeyLocation +# Location of public and private keys for SSH checks and actions +# +# Mandatory: no +# Default: +# SSHKeyLocation= + +### Option: LogSlowQueries +# How long a database query may take before being logged (in milliseconds). +# Only works if DebugLevel set to 3 or 4. +# 0 - don't log slow queries. +# +# Mandatory: no +# Range: 1-3600000 +# Default: +# LogSlowQueries=0 + +### Option: TmpDir +# Temporary directory. +# +# Mandatory: no +# Default: +# TmpDir=/tmp + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=/usr/local/etc/zabbix_proxy.general.conf +# Include=/usr/local/etc/zabbix_proxy.conf.d/ diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd b/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd new file mode 100644 index 0000000..348265d --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.2/init.d/zabbix-agentd,v 1.1 2013/11/16 07:18:54 mattm Exp $ + +pid_file="/run/zabbix/zabbix_agentd.pid" + +depend() { + need net + provide zabbix-agent + use zabbix-server +} + +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix +} + +start() { + ebegin "Starting Zabbix agent" + start-stop-daemon --start --pidfile ${pid_file} \ + --user zabbix --group zabbix --exec /usr/sbin/zabbix_agentd -- -c /etc/zabbix/zabbix_agentd.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix agent" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy b/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy new file mode 100644 index 0000000..38bce75 --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.2/init.d/zabbix-proxy,v 1.1 2013/11/16 07:18:54 mattm Exp $ + +pid_file="/run/zabbix/zabbix_proxy.pid" + +depend() { + need net + provide zabbix-proxy +} + +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix +} + +start() { + ebegin "Starting Zabbix proxy" + start-stop-daemon --start --pidfile ${pid_file} \ + --user zabbix --group zabbix --exec /usr/sbin/zabbix_proxy -- -c /etc/zabbix/zabbix_proxy.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix proxy" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.2/init.d/zabbix-server b/net-analyzer/zabbix/files/2.2/init.d/zabbix-server new file mode 100644 index 0000000..bd17c19 --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/init.d/zabbix-server @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/zabbix/files/2.2/init.d/zabbix-server,v 1.1 2013/11/16 07:18:54 mattm Exp $ + +pid_file="/run/zabbix/zabbix_server.pid" + +depend() { + need net + use mysql postgresql +} +start_pre() { + checkpath -d -m 0775 -o zabbix:zabbix /run/zabbix +} + +start() { + ebegin "Starting Zabbix server" + start-stop-daemon --start --user zabbix --group zabbix --pidfile ${pid_file} \ + --exec /usr/sbin/zabbix_server -- -c /etc/zabbix/zabbix_server.conf + eend $? +} + +stop() { + ebegin "Stopping Zabbix server" + start-stop-daemon --stop --pidfile ${pid_file} + eend $? +} diff --git a/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch b/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch new file mode 100644 index 0000000..79bb92f --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/patches/zbx7479.patch @@ -0,0 +1,83 @@ +Index: src/libs/zbxsysinfo/sysinfo.c +=================================================================== +--- src/libs/zbxsysinfo/sysinfo.c (revision 40348) ++++ src/libs/zbxsysinfo/sysinfo.c (working copy) +@@ -427,13 +427,49 @@ + test_aliases(); + } + ++static int zbx_check_user_parameter(const char *param, char *error, int max_error_len) ++{ ++ const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@\n", *c; ++ char *buf = NULL; ++ size_t buf_alloc = 128, buf_offset = 0; ++ ++ if (0 != CONFIG_UNSAFE_USER_PARAMETERS) ++ return SUCCEED; ++ ++ for (c = suppressed_chars; '\0' != *c; c++) ++ { ++ if (NULL == strchr(param, *c)) ++ continue; ++ ++ buf = zbx_malloc(buf, buf_alloc); ++ ++ for (c = suppressed_chars; '\0' != *c; c++) ++ { ++ if (c != suppressed_chars) ++ zbx_strcpy_alloc(&buf, &buf_alloc, &buf_offset, ", "); ++ ++ if (0 != isprint(*c)) ++ zbx_chrcpy_alloc(&buf, &buf_alloc, &buf_offset, *c); ++ else ++ zbx_snprintf_alloc(&buf, &buf_alloc, &buf_offset, "0x%02x", *c); ++ } ++ ++ zbx_snprintf(error, max_error_len, "special characters \"%s\" are not allowed in the parameters", buf); ++ ++ zbx_free(buf); ++ ++ return FAIL; ++ } ++ ++ return SUCCEED; ++} ++ + static int replace_param(const char *cmd, const char *param, char *out, int outlen, char *error, int max_error_len) + { + int ret = SUCCEED; + char buf[MAX_STRING_LEN]; + char command[MAX_STRING_LEN]; + char *pl, *pr; +- const char suppressed_chars[] = "\\'\"`*?[]{}~$!&;()<>|#@", *c; + + assert(out); + +@@ -465,25 +501,10 @@ + { + get_param(param, (int)(pr[1] - '0'), buf, sizeof(buf)); + +- if (0 == CONFIG_UNSAFE_USER_PARAMETERS) +- { +- for (c = suppressed_chars; '\0' != *c; c++) +- { +- if (NULL != strchr(buf, *c)) +- { +- zbx_snprintf(error, max_error_len, "Special characters '%s'" +- " are not allowed in the parameters", +- suppressed_chars); +- ret = FAIL; +- break; +- } +- } +- } ++ if (SUCCEED != (ret = zbx_check_user_parameter(buf, error, max_error_len))) ++ break; + } + +- if (FAIL == ret) +- break; +- + zbx_strlcat(out, buf, outlen); + outlen -= MIN((int)strlen(buf), (int)outlen); + diff --git a/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch b/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch new file mode 100644 index 0000000..076e10a --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/patches/zbx8151.patch @@ -0,0 +1,53 @@ +Index: frontends/php/include/defines.inc.php +=================================================================== +--- frontends/php/include/defines.inc.php (revision 46596) ++++ frontends/php/include/defines.inc.php (revision 46655) +@@ -835,6 +835,14 @@ + + define('ZBX_DEFAULT_IMPORT_HOST_GROUP', 'Imported hosts'); + ++// XML import flags ++// See ZBX-8151. Old version of libxml suffered from setting DTDLOAD and NOENT flags by default, which allowed ++// performing XXE attacks. Calling libxml_disable_entity_loader(true) also had no affect if flags passed to libxml ++// calls were 0 - so for better security with legacy libxml we need to call libxml_disable_entity_loader(true) AND ++// pass the LIBXML_NONET flag. Please keep in mind that LIBXML_NOENT actually EXPANDS entities, opposite to it's name - ++// so this flag is not needed here. ++define('LIBXML_IMPORT_FLAGS', LIBXML_NONET); ++ + // API errors + define('ZBX_API_ERROR_INTERNAL', 111); + define('ZBX_API_ERROR_PARAMETERS', 100); +Index: frontends/php/include/classes/import/readers/CXmlImportReader.php +=================================================================== +--- frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46596) ++++ frontends/php/include/classes/import/readers/CXmlImportReader.php (revision 46655) +@@ -32,7 +32,8 @@ + */ + public function read($string) { + libxml_use_internal_errors(true); +- $result = simplexml_load_string($string); ++ libxml_disable_entity_loader(true); ++ $result = simplexml_load_string($string, null, LIBXML_IMPORT_FLAGS); + if (!$result) { + $errors = libxml_get_errors(); + libxml_clear_errors(); +Index: frontends/php/include/classes/import/CXmlImport18.php +=================================================================== +--- frontends/php/include/classes/import/CXmlImport18.php (revision 46596) ++++ frontends/php/include/classes/import/CXmlImport18.php (revision 46655) +@@ -390,12 +390,13 @@ + return $array; + } + +- public static function import($file) { ++ public static function import($source) { + + libxml_use_internal_errors(true); ++ libxml_disable_entity_loader(true); + + $xml = new DOMDocument(); +- if (!$xml->loadXML($file)) { ++ if (!$xml->loadXML($source, LIBXML_IMPORT_FLAGS)) { + $text = ''; + foreach (libxml_get_errors() as $error) { + switch ($error->level) { diff --git a/net-analyzer/zabbix/files/2.2/zabbix_agent.conf b/net-analyzer/zabbix/files/2.2/zabbix_agent.conf new file mode 100644 index 0000000..dcb4b72 --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/zabbix_agent.conf @@ -0,0 +1,81 @@ +# This is a config file for Zabbix internet service daemon agent +# To get more information about Zabbix visit http://www.zabbix.com + +### Option: Server +# IP address of Zabbix server +# Connections from other hosts will be denied +# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. +# +# Mandatory: yes +# Default: +# Server= + +Server=127.0.0.1 + +############ ADVANCED PARAMETERS ################# + +### Option: Alias +# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one. +# +# Mandatory: no +# Range: +# Default: + +### Option: Timeout +# Spend no more than Timeout seconds on processing +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=/usr/local/etc/zabbix_agent.userparams.conf +# Include=/usr/local/etc/zabbix_agent.conf.d/ + +####### USER-DEFINED MONITORED PARAMETERS ####### + +### Option: UnsafeUserParameters +# Allow all characters to be passed in arguments to user-defined parameters. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Default: +# UnsafeUserParameters=0 + +### Option: UserParameter +# User-defined parameter to monitor. There can be several user-defined parameters. +# Format: UserParameter=, +# See 'zabbix_agentd' directory for examples. +# +# Mandatory: no +# Default: +# UserParameter= + +####### LOADABLE MODULES ####### + +### Option: LoadModulePath +# Full path to location of agent modules. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# LoadModulePath=${libdir}/modules + +### Option: LoadModule +# Module to load at agent startup. Modules are used to extend functionality of the agent. +# Format: LoadModule= +# The modules must be located in directory specified by LoadModulePath. +# It is allowed to include multiple LoadModule parameters. +# +# Mandatory: no +# Default: +# LoadModule= diff --git a/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf b/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf new file mode 100644 index 0000000..4d49d36 --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/zabbix_agentd.conf @@ -0,0 +1,278 @@ +# This is a config file for the Zabbix agent daemon (Unix) +# To get more information about Zabbix, visit http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +### Option: PidFile +# Name of PID file. +# +# Mandatory: no +# Default: +PidFile=/run/zabbix/zabbix_agentd.pid + +### Option: LogFile +# Name of log file. +# If not set, syslog is used. +# +# Mandatory: no +# Default: +# LogFile= + +LogFile=/var/log/zabbix/zabbix_agentd.log + +### Option: LogFileSize +# Maximum size of log file in MB. +# 0 - disable automatic log rotation. +# +# Mandatory: no +# Range: 0-1024 +# Default: +LogFileSize=128 + +### Option: DebugLevel +# Specifies debug level +# 0 - no debug +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# +# Mandatory: no +# Range: 0-4 +# Default: +# DebugLevel=3 + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +### Option: EnableRemoteCommands +# Whether remote commands from Zabbix server are allowed. +# 0 - not allowed +# 1 - allowed +# +# Mandatory: no +# Default: +# EnableRemoteCommands=0 + +### Option: LogRemoteCommands +# Enable logging of executed shell commands as warnings. +# 0 - disabled +# 1 - enabled +# +# Mandatory: no +# Default: +# LogRemoteCommands=0 + +##### Passive checks related + +### Option: Server +# List of comma delimited IP addresses (or hostnames) of Zabbix servers. +# Incoming connections will be accepted only from the hosts listed here. +# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally. +# +# Mandatory: no +# Default: +# Server= + +Server=127.0.0.1 + +### Option: ListenPort +# Agent will listen on this port for connections from the server. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10050 + +### Option: ListenIP +# List of comma delimited IP addresses that the agent should listen on. +# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +### Option: StartAgents +# Number of pre-forked instances of zabbix_agentd that process passive checks. +# If set to 0, disables passive checks and the agent will not listen on any TCP port. +# +# Mandatory: no +# Range: 0-100 +# Default: +# StartAgents=3 + +##### Active checks related + +### Option: ServerActive +# List of comma delimited IP:port (or hostname:port) pairs of Zabbix servers for active checks. +# If port is not specified, default port is used. +# IPv6 addresses must be enclosed in square brackets if port for that host is specified. +# If port is not specified, square brackets for IPv6 addresses are optional. +# If this parameter is not specified, active checks are disabled. +# Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] +# +# Mandatory: no +# Default: +# ServerActive= + +ServerActive=127.0.0.1 + +### Option: Hostname +# Unique, case sensitive hostname. +# Required for active checks and must match hostname as configured on the server. +# Value is acquired from HostnameItem if undefined. +# +# Mandatory: no +# Default: +# Hostname= + +Hostname=Zabbix server + +### Option: HostnameItem +# Item used for generating Hostname if it is undefined. +# Ignored if Hostname is defined. +# +# Mandatory: no +# Default: +# HostnameItem=system.hostname + +### Option: HostMetadata +# Optional parameter that defines host metadata. +# Host metadata is used at host auto-registration process. +# An agent will issue an error and not start if the value is over limit of 255 characters. +# If not defined, value will be acquired from HostMetadataItem. +# +# Mandatory: no +# Range: 0-255 characters +# Default: +# HostMetadata= + +### Option: HostMetadataItem +# Optional parameter that defines an item used for getting host metadata. +# Host metadata is used at host auto-registration process. +# During an auto-registration request an agent will log a warning message if +# the value returned by specified item is over limit of 255 characters. +# This option is only used when HostMetadata is not defined. +# +# Mandatory: no +# Default: +# HostMetadataItem= + +### Option: RefreshActiveChecks +# How often list of active checks is refreshed, in seconds. +# +# Mandatory: no +# Range: 60-3600 +# Default: +# RefreshActiveChecks=120 + +### Option: BufferSend +# Do not keep data longer than N seconds in buffer. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# BufferSend=5 + +### Option: BufferSize +# Maximum number of values in a memory buffer. The agent will send +# all collected data to Zabbix Server or Proxy if the buffer is full. +# +# Mandatory: no +# Range: 2-65535 +# Default: +# BufferSize=100 + +### Option: MaxLinesPerSecond +# Maximum number of new lines the agent will send per second to Zabbix Server +# or Proxy processing 'log' and 'logrt' active checks. +# The provided value will be overridden by the parameter 'maxlines', +# provided in 'log' or 'logrt' item keys. +# +# Mandatory: no +# Range: 1-1000 +# Default: +# MaxLinesPerSecond=100 + +############ ADVANCED PARAMETERS ################# + +### Option: Alias +# Sets an alias for parameter. It can be useful to substitute long and complex parameter name with a smaller and simpler one. +# +# Mandatory: no +# Range: +# Default: + +### Option: Timeout +# Spend no more than Timeout seconds on processing +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +### Option: AllowRoot +# Allow the agent to run as 'root'. If disabled and the agent is started by 'root', the agent +# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Default: +# AllowRoot=0 + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=/usr/local/etc/zabbix_agentd.userparams.conf +# Include=/usr/local/etc/zabbix_agentd.conf.d/ + +####### USER-DEFINED MONITORED PARAMETERS ####### + +### Option: UnsafeUserParameters +# Allow all characters to be passed in arguments to user-defined parameters. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Range: 0-1 +# Default: +# UnsafeUserParameters=0 + +### Option: UserParameter +# User-defined parameter to monitor. There can be several user-defined parameters. +# Format: UserParameter=, +# See 'zabbix_agentd' directory for examples. +# +# Mandatory: no +# Default: +# UserParameter= + +####### LOADABLE MODULES ####### + +### Option: LoadModulePath +# Full path to location of agent modules. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# LoadModulePath=${libdir}/modules + +### Option: LoadModule +# Module to load at agent startup. Modules are used to extend functionality of the agent. +# Format: LoadModule= +# The modules must be located in directory specified by LoadModulePath. +# It is allowed to include multiple LoadModule parameters. +# +# Mandatory: no +# Default: +# LoadModule= diff --git a/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf b/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf new file mode 100644 index 0000000..d4bae2e --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/zabbix_proxy.conf @@ -0,0 +1,519 @@ +# This is a configuration file for Zabbix Proxy process +# To get more information about Zabbix, +# visit http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +### Option: ProxyMode +# Proxy operating mode +# 0 - proxy in the active mode +# 1 - proxy in the passive mode +# +# Mandatory: no +# Default: +# ProxyMode=0 + +### Option: Server +# IP address (or hostname) of Zabbix server. +# Active proxy will get configuration data from the server. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: yes (if ProxyMode is set to 0) +# Default: +# Server= + +Server=127.0.0.1 + +### Option: ServerPort +# Port of Zabbix trapper on Zabbix server. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ServerPort=10051 + +### Option: Hostname +# Unique, case sensitive Proxy name. Make sure the Proxy name is known to the server! +# Value is acquired from HostnameItem if undefined. +# +# Mandatory: no +# Default: +# Hostname= + +Hostname=Zabbix proxy + +### Option: HostnameItem +# Item used for generating Hostname if it is undefined. +# Ignored if Hostname is defined. +# +# Mandatory: no +# Default: +# HostnameItem=system.hostname + +### Option: ListenPort +# Listen port for trapper. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10051 + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +### Option: LogFile +# Name of log file. +# If not set, syslog is used. +# +# Mandatory: no +# Default: +# LogFile= + +LogFile=/var/log/zabbix/zabbix_proxy.log + +### Option: LogFileSize +# Maximum size of log file in MB. +# 0 - disable automatic log rotation. +# +# Mandatory: no +# Range: 0-1024 +# Default: +LogFileSize=128 + +### Option: DebugLevel +# Specifies debug level +# 0 - no debug +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# +# Mandatory: no +# Range: 0-4 +# Default: +# DebugLevel=3 + +### Option: PidFile +# Name of PID file. +# +# Mandatory: no +# Default: +PidFile=/run/zabbix/zabbix_proxy.pid + +### Option: DBHost +# Database host name. +# If set to localhost, socket is used for MySQL. +# If set to empty string, socket is used for PostgreSQL. +# +# Mandatory: no +# Default: +# DBHost=localhost + +### Option: DBName +# Database name. +# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. +# Warning: do not attempt to use the same database Zabbix server is using. +# +# Mandatory: yes +# Default: +# DBName= + +DBName=zabbix_proxy + +### Option: DBSchema +# Schema name. Used for IBM DB2. +# +# Mandatory: no +# Default: +# DBSchema= + +### Option: DBUser +# Database user. Ignored for SQLite. +# +# Default: +# DBUser= + +DBUser=root + +### Option: DBPassword +# Database password. Ignored for SQLite. +# Comment this line if no password is used. +# +# Mandatory: no +# Default: +# DBPassword= + +### Option: DBSocket +# Path to MySQL socket. +# +# Mandatory: no +# Default: +# DBSocket=/tmp/mysql.sock + +# Option: DBPort +# Database port when not using local socket. Ignored for SQLite. +# +# Mandatory: no +# Default (for MySQL): +# DBPort=3306 + +######### PROXY SPECIFIC PARAMETERS ############# + +### Option: ProxyLocalBuffer +# Proxy will keep data locally for N hours, even if the data have already been synced with the server. +# This parameter may be used if local data will be used by third party applications. +# +# Mandatory: no +# Range: 0-720 +# Default: +# ProxyLocalBuffer=0 + +### Option: ProxyOfflineBuffer +# Proxy will keep data for N hours in case if no connectivity with Zabbix Server. +# Older data will be lost. +# +# Mandatory: no +# Range: 1-720 +# Default: +# ProxyOfflineBuffer=1 + +### Option: HeartbeatFrequency +# Frequency of heartbeat messages in seconds. +# Used for monitoring availability of Proxy on server side. +# 0 - heartbeat messages disabled. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 0-3600 +# Default: +# HeartbeatFrequency=60 + +### Option: ConfigFrequency +# How often proxy retrieves configuration data from Zabbix Server in seconds. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1-3600*24*7 +# Default: +# ConfigFrequency=3600 + +### Option: DataSenderFrequency +# Proxy will send collected data to the Server every N seconds. +# For a proxy in the passive mode this parameter will be ignored. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# DataSenderFrequency=1 + +############ ADVANCED PARAMETERS ################ + +### Option: StartPollers +# Number of pre-forked instances of pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollers=5 + +### Option: StartIPMIPollers +# Number of pre-forked instances of IPMI pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartIPMIPollers=0 + +### Option: StartPollersUnreachable +# Number of pre-forked instances of pollers for unreachable hosts (including IPMI). +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollersUnreachable=1 + +### Option: StartTrappers +# Number of pre-forked instances of trappers. +# Trappers accept incoming connections from Zabbix sender and active agents. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartTrappers=5 + +### Option: StartPingers +# Number of pre-forked instances of ICMP pingers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPingers=1 + +### Option: StartDiscoverers +# Number of pre-forked instances of discoverers. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartDiscoverers=1 + +### Option: StartHTTPPollers +# Number of pre-forked instances of HTTP pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartHTTPPollers=1 + +### Option: JavaGateway +# IP address (or hostname) of Zabbix Java gateway. +# Only required if Java pollers are started. +# +# Mandatory: no +# Default: +# JavaGateway= + +### Option: JavaGatewayPort +# Port that Zabbix Java gateway listens on. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# JavaGatewayPort=10052 + +### Option: StartJavaPollers +# Number of pre-forked instances of Java pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartJavaPollers=0 + +### Option: StartVMwareCollectors +# Number of pre-forked vmware collector instances. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartVMwareCollectors=0 + +### Option: VMwareFrequency +# How often Zabbix will connect to VMware service to obtain a new data. +# +# Mandatory: no +# Range: 10-86400 +# Default: +# VMwareFrequency=60 + +### Option: VMwareCacheSize +# Size of VMware cache, in bytes. +# Shared memory size for storing VMware data. +# Only used if VMware collectors are started. +# +# Mandatory: no +# Range: 256K-2G +# Default: +# VMwareCacheSize=8M + +### Option: SNMPTrapperFile +# Temporary file used for passing data from SNMP trap daemon to the proxy. +# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file. +# +# Mandatory: no +# Default: +# SNMPTrapperFile=/tmp/zabbix_traps.tmp + +### Option: StartSNMPTrapper +# If 1, SNMP trapper process is started. +# +# Mandatory: no +# Range: 0-1 +# Default: +# StartSNMPTrapper=0 + +### Option: ListenIP +# List of comma delimited IP addresses that the trapper should listen on. +# Trapper will listen on all network interfaces if this parameter is missing. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +### Option: HousekeepingFrequency +# How often Zabbix will perform housekeeping procedure (in hours). +# Housekeeping is removing unnecessary information from history, alert, and alarms tables. +# +# Mandatory: no +# Range: 1-24 +# Default: +# HousekeepingFrequency=1 + +### Option: CacheSize +# Size of configuration cache, in bytes. +# Shared memory size, for storing hosts and items data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# CacheSize=8M + +### Option: StartDBSyncers +# Number of pre-forked instances of DB Syncers +# +# Mandatory: no +# Range: 1-100 +# Default: +# StartDBSyncers=4 + +### Option: HistoryCacheSize +# Size of history cache, in bytes. +# Shared memory size for storing history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryCacheSize=8M + +### Option: HistoryTextCacheSize +# Size of text history cache, in bytes. +# Shared memory size for storing character, text or log history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryTextCacheSize=16M + +### Option: Timeout +# Specifies how long we wait for agent, SNMP device or external check (in seconds). +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +### Option: TrapperTimeout +# Specifies how many seconds trapper may spend processing new data. +# +# Mandatory: no +# Range: 1-300 +# Default: +# TrapperTimeout=300 + +### Option: UnreachablePeriod +# After how many seconds of unreachability treat a host as unavailable. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachablePeriod=45 + +### Option: UnavailableDelay +# How often host is checked for availability during the unavailability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnavailableDelay=60 + +### Option: UnreachableDelay +# How often host is checked for availability during the unreachability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachableDelay=15 + +### Option: ExternalScripts +# Full path to location of external scripts. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# ExternalScripts=${datadir}/zabbix/externalscripts + +### Option: FpingLocation +# Location of fping. +# Make sure that fping binary has root ownership and SUID flag set. +# +# Mandatory: no +# Default: +# FpingLocation=/usr/sbin/fping + +### Option: Fping6Location +# Location of fping6. +# Make sure that fping6 binary has root ownership and SUID flag set. +# Make empty if your fping utility is capable to process IPv6 addresses. +# +# Mandatory: no +# Default: +# Fping6Location=/usr/sbin/fping6 + +### Option: SSHKeyLocation +# Location of public and private keys for SSH checks and actions. +# +# Mandatory: no +# Default: +# SSHKeyLocation= + +### Option: LogSlowQueries +# How long a database query may take before being logged (in milliseconds). +# Only works if DebugLevel set to 3 or 4. +# 0 - don't log slow queries. +# +# Mandatory: no +# Range: 1-3600000 +# Default: +# LogSlowQueries=0 + +### Option: TmpDir +# Temporary directory. +# +# Mandatory: no +# Default: +# TmpDir=/tmp + +### Option: AllowRoot +# Allow the proxy to run as 'root'. If disabled and the proxy is started by 'root', the proxy +# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Default: +# AllowRoot=0 + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=/usr/local/etc/zabbix_proxy.general.conf +# Include=/usr/local/etc/zabbix_proxy.conf.d/ + +####### LOADABLE MODULES ####### + +### Option: LoadModulePath +# Full path to location of proxy modules. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# LoadModulePath=${libdir}/modules + +### Option: LoadModule +# Module to load at proxy startup. Modules are used to extend functionality of the proxy. +# Format: LoadModule= +# The modules must be located in directory specified by LoadModulePath. +# It is allowed to include multiple LoadModule parameters. +# +# Mandatory: no +# Default: +# LoadModule= diff --git a/net-analyzer/zabbix/files/2.2/zabbix_server.conf b/net-analyzer/zabbix/files/2.2/zabbix_server.conf new file mode 100644 index 0000000..caba019 --- /dev/null +++ b/net-analyzer/zabbix/files/2.2/zabbix_server.conf @@ -0,0 +1,546 @@ +# This is a configuration file for Zabbix Server process +# To get more information about Zabbix, +# visit http://www.zabbix.com + +############ GENERAL PARAMETERS ################# + +### Option: NodeID +# Unique NodeID in distributed setup. +# 0 - standalone server +# +# Mandatory: no +# Range: 0-999 +# Default: +# NodeID=0 + +### Option: ListenPort +# Listen port for trapper. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10051 + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +### Option: LogFile +# Name of log file. +# If not set, syslog is used. +# +# Mandatory: no +# Default: +# LogFile= + +LogFile=/var/log/zabbix/zabbix_server.log + +### Option: LogFileSize +# Maximum size of log file in MB. +# 0 - disable automatic log rotation. +# +# Mandatory: no +# Range: 0-1024 +# Default: +LogFileSize=128 + +### Option: DebugLevel +# Specifies debug level +# 0 - no debug +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# +# Mandatory: no +# Range: 0-4 +# Default: +# DebugLevel=3 + +### Option: PidFile +# Name of PID file. +# +# Mandatory: no +# Default: +PidFile=/run/zabbix/zabbix_server.pid + +### Option: DBHost +# Database host name. +# If set to localhost, socket is used for MySQL. +# If set to empty string, socket is used for PostgreSQL. +# +# Mandatory: no +# Default: +# DBHost=localhost + +### Option: DBName +# Database name. +# For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored. +# +# Mandatory: yes +# Default: +# DBName= + +DBName=zabbix + +### Option: DBSchema +# Schema name. Used for IBM DB2. +# +# Mandatory: no +# Default: +# DBSchema= + +### Option: DBUser +# Database user. Ignored for SQLite. +# +# Mandatory: no +# Default: +# DBUser= + +DBUser=root + +### Option: DBPassword +# Database password. Ignored for SQLite. +# Comment this line if no password is used. +# +# Mandatory: no +# Default: +# DBPassword= + +### Option: DBSocket +# Path to MySQL socket. +# +# Mandatory: no +# Default: +# DBSocket=/tmp/mysql.sock + +### Option: DBPort +# Database port when not using local socket. Ignored for SQLite. +# +# Mandatory: no +# Range: 1024-65535 +# Default (for MySQL): +# DBPort=3306 + +############ ADVANCED PARAMETERS ################ + +### Option: StartPollers +# Number of pre-forked instances of pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollers=5 + +### Option: StartIPMIPollers +# Number of pre-forked instances of IPMI pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartIPMIPollers=0 + +### Option: StartPollersUnreachable +# Number of pre-forked instances of pollers for unreachable hosts (including IPMI). +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPollersUnreachable=1 + +### Option: StartTrappers +# Number of pre-forked instances of trappers. +# Trappers accept incoming connections from Zabbix sender, active agents, active proxies and child nodes. +# At least one trapper process must be running to display server availability in the frontend. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartTrappers=5 + +### Option: StartPingers +# Number of pre-forked instances of ICMP pingers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartPingers=1 + +### Option: StartDiscoverers +# Number of pre-forked instances of discoverers. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartDiscoverers=1 + +### Option: StartHTTPPollers +# Number of pre-forked instances of HTTP pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartHTTPPollers=1 + +### Option: StartTimers +# Number of pre-forked instances of timers. +# Timers process time-based trigger functions and maintenance periods. +# Only the first timer process handles the maintenance periods. +# +# Mandatory: no +# Range: 1-1000 +# Default: +# StartTimers=1 + +### Option: JavaGateway +# IP address (or hostname) of Zabbix Java gateway. +# Only required if Java pollers are started. +# +# Mandatory: no +# Default: +# JavaGateway= + +### Option: JavaGatewayPort +# Port that Zabbix Java gateway listens on. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# JavaGatewayPort=10052 + +### Option: StartJavaPollers +# Number of pre-forked instances of Java pollers. +# +# Mandatory: no +# Range: 0-1000 +# Default: +# StartJavaPollers=0 + +### Option: StartVMwareCollectors +# Number of pre-forked vmware collector instances. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartVMwareCollectors=0 + +### Option: VMwareFrequency +# How often Zabbix will connect to VMware service to obtain a new data. +# +# Mandatory: no +# Range: 10-86400 +# Default: +# VMwareFrequency=60 + +### Option: VMwareCacheSize +# Size of VMware cache, in bytes. +# Shared memory size for storing VMware data. +# Only used if VMware collectors are started. +# +# Mandatory: no +# Range: 256K-2G +# Default: +# VMwareCacheSize=8M + +### Option: SNMPTrapperFile +# Temporary file used for passing data from SNMP trap daemon to the server. +# Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file. +# +# Mandatory: no +# Default: +# SNMPTrapperFile=/tmp/zabbix_traps.tmp + +### Option: StartSNMPTrapper +# If 1, SNMP trapper process is started. +# +# Mandatory: no +# Range: 0-1 +# Default: +# StartSNMPTrapper=0 + +### Option: ListenIP +# List of comma delimited IP addresses that the trapper should listen on. +# Trapper will listen on all network interfaces if this parameter is missing. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +# ListenIP=127.0.0.1 + +### Option: HousekeepingFrequency +# How often Zabbix will perform housekeeping procedure (in hours). +# Housekeeping is removing unnecessary information from history, alert, and alarms tables. +# +# Mandatory: no +# Range: 1-24 +# Default: +# HousekeepingFrequency=1 + +### Option: MaxHousekeeperDelete +# The table "housekeeper" contains "tasks" for housekeeping procedure in the format: +# [housekeeperid], [tablename], [field], [value]. +# No more than 'MaxHousekeeperDelete' rows (corresponding to [tablename], [field], [value]) +# will be deleted per one task in one housekeeping cycle. +# SQLite3 does not use this parameter, deletes all corresponding rows without a limit. +# If set to 0 then no limit is used at all. In this case you must know what you are doing! +# +# Mandatory: no +# Range: 0-1000000 +# Default: +# MaxHousekeeperDelete=500 + +### Option: SenderFrequency +# How often Zabbix will try to send unsent alerts (in seconds). +# +# Mandatory: no +# Range: 5-3600 +# Default: +# SenderFrequency=30 + +### Option: CacheSize +# Size of configuration cache, in bytes. +# Shared memory size for storing host, item and trigger data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# CacheSize=8M + +### Option: CacheUpdateFrequency +# How often Zabbix will perform update of configuration cache, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# CacheUpdateFrequency=60 + +### Option: StartDBSyncers +# Number of pre-forked instances of DB Syncers +# +# Mandatory: no +# Range: 1-100 +# Default: +# StartDBSyncers=4 + +### Option: HistoryCacheSize +# Size of history cache, in bytes. +# Shared memory size for storing history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryCacheSize=8M + +### Option: TrendCacheSize +# Size of trend cache, in bytes. +# Shared memory size for storing trends data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# TrendCacheSize=4M + +### Option: HistoryTextCacheSize +# Size of text history cache, in bytes. +# Shared memory size for storing character, text or log history data. +# +# Mandatory: no +# Range: 128K-2G +# Default: +# HistoryTextCacheSize=16M + +### Option: ValueCacheSize +# Size of history value cache, in bytes. +# Shared memory size for caching item history data requests +# Setting to 0 disables value cache. +# +# Mandatory: no +# Range: 0,128K-64G +# Default: +# ValueCacheSize=8M + +### Option: NodeNoEvents +# If set to '1' local events won't be sent to master node. +# This won't impact ability of this node to propagate events from its child nodes. +# +# Mandatory: no +# Range: 0-1 +# Default: +# NodeNoEvents=0 + +### Option: NodeNoHistory +# If set to '1' local history won't be sent to master node. +# This won't impact ability of this node to propagate history from its child nodes. +# +# Mandatory: no +# Range: 0-1 +# Default: +# NodeNoHistory=0 + +### Option: Timeout +# Specifies how long we wait for agent, SNMP device or external check (in seconds). +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +### Option: TrapperTimeout +# Specifies how many seconds trapper may spend processing new data. +# +# Mandatory: no +# Range: 1-300 +# Default: +# TrapperTimeout=300 + +### Option: UnreachablePeriod +# After how many seconds of unreachability treat a host as unavailable. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachablePeriod=45 + +### Option: UnavailableDelay +# How often host is checked for availability during the unavailability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnavailableDelay=60 + +### Option: UnreachableDelay +# How often host is checked for availability during the unreachability period, in seconds. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# UnreachableDelay=15 + +### Option: AlertScriptsPath +# Full path to location of custom alert scripts. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +AlertScriptsPath=/var/lib/zabbix/alertscripts + +### Option: ExternalScripts +# Full path to location of external scripts. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +ExternalScripts=/var/lib/zabbix/externalscripts + +### Option: FpingLocation +# Location of fping. +# Make sure that fping binary has root ownership and SUID flag set. +# +# Mandatory: no +# Default: +# FpingLocation=/usr/sbin/fping + +### Option: Fping6Location +# Location of fping6. +# Make sure that fping6 binary has root ownership and SUID flag set. +# Make empty if your fping utility is capable to process IPv6 addresses. +# +# Mandatory: no +# Default: +# Fping6Location=/usr/sbin/fping6 + +### Option: SSHKeyLocation +# Location of public and private keys for SSH checks and actions. +# +# Mandatory: no +# Default: +# SSHKeyLocation= + +### Option: LogSlowQueries +# How long a database query may take before being logged (in milliseconds). +# Only works if DebugLevel set to 3 or 4. +# 0 - don't log slow queries. +# +# Mandatory: no +# Range: 1-3600000 +# Default: +# LogSlowQueries=0 + +### Option: TmpDir +# Temporary directory. +# +# Mandatory: no +# Default: +# TmpDir=/tmp + +### Option: StartProxyPollers +# Number of pre-forked instances of pollers for passive proxies. +# +# Mandatory: no +# Range: 0-250 +# Default: +# StartProxyPollers=1 + +### Option: ProxyConfigFrequency +# How often Zabbix Server sends configuration data to a Zabbix Proxy in seconds. +# This parameter is used only for proxies in the passive mode. +# +# Mandatory: no +# Range: 1-3600*24*7 +# Default: +# ProxyConfigFrequency=3600 + +### Option: ProxyDataFrequency +# How often Zabbix Server requests history data from a Zabbix Proxy in seconds. +# This parameter is used only for proxies in the passive mode. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# ProxyDataFrequency=1 + +### Option: AllowRoot +# Allow the server to run as 'root'. If disabled and the server is started by 'root', the server +# will try to switch to user 'zabbix' instead. Has no effect if started under a regular user. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Default: +# AllowRoot=0 + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=/usr/local/etc/zabbix_server.general.conf +#Include=/etc/zabbix/zabbix_server.conf.d/ + +####### LOADABLE MODULES ####### + +### Option: LoadModulePath +# Full path to location of server modules. +# Default depends on compilation options. +# +# Mandatory: no +# Default: +# LoadModulePath=${libdir}/modules + +### Option: LoadModule +# Module to load at server startup. Modules are used to extend functionality of the server. +# Format: LoadModule= +# The modules must be located in directory specified by LoadModulePath. +# It is allowed to include multiple LoadModule parameters. +# +# Mandatory: no +# Default: +# LoadModule= diff --git a/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch b/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch new file mode 100644 index 0000000..254634d --- /dev/null +++ b/net-analyzer/zabbix/files/zabbix-1.8.9-as-needed.patch @@ -0,0 +1,83 @@ +From 90b086b4daebf61756e3d6f8926cf8951a2fc96a Mon Sep 17 00:00:00 2001 +From: Vladimir V. Kamarzin +Date: Fri, 22 Oct 2010 17:47:01 +0600 +Subject: [PATCH 1/2] Fix linking with ldap libs + +Move "-lldap -llber" from LDAP_LDFLAGS to LDAP_LIBS and include them to +LIBS +--- + configure.in | 1 + + m4/ldap.m4 | 4 +++- + 2 files changed, 4 insertions(+), 1 deletions(-) + +diff --git a/configure.in b/configure.in +index d3d981b..b11b2ee 100644 +--- a/configure.in ++++ b/configure.in +@@ -1281,6 +1281,7 @@ if test "x$want_ldap" = "xyes"; then + fi + CFLAGS="${CFLAGS} ${LDAP_CPPFLAGS}" + SERVER_LDFLAGS="${SERVER_LDFLAGS} ${LDAP_LDFLAGS}" ++LIBS="${LIBS} ${LDAP_LIBS}" + PROXY_LDFLAGS="${PROXY_LDFLAGS} ${LDAP_LDFLAGS}" + AGENT_LDFLAGS="${AGENT_LDFLAGS} ${LDAP_LDFLAGS}" + + found_iconv="no" + dnl Check for libiconv [by default - skip] +diff --git a/m4/ldap.m4 b/m4/ldap.m4 +index 29e97cd..885b3e0 100644 +--- a/m4/ldap.m4 ++++ b/m4/ldap.m4 +@@ -72,7 +72,8 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:> + fi + + LDAP_CPPFLAGS=-I$LDAP_INCDIR +- LDAP_LDFLAGS="-L$LDAP_LIBDIR -lldap -llber $LDAP_LIBS" ++ LDAP_LDFLAGS="-L$LDAP_LIBDIR $LDAP_LIBS" ++ LDAP_LIBS="-lldap -llber $LDAP_LIBS" + + found_ldap="yes" + AC_DEFINE(HAVE_LDAP,1,[Define to 1 if LDAP should be enabled.]) +@@ -92,6 +93,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:> + + AC_SUBST(LDAP_CPPFLAGS) + AC_SUBST(LDAP_LDFLAGS) ++ AC_SUBST(LDAP_LIBS) + + unset _libldap_with + ])dnl +-- +1.7.3.1 + +From f6378e6aeb0bec1883a83c70c8cdfd1213f11f97 Mon Sep 17 00:00:00 2001 +From: Vladimir V. Kamarzin +Date: Fri, 22 Oct 2010 17:49:16 +0600 +Subject: [PATCH 2/2] m4/ax_lib_postgresql.m4: move -pq from POSTGRESQL_LDFLAGS to POSTGRESQL_LIBS + +--- + m4/ax_lib_postgresql.m4 | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/m4/ax_lib_postgresql.m4 b/m4/ax_lib_postgresql.m4 +index fe06f66..934d12c 100644 +--- a/m4/ax_lib_postgresql.m4 ++++ b/m4/ax_lib_postgresql.m4 +@@ -84,7 +84,8 @@ AC_DEFUN([AX_LIB_POSTGRESQL], + AC_MSG_CHECKING([for PostgreSQL libraries]) + + POSTGRESQL_CPPFLAGS="-I`$PG_CONFIG --includedir`" +- POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir` -lpq" ++ POSTGRESQL_LDFLAGS="-L`$PG_CONFIG --libdir`" ++ POSTGRESQL_LIBS="-lpq" + + POSTGRESQL_VERSION=`$PG_CONFIG --version | sed -e 's#PostgreSQL ##'` + +@@ -179,4 +180,5 @@ PQserverVersion(conn); + AC_SUBST([POSTGRESQL_VERSION]) + AC_SUBST([POSTGRESQL_CPPFLAGS]) + AC_SUBST([POSTGRESQL_LDFLAGS]) ++ AC_SUBST([POSTGRESQL_LIBS]) + ]) +-- +1.7.3.1 +