mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-11-08 17:04:31 +01:00
Automatic db file name for SQLite3 base proxy
This commit is contained in:
parent
eac4a90f46
commit
a706601495
@ -137,7 +137,13 @@ update_zbx_config() {
|
|||||||
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
||||||
|
|
||||||
update_config_var $ZBX_CONFIG "DBHost"
|
update_config_var $ZBX_CONFIG "DBHost"
|
||||||
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
: ${ZBX_USE_NODE_NAME_AS_DB_NAME:="false"}
|
||||||
|
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" == "false" ]; then
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
||||||
|
else
|
||||||
|
node_name=$(uname -n)
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/$node_name.sqlite"
|
||||||
|
fi
|
||||||
update_config_var $ZBX_CONFIG "DBUser"
|
update_config_var $ZBX_CONFIG "DBUser"
|
||||||
update_config_var $ZBX_CONFIG "DBPort"
|
update_config_var $ZBX_CONFIG "DBPort"
|
||||||
update_config_var $ZBX_CONFIG "DBPassword"
|
update_config_var $ZBX_CONFIG "DBPassword"
|
||||||
|
@ -137,7 +137,13 @@ update_zbx_config() {
|
|||||||
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
||||||
|
|
||||||
update_config_var $ZBX_CONFIG "DBHost"
|
update_config_var $ZBX_CONFIG "DBHost"
|
||||||
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
: ${ZBX_USE_NODE_NAME_AS_DB_NAME:="false"}
|
||||||
|
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" == "false" ]; then
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
||||||
|
else
|
||||||
|
node_name=$(uname -n)
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/$node_name.sqlite"
|
||||||
|
fi
|
||||||
update_config_var $ZBX_CONFIG "DBUser"
|
update_config_var $ZBX_CONFIG "DBUser"
|
||||||
update_config_var $ZBX_CONFIG "DBPort"
|
update_config_var $ZBX_CONFIG "DBPort"
|
||||||
update_config_var $ZBX_CONFIG "DBPassword"
|
update_config_var $ZBX_CONFIG "DBPassword"
|
||||||
|
@ -137,7 +137,13 @@ update_zbx_config() {
|
|||||||
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
||||||
|
|
||||||
update_config_var $ZBX_CONFIG "DBHost"
|
update_config_var $ZBX_CONFIG "DBHost"
|
||||||
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
: ${ZBX_USE_NODE_NAME_AS_DB_NAME:="false"}
|
||||||
|
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" == "false" ]; then
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
||||||
|
else
|
||||||
|
node_name=$(uname -n)
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/$node_name.sqlite"
|
||||||
|
fi
|
||||||
update_config_var $ZBX_CONFIG "DBUser"
|
update_config_var $ZBX_CONFIG "DBUser"
|
||||||
update_config_var $ZBX_CONFIG "DBPort"
|
update_config_var $ZBX_CONFIG "DBPort"
|
||||||
update_config_var $ZBX_CONFIG "DBPassword"
|
update_config_var $ZBX_CONFIG "DBPassword"
|
||||||
|
@ -137,7 +137,13 @@ update_zbx_config() {
|
|||||||
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
||||||
|
|
||||||
update_config_var $ZBX_CONFIG "DBHost"
|
update_config_var $ZBX_CONFIG "DBHost"
|
||||||
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
: ${ZBX_USE_NODE_NAME_AS_DB_NAME:="false"}
|
||||||
|
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" == "false" ]; then
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
||||||
|
else
|
||||||
|
node_name=$(uname -n)
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/$node_name.sqlite"
|
||||||
|
fi
|
||||||
update_config_var $ZBX_CONFIG "DBUser"
|
update_config_var $ZBX_CONFIG "DBUser"
|
||||||
update_config_var $ZBX_CONFIG "DBPort"
|
update_config_var $ZBX_CONFIG "DBPort"
|
||||||
update_config_var $ZBX_CONFIG "DBPassword"
|
update_config_var $ZBX_CONFIG "DBPassword"
|
||||||
|
@ -137,7 +137,13 @@ update_zbx_config() {
|
|||||||
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
update_config_var $ZBX_CONFIG "LogRemoteCommands" "${ZBX_LOGREMOTECOMMANDS}"
|
||||||
|
|
||||||
update_config_var $ZBX_CONFIG "DBHost"
|
update_config_var $ZBX_CONFIG "DBHost"
|
||||||
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
: ${ZBX_USE_NODE_NAME_AS_DB_NAME:="false"}
|
||||||
|
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" == "false" ]; then
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/${ZBX_HOSTNAME:-"zabbix-proxy-sqlite3"}.sqlite"
|
||||||
|
else
|
||||||
|
node_name=$(uname -n)
|
||||||
|
update_config_var $ZBX_CONFIG "DBName" "/var/lib/zabbix/db_data/$node_name.sqlite"
|
||||||
|
fi
|
||||||
update_config_var $ZBX_CONFIG "DBUser"
|
update_config_var $ZBX_CONFIG "DBUser"
|
||||||
update_config_var $ZBX_CONFIG "DBPort"
|
update_config_var $ZBX_CONFIG "DBPort"
|
||||||
update_config_var $ZBX_CONFIG "DBPassword"
|
update_config_var $ZBX_CONFIG "DBPassword"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# ZBX_SERVER_HOST=zabbix-server
|
# ZBX_SERVER_HOST=zabbix-server
|
||||||
# ZBX_SERVER_PORT=10051 # Deprecated since 6.0.0
|
# ZBX_SERVER_PORT=10051 # Deprecated since 6.0.0
|
||||||
# ZBX_HOSTNAME=zabbix-proxy-$db_type
|
# ZBX_HOSTNAME=zabbix-proxy-$db_type
|
||||||
|
# ZBX_USE_NODE_NAME_AS_DB_NAME=false
|
||||||
# ZBX_ENABLEREMOTECOMMANDS=0 # Available since 3.4.0
|
# ZBX_ENABLEREMOTECOMMANDS=0 # Available since 3.4.0
|
||||||
# ZBX_LOGREMOTECOMMANDS=0 # Available since 3.4.0
|
# ZBX_LOGREMOTECOMMANDS=0 # Available since 3.4.0
|
||||||
# ZBX_HOSTNAMEITEM=system.hostname
|
# ZBX_HOSTNAMEITEM=system.hostname
|
||||||
|
Loading…
Reference in New Issue
Block a user