2016-08-03 10:09:49 +02:00
|
|
|
<?php
|
|
|
|
// Zabbix GUI configuration file.
|
2018-06-01 11:02:20 +02:00
|
|
|
global $DB, $HISTORY;
|
2016-08-03 10:09:49 +02:00
|
|
|
|
2020-09-10 14:05:17 +02:00
|
|
|
$DB['TYPE'] = getenv('DB_SERVER_TYPE');
|
|
|
|
$DB['SERVER'] = getenv('DB_SERVER_HOST');
|
|
|
|
$DB['PORT'] = getenv('DB_SERVER_PORT');
|
|
|
|
$DB['DATABASE'] = getenv('DB_SERVER_DBNAME');
|
|
|
|
$DB['USER'] = getenv('DB_SERVER_USER');
|
|
|
|
$DB['PASSWORD'] = getenv('DB_SERVER_PASS');
|
2016-08-03 10:09:49 +02:00
|
|
|
|
|
|
|
// Schema name. Used for IBM DB2 and PostgreSQL.
|
2020-09-10 14:05:17 +02:00
|
|
|
$DB['SCHEMA'] = getenv('DB_SERVER_SCHEMA');
|
2016-08-03 10:09:49 +02:00
|
|
|
|
2020-09-10 14:05:17 +02:00
|
|
|
$ZBX_SERVER = getenv('ZBX_SERVER_HOST');
|
|
|
|
$ZBX_SERVER_PORT = getenv('ZBX_SERVER_PORT');
|
|
|
|
$ZBX_SERVER_NAME = getenv('ZBX_SERVER_NAME');
|
2016-08-03 10:09:49 +02:00
|
|
|
|
2020-04-27 21:00:50 +02:00
|
|
|
// Used for TLS connection.
|
2020-09-11 08:49:29 +02:00
|
|
|
$DB['ENCRYPTION'] = getenv('ZBX_DB_ENCRYPTION') == 'true' ? true: false;
|
|
|
|
$DB['KEY_FILE'] = getenv('ZBX_DB_KEY_FILE');
|
|
|
|
$DB['CERT_FILE'] = getenv('ZBX_DB_CERT_FILE');
|
|
|
|
$DB['CA_FILE'] = getenv('ZBX_DB_CA_FILE');
|
|
|
|
$DB['VERIFY_HOST'] = getenv('ZBX_DB_VERIFY_HOST') == 'true' ? true: false;
|
|
|
|
$DB['CIPHER_LIST'] = getenv('ZBX_DB_CIPHER_LIST') ? getenv('ZBX_DB_CIPHER_LIST') : '';
|
2020-04-27 21:00:50 +02:00
|
|
|
|
|
|
|
// Use IEEE754 compatible value range for 64-bit Numeric (float) history values.
|
|
|
|
// This option is enabled by default for new Zabbix installations.
|
|
|
|
// For upgraded installations, please read database upgrade notes before enabling this option.
|
2020-09-11 08:49:29 +02:00
|
|
|
$DB['DOUBLE_IEEE754'] = getenv('DB_DOUBLE_IEEE754') == 'true' ? true: false;
|
2020-04-27 21:00:50 +02:00
|
|
|
|
|
|
|
|
2018-06-01 11:02:20 +02:00
|
|
|
$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;
|
|
|
|
|
|
|
|
// Elasticsearch url (can be string if same url is used for all types).
|
2020-09-11 08:49:29 +02:00
|
|
|
$history_url = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGEURL'));
|
2020-09-12 14:14:20 +02:00
|
|
|
$HISTORY['url'] = (json_decode($history_url)) ? json_decode($history_url, true) : $history_url;
|
2018-06-01 11:02:20 +02:00
|
|
|
// Value types stored in Elasticsearch.
|
2020-09-11 08:49:29 +02:00
|
|
|
$storage_types = str_replace("'","\"",getenv('ZBX_HISTORYSTORAGETYPES'));
|
|
|
|
|
2020-09-12 14:14:20 +02:00
|
|
|
$HISTORY['types'] = (json_decode($storage_types)) ? json_decode($storage_types, true) : array();
|
2020-09-11 08:49:29 +02:00
|
|
|
|
|
|
|
// 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.
|
2020-10-06 11:07:05 +02:00
|
|
|
$SSO['SP_KEY'] = file_exists('/etc/zabbix/web/certs/sp.key') ? '/etc/zabbix/web/certs/sp.key' : (file_exists(getenv('ZBX_SSO_SP_KEY')) ? getenv('ZBX_SSO_SP_KEY') : '');
|
|
|
|
$SSO['SP_CERT'] = file_exists('/etc/zabbix/web/certs/sp.crt') ? '/etc/zabbix/web/certs/sp.crt' : (file_exists(getenv('ZBX_SSO_SP_CERT')) ? getenv('ZBX_SSO_SP_CERT') : '');
|
2020-09-12 14:14:20 +02:00
|
|
|
$SSO['IDP_CERT'] = file_exists('/etc/zabbix/web/certs/idp.crt') ? '/etc/zabbix/web/certs/idp.crt' : (file_exists(getenv('ZBX_SSO_IDP_CERT')) ? getenv('ZBX_SSO_IDP_CERT') : '');
|
2020-09-11 08:49:29 +02:00
|
|
|
|
|
|
|
$sso_settings = str_replace("'","\"",getenv('ZBX_SSO_SETTINGS'));
|
2020-09-12 14:14:20 +02:00
|
|
|
$SSO['SETTINGS'] = (json_decode($sso_settings)) ? json_decode($sso_settings, true) : array();
|