zabbix/Dockerfiles/snmptraps/rhel/README.html
2026-07-11 22:22:05 +09:00

50 lines
4.1 KiB
HTML

<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 the image?</h2>
<p>The image is used to receive SNMP traps, store them to a log file and provide access to Zabbix to collected SNMP trap messsages.</p>
<h2>Zabbix snmptraps images</h2>
<p>Images are updated when new releases are published.</p>
<h2>How to use this image</h2>
<h3>Start <code>zabbix-snmptraps</code></h3>
<p>Start a Zabbix snmptraps container as follows:</p>
<pre><code>podman run \
--name some-zabbix-snmptraps \
-p 162:1162/udp \
-d registry.connect.redhat.com/zabbix/zabbix-snmptraps-74:tag
</code></pre>
<p>Where <code>some-zabbix-snmptraps</code> is the name you want to assign to your container and <code>tag</code> is the tag specifying the version you want.</p>
<h3>Linking Zabbix server or Zabbix proxy with the container</h3>
<pre><code>podman run \
--name some-zabbix-server \
--link some-zabbix-snmptraps:zabbix-snmptraps \
--volumes-from some-zabbix-snmptraps \
-d zabbix/zabbix-server:tag
</code></pre>
<h3>Container shell access and viewing Zabbix snmptraps 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-snmptraps</code> container:</p>
<pre><code>$ podman exec -ti some-zabbix-snmptraps /bin/bash
</code></pre>
<p>The Zabbix snmptraps log is available through Podman's container log:</p>
<pre><code>$ podman logs some-zabbix-snmptraps
</code></pre>
<h3>Environment Variables</h3>
<p>When you start the <code>zabbix-snmptraps</code> image, you can adjust the configuration by passing one or more environment variables on the <code>podman run</code> command line.</p>
<h4><code>ZBX_SNMP_TRAP_DATE_FORMAT</code></h4>
<p>This variable is represent date and time format in the output <code>snmptraps.log</code> file. By default, value is <code>+%Y-%m-%dT%T%z</code>. Please, refer to <code>date</code> command man for more details about date and time format.</p>
<h4><code>ZBX_SNMP_TRAP_FORMAT</code></h4>
<p>This variable is SNMP trap format in the output <code>snmptraps.log</code> file. By default, value is <code>\n</code>, in this case each new variable is placed on new line.</p>
<h4><code>ZBX_SNMP_TRAP_USE_DNS</code></h4>
<p>This variable manages source network address representation. It can be IP address or DNS of SNMP trap sender. The variable works only when container command is modified and "-n" command argument is removed from argument list. By default, value is <code>false</code>.</p>
<h4><code>SNMPTRAP_OUTPUT_OPTIONS</code></h4>
<p>Modify standard output options for SNMP traps. By default, value is <code>STte</code>. Corresponding to "OUTPUT OPTIONS" ("-O" command line argument).</p>
<h3>Allowed volumes for the Zabbix snmptraps container</h3>
<h4><code>/var/lib/zabbix/snmptraps</code></h4>
<p>The volume contains log file <code>snmptraps.log</code> named with received SNMP traps.</p>
<h4><code>/var/lib/zabbix/mibs</code></h4>
<p>The volume allows to add new MIB files. It does not support subdirectories, all MIBs must be placed in <code>/var/lib/zabbix/mibs</code>.</p>
<h4><code>/var/lib/zabbix/snmptrapd_config</code></h4>
<p>The volume various persistent configuration files generated by snmptrapd daemon. The volume is required usually only for SNMPv3 traps. Do not modify manually anything stored in the volume.</p>
<p>The volume also can be used for custom configuration file <code>snmptrapd_custom.conf</code>. The configuration file can be used for SNMPv3 authentification details.</p>