<h2>What is Zabbix?</h2>
<p>Zabbix is an enterprise-class open source distributed monitoring solution.</p>
<p>Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning.</p>
<p>For more information and related downloads for Zabbix components, please visit <a href="https://zabbix.com">zabbix.com</a></p>
<h2>What is Zabbix web interface?</h2>
<p>Zabbix web interface is a part of Zabbix software. It is used to manage resources under monitoring and view monitoring statistics.</p>
<h2>Zabbix web interface images</h2>
<p>Images are updated when new releases are published.</p>
<p>Zabbix web interface available in four editions:</p>
<ul>
<li>Zabbix web-interface based on Apache2 web server with MySQL database support</li>
<li>Zabbix web-interface based on Apache2 web server with PostgreSQL database support</li>
<li>Zabbix web-interface based on Nginx web server with MySQL database support</li>
<li>Zabbix web-interface based on Nginx web server with PostgreSQL database support</li>
</ul>
<p>The image based on Nginx web server with PostgreSQL database support.</p>
<h2>How to use this image</h2>
<h3>Start <code>zabbix-web-nginx-pgsql</code></h3>
<p>Start a Zabbix web-interface container as follows:</p>
<pre><code>podman run \
--name some-zabbix-web-nginx-pgsql \
-e DB_SERVER_HOST="some-postgres-server" \
-e POSTGRES_USER="some-user" \
-e POSTGRES_PASSWORD="some-password" \
-e ZBX_SERVER_HOST="some-zabbix-server" \
-e PHP_TZ="some-timezone" \
-d registry.connect.redhat.com/zabbix/zabbix-web-pgsql-74:tag
</code></pre>
<p>Where <code>some-zabbix-web-nginx-pgsql</code> is the name you want to assign to your container, <code>some-postgres-server</code> is IP or DNS name of PostgreSQL server, <code>some-user</code> is user to connect to Zabbix database on PostgreSQL server, <code>some-password</code> is the password to connect to PostgreSQL server, <code>some-zabbix-server</code> is IP or DNS name of Zabbix server or proxy, <code>some-timezone</code> is PHP like timezone name and <code>tag</code> is the tag specifying the version you want.</p>
<h3>Linking the container to Zabbix server</h3>
<pre><code>podman run \
--name some-zabbix-web-nginx-pgsql \
--link some-zabbix-server:zabbix-server \
-e DB_SERVER_HOST="some-postgres-server" \
-e POSTGRES_USER="some-user" \
-e POSTGRES_PASSWORD="some-password" \
-e ZBX_SERVER_HOST="some-zabbix-server" \
-e PHP_TZ="some-timezone" \
-d registry.connect.redhat.com/zabbix/zabbix-web-pgsql-74:tag
</code></pre>
<h3>Linking the container to PostgreSQL database</h3>
<pre><code>podman run \
--name some-zabbix-web-nginx-pgsql \
--link some-postgres-server:postgres \
-e DB_SERVER_HOST="some-postgres-server" \
-e POSTGRES_USER="some-user" \
-e POSTGRES_PASSWORD="some-password" \
-e ZBX_SERVER_HOST="some-zabbix-server" \
-e PHP_TZ="some-timezone" \
-d registry.connect.redhat.com/zabbix/zabbix-web-pgsql-74:tag
</code></pre>
<h3>Container shell access and viewing Zabbix web interface logs</h3>
<p>The <code>podman exec</code> command allows you to run commands inside a Podman container. The following command line will give you a bash shell inside your <code>zabbix-web-nginx-pgsql</code> container:</p>
<pre><code>$ podman exec -ti some-zabbix-web-nginx-pgsql /bin/bash
</code></pre>
<p>The Zabbix web interface log is available through Podman's container log:</p>
<pre><code>$ podman logs some-zabbix-web-nginx-pgsql
</code></pre>
<h3>Environment Variables</h3>
<p>When you start the <code>zabbix-web-nginx-pgsql</code> image, you can adjust the configuration of the Zabbix web interface by passing one or more environment variables on the <code>podman run</code> command line.</p>
<h4><code>ZBX_SERVER_HOST</code></h4>
<p>This variable is IP or DNS name of Zabbix server. By default, value is <code>zabbix-server</code>.</p>
<h4><code>ZBX_SERVER_PORT</code></h4>
<p>This variable is port Zabbix server listening on. By default, value is <code>10051</code>.</p>
<h4><code>DB_SERVER_HOST</code></h4>
<p>This variable is IP or DNS name of PostgreSQL server. By default, value is 'postgres-server'</p>
<h4><code>DB_SERVER_PORT</code></h4>
<p>This variable is port of PostgreSQL server. By default, value is '5432'.</p>
<h4><code>POSTGRES_USER</code>, <code>POSTGRES_PASSWORD</code>, <code>POSTGRES_USER_FILE</code>, <code>POSTGRES_PASSWORD_FILE</code></h4>
<p>These variables are used by Zabbix web interface to connect to Zabbix database. With the <code>_FILE</code> variables you can instead provide the path to a file which contains the user / the password instead. When secrets are not managed by an orchestrator, you also have to mount the files. Those are exclusive so you can just provide one type - either <code>POSTGRES_USER</code> or <code>POSTGRES_USER_FILE</code>!</p>
<pre><code>podman run \
--name some-zabbix-web-nginx-pgsql \
-e DB_SERVER_HOST="some-postgres-server" \
-v ./.POSTGRES_USER:/run/secrets/POSTGRES_USER \
-e POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER \
-v ./.POSTGRES_PASSWORD:/run/secrets/POSTGRES_PASSWORD \
-e POSTGRES_PASSWORD_FILE=/var/run/secrets/POSTGRES_PASSWORD \
-e ZBX_SERVER_HOST="some-zabbix-server" \
-e PHP_TZ="some-timezone" \
-d registry.connect.redhat.com/zabbix/zabbix-web-pgsql-74:tag
</code></pre>
<p>Podman secrets can be used to avoid exposing credentials in the command line:</p>
<pre><code>printf "zabbix" | podman secret create POSTGRES_USER -
printf "zabbix" | podman secret create POSTGRES_PASSWORD -
podman run \
--name some-zabbix-web-nginx-pgsql \
-e DB_SERVER_HOST="some-postgres-server" \
-e POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER \
-e POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD \
-e ZBX_SERVER_HOST="some-zabbix-server" \
-e PHP_TZ="some-timezone" \
-d registry.connect.redhat.com/zabbix/zabbix-web-pgsql-74:tag
</code></pre>
<p>By default, values for <code>POSTGRES_USER</code> and <code>POSTGRES_PASSWORD</code> are <code>zabbix</code>, <code>zabbix</code>.</p>
<h4><code>POSTGRES_DB</code></h4>
<p>The variable is Zabbix database name. By default, value is <code>zabbix</code>.</p>
<h4><code>POSTGRES_USE_IMPLICIT_SEARCH_PATH</code></h4>
<p>In some setups, for example including <a href="https://www.pgbouncer.org">PgBouncer</a>, setting the <code>search_path</code> via connection parameters fails. If this variable is set to <code>"true"</code>, the image skips setting the <code>search_path</code> and trusts that the <code>search_path</code> of the Zabbix user is setup correctly in PostgreSQL database.</p>
<h4><code>ZBX_HISTORYSTORAGEURL</code></h4>
<p>History storage HTTP[S] URL. This parameter is used for Elasticsearch setup. Available since 3.4.5.</p>
<h4><code>ZBX_HISTORYSTORAGETYPES</code></h4>
<p>Array of value types to be sent to the history storage. An example: ['uint', 'dbl']. This parameter is used for Elasticsearch setup. Available since 3.4.5.</p>
<h4><code>PHP_TZ</code></h4>
<p>The variable is timezone in PHP format. Full list of supported timezones are available on <a href="http://php.net/manual/en/timezones.php"><code>php.net</code></a>. By default, value is 'Europe/Riga' and system timezone since Zabbix 5.2.0.</p>
<h4><code>ZBX_SERVER_NAME</code></h4>
<p>The variable is visible Zabbix installation name in right or left top corner of the web interface.</p>
<h4><code>DB_DOUBLE_IEEE754</code></h4>
<p>Use IEEE754 compatible value range for 64-bit Numeric (float) history values. Available since 5.0.0. Enabled by default.</p>
<h4><code>ENABLE_WEB_ACCESS_LOG</code></h4>
<p>The variable sets the Access Log directive for Web server. By default, value corresponds to standard output.</p>
<h4><code>HTTP_INDEX_FILE</code></h4>
<p>The variable controls default index page. By default, <code>index.php</code>.</p>
<h4><code>EXPOSE_WEB_SERVER_INFO</code></h4>
<p>The variable allows to hide Web server and PHP versions. By default, <code>on</code>.</p>
<h4><code>ZBX_MAXEXECUTIONTIME</code></h4>
<p>The variable is PHP <code>max_execution_time</code> option. By default, value is <code>300</code>.</p>
<h4><code>ZBX_MEMORYLIMIT</code></h4>
<p>The variable is PHP <code>memory_limit</code> option. By default, value is <code>128M</code>.</p>
<h4><code>ZBX_POSTMAXSIZE</code></h4>
<p>The variable is PHP <code>post_max_size</code> option. By default, value is <code>16M</code>.</p>
<h4><code>ZBX_UPLOADMAXFILESIZE</code></h4>
<p>The variable is PHP <code>upload_max_filesize</code> option. By default, value is <code>2M</code>.</p>
<h4><code>ZBX_MAXINPUTTIME</code></h4>
<p>The variable is PHP <code>max_input_time</code> option. By default, value is <code>300</code>.</p>
<h4><code>ZBX_SESSION_NAME</code></h4>
<p>The variable is Zabbix frontend <a href="https://www.zabbix.com/documentation/current/manual/web_interface/definitions">definition</a>. String used as the name of the Zabbix frontend session cookie. By default, value is <code>zbx_sessionid</code>.</p>
<h4><code>ZBX_DENY_GUI_ACCESS</code></h4>
<p>Enable (<code>true</code>) maintenance mode for Zabbix web-interface.</p>
<h4><code>ZBX_GUI_ACCESS_IP_RANGE</code></h4>
<p>Array of IP addresses which are allowed for accessing to Zabbix web-interface during maintenance period.</p>
<h4><code>ZBX_GUI_WARNING_MSG</code></h4>
<p>Information message about maintenance period for Zabbix web-interface.</p>
<h4><code>ZBX_DB_ENCRYPTION</code></h4>
<p>The variable allows to activate encryption for connections to Zabbix database. Even if no other environment variables are specified, connections will be TLS-encrypted if <code>ZBX_DB_ENCRYPTION=true</code> specified. Available since 5.0.0. Disabled by default.</p>
<h4><code>ZBX_DB_KEY_FILE</code></h4>
<p>The variable allows to specify the full path to a valid TLS key file. Available since 5.0.0.</p>
<h4><code>ZBX_DB_CERT_FILE</code></h4>
<p>The variable allows to specify the full path to a valid TLS certificate file. Available since 5.0.0.</p>
<h4><code>ZBX_DB_CA_FILE</code></h4>
<p>The variable allows to specify the full path to a valid TLS certificate authority file. Available since 5.0.0.</p>
<h4><code>ZBX_DB_VERIFY_HOST</code></h4>
<p>The variable allows to activate host verification. Available since 5.0.0.</p>
<h4><code>ZBX_SSO_SP_KEY</code></h4>
<p>The variable allows to specify a custom file path to the Service Provider (SP) private key file.</p>
<h4><code>ZBX_SSO_SP_CERT</code></h4>
<p>The variable allows to specify a custom file path to the Service Provider (SP) cert file.</p>
<h4><code>ZBX_SSO_IDP_CERT</code></h4>
<p>The variable allows to specify a custom file path to the SAML Certificate provided by the Identity Provider (ID) file.</p>
<h3><code>ZBX_SSO_SETTINGS</code></h3>
<p>The variable allows to specify custom SSO settings in JSON format. Available since 5.0.0.</p>
<p>Example of YAML Mapping to Sequences</p>
<pre><code>....
environment:
ZBX_SSO_SETTINGS: "{'baseurl': 'https://zabbix.example.com', 'use_proxy_headers': true, 'strict': false}"
....
....
</code></pre>
<h3><code>ZBX_ALLOW_HTTP_AUTH</code></h3>
<p>The variable allows to disable user HTTP authentication.</p>
<h4>Other variables</h4>
<p>Additionally the image allows to specify many other environment variables listed below:</p>
<pre><code>ZBX_VAULT=HashiCorp # Allowed values: HashiCorp, CyberArk. Required when Vault is used. Available since 6.2.0
ZBX_VAULTDBPATH= # Available since 5.2.0
ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0
VAULT_TOKEN= # Available since 5.2.0
ZBX_VAULTPREFIX= # Available since 7.0.0
ZBX_VAULTCERTFILE= # Available since 6.2.0
ZBX_VAULTKEYFILE= # Available since 6.2.0
ZBX_VAULTCACHE=false # Available since 6.2.0
ZBX_SERVER_TLS_ACTIVE=false # Available since 7.4.0
ZBX_SERVER_TLS_CAFILE= # Available since 7.4.0
ZBX_SERVER_TLS_CA= # Available since 7.4.0
ZBX_SERVER_TLS_KEYFILE= # Available since 7.4.0
ZBX_SERVER_TLS_KEY= # Available since 7.4.0
ZBX_SERVER_TLS_CERTFILE= # Available since 7.4.0
ZBX_SERVER_TLS_CERT= # Available since 7.4.0
ZBX_SERVER_TLS_CERT_ISSUER= # Available since 7.4.0
ZBX_SERVER_TLS_CERT_SUBJECT= # Available since 7.4.0
Allowed PHP-FPM configuration options:
PHP_FPM_PM=dynamic
PHP_FPM_PM_MAX_CHILDREN=50
PHP_FPM_PM_START_SERVERS=5
PHP_FPM_PM_MIN_SPARE_SERVERS=5
PHP_FPM_PM_MAX_SPARE_SERVERS=35
PHP_FPM_PM_MAX_REQUESTS=0
Allowed Nginx configuration options:
WEB_REAL_IP_FROM=
WEB_REAL_IP_HEADER=
</code></pre>
<h3>Allowed volumes for the Zabbix web interface container</h3>
<h4><code>/etc/ssl/nginx</code></h4>
<p>The volume allows to enable HTTPS for the Zabbix web interface. The volume must contain three files <code>ssl.crt</code>, <code>ssl.key</code> and <code>dhparam.pem</code> prepared for Nginx SSL connections.</p>
<p>Please follow official Nginx <a href="http://nginx.org/en/docs/http/configuring_https_servers.html">documentation</a> to get more details about how to create certificate files.</p>
<h4><code>/etc/zabbix/web/certs</code></h4>
<p>The volume allows to use custom certificates for SAML authentication. The volume must contain three files <code>sp.key</code>, <code>sp.crt</code> and <code>idp.crt</code>. Available since 5.0.0.</p>
<h4><code>/var/lib/zabbix/enc</code></h4>
<p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_SERVER_TLS_CAFILE</code>, <code>ZBX_SERVER_TLS_KEYFILE</code> and <code>ZBX_SERVER_TLS_CERTFILE</code> variables. Additionally it is possible to use environment variables <code>ZBX_SERVER_TLS_CA</code>, <code>ZBX_SERVER_TLS_KEY</code> and <code>ZBX_SERVER_TLS_CERT</code> with plaintext values. Available since 7.4.0.</p>