diff --git a/agent/alpine/run_zabbix_component.sh b/agent/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/agent/alpine/run_zabbix_component.sh +++ b/agent/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/agent/ubuntu/run_zabbix_component.sh b/agent/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/agent/ubuntu/run_zabbix_component.sh +++ b/agent/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/java-gateway/alpine/run_zabbix_component.sh b/java-gateway/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/java-gateway/alpine/run_zabbix_component.sh +++ b/java-gateway/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/java-gateway/ubuntu/run_zabbix_component.sh b/java-gateway/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/java-gateway/ubuntu/run_zabbix_component.sh +++ b/java-gateway/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/proxy-mysql/alpine/README.md b/proxy-mysql/alpine/README.md index 2d7837042..25cd1383d 100644 --- a/proxy-mysql/alpine/README.md +++ b/proxy-mysql/alpine/README.md @@ -98,7 +98,7 @@ This variable is port of MySQL server. By default, value is '3306'. ### `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` diff --git a/proxy-mysql/alpine/run_zabbix_component.sh b/proxy-mysql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/proxy-mysql/alpine/run_zabbix_component.sh +++ b/proxy-mysql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/proxy-mysql/ubuntu/README.md b/proxy-mysql/ubuntu/README.md index 2d7837042..25cd1383d 100644 --- a/proxy-mysql/ubuntu/README.md +++ b/proxy-mysql/ubuntu/README.md @@ -98,7 +98,7 @@ This variable is port of MySQL server. By default, value is '3306'. ### `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` diff --git a/proxy-mysql/ubuntu/run_zabbix_component.sh b/proxy-mysql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/proxy-mysql/ubuntu/run_zabbix_component.sh +++ b/proxy-mysql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/proxy-sqlite3/alpine/run_zabbix_component.sh b/proxy-sqlite3/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/proxy-sqlite3/alpine/run_zabbix_component.sh +++ b/proxy-sqlite3/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/proxy-sqlite3/ubuntu/run_zabbix_component.sh b/proxy-sqlite3/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/proxy-sqlite3/ubuntu/run_zabbix_component.sh +++ b/proxy-sqlite3/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/server-mysql/alpine/README.md b/server-mysql/alpine/README.md index faf079282..d6130b6e6 100644 --- a/server-mysql/alpine/README.md +++ b/server-mysql/alpine/README.md @@ -68,7 +68,7 @@ This variable is port of MySQL server. By default, value is '3306'. ### `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` diff --git a/server-mysql/alpine/run_zabbix_component.sh b/server-mysql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/server-mysql/alpine/run_zabbix_component.sh +++ b/server-mysql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/server-mysql/ubuntu/README.md b/server-mysql/ubuntu/README.md index faf079282..d6130b6e6 100644 --- a/server-mysql/ubuntu/README.md +++ b/server-mysql/ubuntu/README.md @@ -68,7 +68,7 @@ This variable is port of MySQL server. By default, value is '3306'. ### `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` diff --git a/server-mysql/ubuntu/run_zabbix_component.sh b/server-mysql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/server-mysql/ubuntu/run_zabbix_component.sh +++ b/server-mysql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/server-pgsql/alpine/README.md b/server-pgsql/alpine/README.md index 0fc4362fd..2a6d20be7 100644 --- a/server-pgsql/alpine/README.md +++ b/server-pgsql/alpine/README.md @@ -67,7 +67,7 @@ This variable is port of PostgreSQL server. By default, value is '5432'. ### `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` diff --git a/server-pgsql/alpine/run_zabbix_component.sh b/server-pgsql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/server-pgsql/alpine/run_zabbix_component.sh +++ b/server-pgsql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/server-pgsql/ubuntu/README.md b/server-pgsql/ubuntu/README.md index 0fc4362fd..2a6d20be7 100644 --- a/server-pgsql/ubuntu/README.md +++ b/server-pgsql/ubuntu/README.md @@ -67,7 +67,7 @@ This variable is port of PostgreSQL server. By default, value is '5432'. ### `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` diff --git a/server-pgsql/ubuntu/run_zabbix_component.sh b/server-pgsql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/server-pgsql/ubuntu/run_zabbix_component.sh +++ b/server-pgsql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/snmptraps/ubuntu/Dockerfile b/snmptraps/ubuntu/Dockerfile index a96c83eac..cc6ce3588 100644 --- a/snmptraps/ubuntu/Dockerfile +++ b/snmptraps/ubuntu/Dockerfile @@ -7,6 +7,8 @@ ARG APT_FLAGS_DEV="${APT_FLAGS_COMMON} --no-install-recommends" 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 +ADD snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb /tmp/ + RUN locale-gen $LC_ALL && \ echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ 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 \ supervisor \ snmpd \ - snmptrapfmt \ snmp-mibs-downloader && \ + dpkg -i /tmp/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb && \ mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix/snmptraps && \ 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 "/^LOGFILE=/s/=.*/=\"\/var\/lib\/zabbix\/snmptraps\/snmptraps.log\"/" \ "/etc/snmp/snmptrapfmt.conf" && \ + rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb && \ apt-get ${APT_FLAGS_COMMON} autoremove && \ apt-get ${APT_FLAGS_COMMON} clean && \ rm -rf /var/lib/apt/lists/* diff --git a/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz b/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz new file mode 100644 index 000000000..a32e1053f Binary files /dev/null and b/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz differ diff --git a/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb b/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb new file mode 100644 index 000000000..c360deec2 Binary files /dev/null and b/snmptraps/ubuntu/snmptrapfmt_1.14+nmu1ubuntu2_amd64.deb differ diff --git a/web-apache-mysql/alpine/run_zabbix_component.sh b/web-apache-mysql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-apache-mysql/alpine/run_zabbix_component.sh +++ b/web-apache-mysql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/web-apache-mysql/ubuntu/run_zabbix_component.sh b/web-apache-mysql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-apache-mysql/ubuntu/run_zabbix_component.sh +++ b/web-apache-mysql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/web-nginx-mysql/alpine/run_zabbix_component.sh b/web-nginx-mysql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-nginx-mysql/alpine/run_zabbix_component.sh +++ b/web-nginx-mysql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/web-nginx-mysql/ubuntu/run_zabbix_component.sh b/web-nginx-mysql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-nginx-mysql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-mysql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/web-nginx-pgsql/alpine/run_zabbix_component.sh b/web-nginx-pgsql/alpine/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-nginx-pgsql/alpine/run_zabbix_component.sh +++ b/web-nginx-pgsql/alpine/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway" diff --git a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh index 993b1a6e9..b51cfd088 100755 --- a/web-nginx-pgsql/ubuntu/run_zabbix_component.sh +++ b/web-nginx-pgsql/ubuntu/run_zabbix_component.sh @@ -2,6 +2,7 @@ set +e +# Script trace mode if [ "${DEBUG_MODE}" == "true" ]; then set -o xtrace fi @@ -24,13 +25,15 @@ ZBX_SERVER_HOST=${ZBX_SERVER_HOST:-"zabbix-server"} # Default Zabbix server port number ZBX_SERVER_PORT=${ZBX_SERVER_PORT:-"10051"} +# Default timezone for web interface TZ=${TZ:-"Europe/Riga"} # Default directories +# User 'zabbix' home directory ZABBIX_USER_HOME_DIR="/var/lib/zabbix" +# Configuration files directory ZABBIX_ETC_DIR="/etc/zabbix" -ZBX_SOURCES_PATH="/usr/src" -ZBX_SOURCES_DIR_NAME="zbx_sources" +# Web interface www-root directory ZBX_FRONTEND_PATH="/usr/share/zabbix" prepare_system() { @@ -108,6 +111,7 @@ update_config_multiple_var() { done } +# Check prerequisites for MySQL database check_variables_mysql() { local type=$1 @@ -147,6 +151,7 @@ check_variables_mysql() { fi } +# Check prerequisites for PostgreSQL database check_variables_postgresql() { local type=$1 @@ -657,6 +662,7 @@ prepare_zbx_web_config() { 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 PHP_CONFIG_FILE="/etc/php5/conf.d/99-zabbix.ini" elif [ -f "/etc/php5/fpm/conf.d/99-zabbix.ini" ]; then @@ -787,6 +793,7 @@ prepare_agent() { echo "** Preparing Zabbix agent" prepare_zbx_agent_config } + prepare_server() { local db_type=$1 @@ -800,6 +807,7 @@ prepare_server() { update_zbx_config "server" "$db_type" } + prepare_proxy() { local db_type=$1 @@ -815,6 +823,7 @@ prepare_proxy() { update_zbx_config "proxy" $db_type } + prepare_web() { local web_server=$1 local db_type=$2 @@ -826,6 +835,7 @@ prepare_web() { prepare_web_server_$web_server prepare_zbx_web_config $db_type } + prepare_java_gateway() { echo "** Preparing Zabbix Java Gateway"