<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 <ahref="https://hub.docker.com/u/zabbix/">https://hub.docker.com/u/zabbix/</a> and <ahref="https://zabbix.com">https://zabbix.com</a></p>
<h1id="what-is-zabbix-server-">What is Zabbix server?</h1>
<p>Zabbix server is the central process of Zabbix software.</p>
<p>The server performs the polling and trapping of data, it calculates triggers, sends notifications to users. It is the central component to which Zabbix agents and proxies report data on availability and integrity of systems. The server can itself remotely check networked services (such as web servers and mail servers) using simple service checks.</p>
<h1id="zabbix-server-images">Zabbix server images</h1>
<p>Images are updated when new releases are published.</p>
<p>The image uses PostgreSQL database. It uses the next procedure to start:</p>
<ul>
<li>Checking database availability</li>
<li>Checking of having <code>POSTGRES_DB</code> database. Creating <code>POSTGRES_DB</code> database name if it does not exist</li>
<li>Checking of having <code>dbversion</code> table. Creating Zabbix server database schema and upload initial data sample if no <code>dbversion</code> table</li>
</ul>
<h1id="how-to-use-this-image">How to use this image</h1>
</code></pre><p>Where <code>some-zabbix-server-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 and <code>tag</code> is the tag specifying the version you want.</p>
<blockquote>
<p>[!NOTE]
Zabbix server has possibility to execute <code>fping</code> utility to perform ICMP checks. When containers are running in rootless mode or with specific restrictions environment, you may face errors related to fping:
<code>fping: Operation not permitted</code>
or
lost all packets to all resources
in this case add <code>--cap-add=net_raw</code> to <code>podman run</code> or <code>podman run</code> commands.
Additionally fping executing in non-root environments can require sysctl modification:
<code>net.ipv4.ping_group_range=0 1995</code>
where 1995 is <code>zabbix</code> GID.</p>
</blockquote>
<h2id="container-shell-access-and-viewing-zabbix-server-logs">Container shell access and viewing Zabbix server logs</h2>
<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-server-pgsql</code> container:</p>
<p>When you start the <code>zabbix-server-pgsql</code> image, you can adjust the configuration of the Zabbix server by passing one or more environment variables on the <code>podman run</code> command line.</p>
<p>These variables are used by Zabbix server 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. Without Docker Swarm or Kubernetes you also have to map the files. Those are exclusive so you can just provide one type - either <code>POSTGRES_USER</code> or <code>POSTGRES_USER_FILE</code>!</p>
<p>In some setups, for example including <ahref="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>
<p>The variable is list of comma separated loadable Zabbix modules. It works with volume <code>/var/lib/zabbix/modules</code>. The syntax of the variable is <code>dummy1.so,dummy2.so</code>.</p>
<p>The variable is used to specify debug level. By default, value is <code>3</code>. It is <code>DebugLevel</code> parameter in <code>zabbix_server.conf</code>. Allowed values are listed below:</p>
<ul>
<li><code>0</code> - basic information about starting and stopping of Zabbix processes;</li>
<li><code>1</code> - critical information</li>
<li><code>2</code> - error information</li>
<li><code>3</code> - warnings</li>
<li><code>4</code> - for debugging (produces lots of information)</li>
<li><code>5</code> - extended debugging (produces even more information)</li>
<p>The variable enable communication with Zabbix Java Gateway to collect Java related checks. By default, value is <code>false</code>.</p>
<h3id="other-variables">Other variables</h3>
<p>Additionally the image allows to specify many other environment variables listed below:</p>
<pre><code><spanclass="hljs-attr">ZBX_ALLOWUNSUPPORTEDDBVERSIONS</span>=<spanclass="hljs-number">0</span> # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSCONNECT</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSCAFILE</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSCERTFILE</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSKEYFILE</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSCIPHER</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_DBTLSCIPHER13</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_VAULTDBPATH</span>= # Available since <spanclass="hljs-number">5.2</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_VAULTURL</span>=https://<spanclass="hljs-number">127.0</span>.<spanclass="hljs-number">0.1</span>:<spanclass="hljs-number">8200</span> # Available since <spanclass="hljs-number">5.2</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">VAULT_TOKEN</span>= # Available since <spanclass="hljs-number">5.2</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTREPORTWRITERS</span>=<spanclass="hljs-number">0</span> # Available since <spanclass="hljs-number">5.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_WEBSERVICEURL</span>=http://zabbix-web-service:<spanclass="hljs-number">10053</span>/report # Available since <spanclass="hljs-number">5.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_SERVICEMANAGERSYNCFREQUENCY</span>=<spanclass="hljs-number">60</span> # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_HISTORYSTORAGEURL</span>= # Available since <spanclass="hljs-number">3.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_HISTORYSTORAGETYPES</span>=uint,dbl,str,log,text # Available since <spanclass="hljs-number">3.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTCONNECTORS</span>=<spanclass="hljs-number">0</span> # Available since <spanclass="hljs-number">6.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTPREPROCESSORS</span>=<spanclass="hljs-number">3</span> # Available since <spanclass="hljs-number">3.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTHISTORYPOLLERS</span>=<spanclass="hljs-number">5</span> # Available since <spanclass="hljs-number">5.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTODBCPOLLERS</span>=<spanclass="hljs-number">1</span> # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTALERTERS</span>=<spanclass="hljs-number">3</span> # Available since <spanclass="hljs-number">3.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STARTLLDPROCESSORS</span>=<spanclass="hljs-number">2</span> # Available since <spanclass="hljs-number">4.2</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_STATSALLOWEDIP</span>= # Available since <spanclass="hljs-number">4.0</span>.<spanclass="hljs-number">5</span>
<spanclass="hljs-attr">ZBX_PROBLEMHOUSEKEEPINGFREQUENCY</span>=<spanclass="hljs-number">60</span> # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_SENDERFREQUENCY</span>=<spanclass="hljs-number">30</span> # Depcrecated since <spanclass="hljs-number">3.4</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_EXPORTFILESIZE</span>=<spanclass="hljs-number">1</span>G # Available since <spanclass="hljs-number">4.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_EXPORTTYPE</span>= # Available since <spanclass="hljs-number">5.0</span>.<spanclass="hljs-number">10</span> and <spanclass="hljs-number">5.2</span>.<spanclass="hljs-number">6</span>
<spanclass="hljs-attr">ZBX_AUTOHANODENAME</span>=fqdn # Allowed values: fqdn, hostname. Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_HANODENAME</span>= # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_AUTONODEADDRESS</span>=fqdn # Allowed values: fqdn, hostname. Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_NODEADDRESSPORT</span>=<spanclass="hljs-number">10051</span> # Allowed to use with ZBX_AUTONODEADDRESS variable <spanclass="hljs-literal">on</span>ly. Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_NODEADDRESS</span>=localhost # Available since <spanclass="hljs-number">6.0</span>.<spanclass="hljs-number">0</span>
<spanclass="hljs-attr">ZBX_HISTORYSTORAGEDATEINDEX</span>=<spanclass="hljs-number">0</span> # Available since <spanclass="hljs-number">4.0</span>.<spanclass="hljs-number">0</span>
</code></pre><p>Default values of these variables are specified after equal sign.</p>
<p>The allowed variables are identical of parameters in official <code>zabbix_server.conf</code>. For example, <code>ZBX_LOGSLOWQUERIES</code> = <code>LogSlowQueries</code>.</p>
<p>Please use official documentation for <ahref="https://www.zabbix.com/documentation/current/manual/appendix/config/zabbix_server"><code>zabbix_server.conf</code></a> to get more information about the variables.</p>
<h2id="allowed-volumes-for-the-zabbix-server-container">Allowed volumes for the Zabbix server container</h2>
<p>The volume is used to store TLS related files. These file names are specified using <code>ZBX_TLSCAFILE</code>, <code>ZBX_TLSCRLFILE</code>, <code>ZBX_TLSKEY_FILE</code> and <code>ZBX_TLSPSKFILE</code> variables.</p>
<p>The volume is used as location of public and private keys for SSH checks and actions. It is <code>SSHKeyLocation</code> parameter in <code>zabbix_server.conf</code>.</p>
<p>The volume is used as location of of SSL client certificate files for client authentication. It is <code>SSLCertLocation</code> parameter in <code>zabbix_server.conf</code>.</p>
<p>The volume is used as location of SSL private key files for client authentication. It is <code>SSLKeyLocation</code> parameter in <code>zabbix_server.conf</code>.</p>
<p>The volume is used as location of certificate authority (CA) files for SSL server certificate verification. It is <code>SSLCALocation</code> parameter in <code>zabbix_server.conf</code>.</p>
<p>The volume is used as location of <code>snmptraps.log</code> file. It could be shared by <code>zabbix-snmptraps</code> container and inherited using <code>volumes_from</code> Podman option while creating new instance of Zabbix server.
SNMP traps processing feature could be enabled using shared volume and switched <code>ZBX_ENABLE_SNMP_TRAPS</code> environment variable to <code>true</code>.</p>
<p>Directory for real-time export of events, history and trends in newline-delimited JSON format. Could be enabled using <code>ZBX_EXPORTFILESIZE</code> environment variable.</p>
<p>Documentation for this image is stored in the <ahref="https://github.com/zabbix/zabbix-docker/tree/7.0/Dockerfiles/server-pgsql"><code>server-pgsql/</code> directory</a> of the <ahref="https://github.com/zabbix/zabbix-docker/"><code>zabbix/zabbix-docker</code> GitHub repo</a>. Be sure to familiarize yourself with the <ahref="https://github.com/zabbix/zabbix-docker/blob/7.0/README.md">repository's <code>README.md</code> file</a> before attempting a pull request.</p>
<p>If you have any problems with or questions about this image, please contact us through a <ahref="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>.</p>
<h3id="known-issues">Known issues</h3>
<h2id="contributing">Contributing</h2>
<p>You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.</p>
<p>Before you start to code, we recommend discussing your plans through a <ahref="https://github.com/zabbix/zabbix-docker/issues">GitHub issue</a>, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.</p>