Merge pull request #21 from zabbix/master

Updated documentation. Added modified snmptrapfmt package to snmptrap…
This commit is contained in:
Alexey Pustovalov 2016-08-11 13:58:39 +03:00 committed by GitHub
commit 2161041fc2
27 changed files with 226 additions and 43 deletions

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -98,7 +98,7 @@ This variable is port of MySQL server. By default, value is '3306'.
### `MYSQL_USER`, `MYSQL_PASSWORD` ### `MYSQL_USER`, `MYSQL_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix proxy to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `MYSQL_DATABASE` ### `MYSQL_DATABASE`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -98,7 +98,7 @@ This variable is port of MySQL server. By default, value is '3306'.
### `MYSQL_USER`, `MYSQL_PASSWORD` ### `MYSQL_USER`, `MYSQL_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix proxy to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `MYSQL_DATABASE` ### `MYSQL_DATABASE`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -68,7 +68,7 @@ This variable is port of MySQL server. By default, value is '3306'.
### `MYSQL_USER`, `MYSQL_PASSWORD` ### `MYSQL_USER`, `MYSQL_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix server to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `MYSQL_DATABASE` ### `MYSQL_DATABASE`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -68,7 +68,7 @@ This variable is port of MySQL server. By default, value is '3306'.
### `MYSQL_USER`, `MYSQL_PASSWORD` ### `MYSQL_USER`, `MYSQL_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix server to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `MYSQL_DATABASE` ### `MYSQL_DATABASE`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -67,7 +67,7 @@ This variable is port of PostgreSQL server. By default, value is '5432'.
### `POSTGRES_USER`, `POSTGRES_PASSWORD` ### `POSTGRES_USER`, `POSTGRES_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix server to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `POSTGRES_DB` ### `POSTGRES_DB`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -67,7 +67,7 @@ This variable is port of PostgreSQL server. By default, value is '5432'.
### `POSTGRES_USER`, `POSTGRES_PASSWORD` ### `POSTGRES_USER`, `POSTGRES_PASSWORD`
These variables are used by Zabbix web interface to connect to Zabbix database. By default, values are `zabbix`, `zabbix`. These variables are used by Zabbix server to connect to Zabbix database. By default, values are `zabbix`, `zabbix`.
### `POSTGRES_DB` ### `POSTGRES_DB`

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -7,6 +7,8 @@ ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends"
ARG DB_TYPE=mysql ARG DB_TYPE=mysql
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive TERM=xterm
ADD snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb /tmp/
RUN locale-gen $LC_ALL && \ RUN locale-gen $LC_ALL && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \ DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
@ -21,8 +23,8 @@ RUN locale-gen $LC_ALL && \
apt-get ${APT_FLAGS_PERSISTANT} install \ apt-get ${APT_FLAGS_PERSISTANT} install \
supervisor \ supervisor \
snmpd \ snmpd \
snmptrapfmt \
snmp-mibs-downloader && \ snmp-mibs-downloader && \
dpkg -i /tmp/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
mkdir -p /var/lib/zabbix/snmptraps && \ mkdir -p /var/lib/zabbix/snmptraps && \
mkdir -p /var/lib/zabbix/mibs && \ mkdir -p /var/lib/zabbix/mibs && \
@ -34,6 +36,7 @@ RUN locale-gen $LC_ALL && \
-e '/^LOGFMT=/s/=.*/=\"$x ZBXTRAP $R $G $S $e $*\"/' \ -e '/^LOGFMT=/s/=.*/=\"$x ZBXTRAP $R $G $S $e $*\"/' \
-e "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \ -e "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \
"/etc/snmp/snmptrapfmt.conf" && \ "/etc/snmp/snmptrapfmt.conf" && \
rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb && \
apt-get ${APT_FLAGS_COMMON} autoremove && \ apt-get ${APT_FLAGS_COMMON} autoremove && \
apt-get ${APT_FLAGS_COMMON} clean && \ apt-get ${APT_FLAGS_COMMON} clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

Binary file not shown.

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"

View File

@ -2,6 +2,7 @@
set +e set +e
# Script trace mode
if [ "${DEBUG_MODE}" == "true" ]; then if [ "${DEBUG_MODE}" == "true" ]; then
set -o xtrace set -o xtrace
fi fi
@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"}
# Default Zabbix server port number # Default Zabbix server port number
ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"}
# Default timezone for web interface
TZ=${TZ:-"Europe/Riga"} TZ=${TZ:-"Europe/Riga"}
# Default directories # Default directories
# User 'zabbix' home directory
ZABBIX_USER_HOME_DIR="/var/lib/zabbix" ZABBIX_USER_HOME_DIR="/var/lib/zabbix"
# Configuration files directory
ZABBIX_ETC_DIR="/etc/zabbix" ZABBIX_ETC_DIR="/etc/zabbix"
ZBX_SOURCES_PATH="/usr/src" # Web interface www-root directory
ZBX_SOURCES_DIR_NAME="zbx_sources"
ZBX_FRONTEND_PATH="/usr/share/zabbix" ZBX_FRONTEND_PATH="/usr/share/zabbix"
prepare_system() { prepare_system() {
@ -108,6 +111,7 @@ update_config_multiple_var() {
done done
} }
# Check prerequisites for MySQL database
check_variables_mysql() { check_variables_mysql() {
local type=$1 local type=$1
@ -147,6 +151,7 @@ check_variables_mysql() {
fi fi
} }
# Check prerequisites for PostgreSQL database
check_variables_postgresql() { check_variables_postgresql() {
local type=$1 local type=$1
@ -657,6 +662,7 @@ prepare_zbx_web_config() {
ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php"
# Different places of PHP configuration file
if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then
PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini"
elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then
@ -787,6 +793,7 @@ prepare_agent() {
echo "** Preparing Zabbix agent" echo "** Preparing Zabbix agent"
prepare_zbx_agent_config prepare_zbx_agent_config
} }
prepare_server() { prepare_server() {
local db_type=$1 local db_type=$1
@ -800,6 +807,7 @@ prepare_server() {
update_zbx_config "server" "$db_type" update_zbx_config "server" "$db_type"
} }
prepare_proxy() { prepare_proxy() {
local db_type=$1 local db_type=$1
@ -815,6 +823,7 @@ prepare_proxy() {
update_zbx_config "proxy" $db_type update_zbx_config "proxy" $db_type
} }
prepare_web() { prepare_web() {
local web_server=$1 local web_server=$1
local db_type=$2 local db_type=$2
@ -826,6 +835,7 @@ prepare_web() {
prepare_web_server_$web_server prepare_web_server_$web_server
prepare_zbx_web_config $db_type prepare_zbx_web_config $db_type
} }
prepare_java_gateway() { prepare_java_gateway() {
echo "** Preparing Zabbix Java Gateway" echo "** Preparing Zabbix Java Gateway"