mirror of
https://github.com/bashclub/zamba-lxc-toolbox.git
synced 2024-12-25 03:30:12 +01:00
Change zabbix proxy config
This commit is contained in:
parent
d1c9615a4a
commit
84173e46a8
@ -34,7 +34,7 @@ ZABBIX_DB_IP="127.0.0.1"
|
||||
ZABBIX_DB_PORT="5432"
|
||||
|
||||
# Defines the name from the SQL database
|
||||
ZABBIX_DB_NAME="zabbix"
|
||||
ZABBIX_DB_NAME="zabbix_proxy"
|
||||
|
||||
# Defines the name from the SQL user
|
||||
ZABBIX_DB_USR="zabbix"
|
||||
|
@ -32,8 +32,9 @@ EOF
|
||||
cat /usr/share/zabbix-sql-scripts/postgresql/proxy.sql | sudo -u zabbix psql ${ZABBIX_DB_NAME}
|
||||
|
||||
echo "DBPassword=${ZABBIX_DB_PWD}" >> /etc/zabbix/zabbix_proxy.conf
|
||||
echo "Server=${ZBX_ADDR}" >> /etc/zabbix/zabbix_proxy.conf
|
||||
|
||||
$srv=$(grep -E "^Server" /etc/zabbix/zabbix_proxy.conf)
|
||||
sed -i "s/$srv/Server=${ZBX_ADDR}/g" "s/# ListenPort=/ListenPort=/g" "s/Hostname=Zabbix proxy/# Hostname=${LXC_HOSTNAME}.${LXC_DOMAIN}/g" /etc/zabbix/zabbix_proxy.conf
|
||||
|
||||
systemctl enable zabbix-proxy
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user