From ccc7bd30b402edf3cd287caf501321e565debfb5 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Sun, 12 Feb 2023 15:11:28 +0100 Subject: [PATCH] zabbix: fin install bug, add web config --- src/zabbix/install-service.sh | 63 ++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/src/zabbix/install-service.sh b/src/zabbix/install-service.sh index 81d6a12..db4a2e7 100644 --- a/src/zabbix/install-service.sh +++ b/src/zabbix/install-service.sh @@ -18,7 +18,7 @@ echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" apt update DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq dist-upgrade -DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq install --no-install-recommends postgresql nginx php7.4-pgsql php7.4-fpm zabbix-server-pgsql zabbix-frontend-php zabbix-sql-scripts zabbix-agent sudo ssl-cert +DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical apt -y -qq install --no-install-recommends postgresql nginx php7.4-pgsql php7.4-fpm zabbix-server-pgsql zabbix-frontend-php zabbix-nginx-conf zabbix-sql-scripts zabbix-agent ssl-cert unlink /etc/nginx/sites-enabled/default @@ -122,8 +122,6 @@ server { } EOF -ln -sf /etc/zabbix/nginx.conf /etc/nginx/sites-enabled/zabbix.conf - cat << EOF > /etc/php/7.4/fpm/pool.d/zabbix-php-fpm.conf [zabbix] user = www-data @@ -151,6 +149,63 @@ php_value[max_input_time] = 300 php_value[max_input_vars] = 10000 EOF +cat << EOF > /etc/zabbix/web/zabbix.conf.php + 'http://localhost:9200', +// 'text' => 'http://localhost:9200' +//]; +// Value types stored in Elasticsearch. +//\$HISTORY['types'] = ['uint', 'text']; + +// Used for SAML authentication. +// Uncomment to override the default paths to SP private key, SP and IdP X.509 certificates, and to set extra settings. +//\$SSO['SP_KEY'] = 'conf/certs/sp.key'; +//\$SSO['SP_CERT'] = 'conf/certs/sp.crt'; +//\$SSO['IDP_CERT'] = 'conf/certs/idp.crt'; +//\$SSO['SETTINGS'] = []; +EOF + timedatectl set-timezone ${LXC_TIMEZONE} systemctl enable --now postgresql @@ -163,7 +218,7 @@ EOF sed -i "s/false/true/g" /usr/share/zabbix/include/locales.inc.php -zcat /usr/share/doc/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql ${ZABBIX_DB_NAME} +zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql ${ZABBIX_DB_NAME} echo "DBPassword=${ZABBIX_DB_PWD}" >> /etc/zabbix/zabbix_server.conf