diff --git a/Dockerfiles/snmptraps/alpine/Dockerfile b/Dockerfiles/snmptraps/alpine/Dockerfile index 6e6699d6a..aa35e44de 100644 --- a/Dockerfiles/snmptraps/alpine/Dockerfile +++ b/Dockerfiles/snmptraps/alpine/Dockerfile @@ -62,4 +62,4 @@ COPY ["conf/usr/sbin/zabbix_trap_handler.sh", "/usr/sbin/"] USER 1997 -CMD ["/usr/sbin/snmptrapd", "-n", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A"] +CMD ["/usr/sbin/snmptrapd", "-n", "-t", "-X", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A", "--doNotFork=yes", "--agentuser=zabbix", "--agentgroup=zabbix"] diff --git a/Dockerfiles/snmptraps/alpine/conf/etc/snmp/snmptrapd.conf b/Dockerfiles/snmptraps/alpine/conf/etc/snmp/snmptrapd.conf index aa3bbf1dd..0c7ece5f6 100644 --- a/Dockerfiles/snmptraps/alpine/conf/etc/snmp/snmptrapd.conf +++ b/Dockerfiles/snmptraps/alpine/conf/etc/snmp/snmptrapd.conf @@ -3,7 +3,7 @@ snmpTrapdAddr udp:1162 snmpTrapdAddr udp6:1162 # Do not fork from the calling shell -doNotFork yes +#doNotFork yes # File in which to store the process ID of the notification receiver pidFile /tmp/snmptrapd.pid # Disables support for the NOTIFICATION-LOG-MIB diff --git a/Dockerfiles/snmptraps/centos/Dockerfile b/Dockerfiles/snmptraps/centos/Dockerfile index 391e01aa7..c0bca829a 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/Dockerfile @@ -68,4 +68,4 @@ COPY ["conf/usr/sbin/zabbix_trap_handler.sh", "/usr/sbin/"] USER 1997 -CMD ["/usr/sbin/snmptrapd", "-n", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A"] +CMD ["/usr/sbin/snmptrapd", "-n", "-t", "-X", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A", "--doNotFork=yes", "--agentuser=zabbix", "--agentgroup=zabbix"] diff --git a/Dockerfiles/snmptraps/centos/conf/etc/snmp/snmptrapd.conf b/Dockerfiles/snmptraps/centos/conf/etc/snmp/snmptrapd.conf index aa3bbf1dd..0c7ece5f6 100644 --- a/Dockerfiles/snmptraps/centos/conf/etc/snmp/snmptrapd.conf +++ b/Dockerfiles/snmptraps/centos/conf/etc/snmp/snmptrapd.conf @@ -3,7 +3,7 @@ snmpTrapdAddr udp:1162 snmpTrapdAddr udp6:1162 # Do not fork from the calling shell -doNotFork yes +#doNotFork yes # File in which to store the process ID of the notification receiver pidFile /tmp/snmptrapd.pid # Disables support for the NOTIFICATION-LOG-MIB diff --git a/Dockerfiles/snmptraps/ol/Dockerfile b/Dockerfiles/snmptraps/ol/Dockerfile index e54a5d175..fdb135047 100644 --- a/Dockerfiles/snmptraps/ol/Dockerfile +++ b/Dockerfiles/snmptraps/ol/Dockerfile @@ -67,4 +67,4 @@ COPY ["conf/usr/sbin/zabbix_trap_handler.sh", "/usr/sbin/"] USER 1997 -CMD ["/usr/sbin/snmptrapd", "-n", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A"] +CMD ["/usr/sbin/snmptrapd", "-n", "-t", "-X", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A", "--doNotFork=yes", "--agentuser=zabbix", "--agentgroup=zabbix"] diff --git a/Dockerfiles/snmptraps/ol/conf/etc/snmp/snmptrapd.conf b/Dockerfiles/snmptraps/ol/conf/etc/snmp/snmptrapd.conf index aa3bbf1dd..0c7ece5f6 100644 --- a/Dockerfiles/snmptraps/ol/conf/etc/snmp/snmptrapd.conf +++ b/Dockerfiles/snmptraps/ol/conf/etc/snmp/snmptrapd.conf @@ -3,7 +3,7 @@ snmpTrapdAddr udp:1162 snmpTrapdAddr udp6:1162 # Do not fork from the calling shell -doNotFork yes +#doNotFork yes # File in which to store the process ID of the notification receiver pidFile /tmp/snmptrapd.pid # Disables support for the NOTIFICATION-LOG-MIB diff --git a/Dockerfiles/snmptraps/rhel/Dockerfile b/Dockerfiles/snmptraps/rhel/Dockerfile index 74847e436..2da1183ea 100644 --- a/Dockerfiles/snmptraps/rhel/Dockerfile +++ b/Dockerfiles/snmptraps/rhel/Dockerfile @@ -107,4 +107,4 @@ COPY ["conf/usr/sbin/zabbix_trap_handler.sh", "/usr/sbin/"] USER 1997 -CMD ["/usr/sbin/snmptrapd", "-n", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A"] +CMD ["/usr/sbin/snmptrapd", "-n", "-t", "-X", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A", "--doNotFork=yes", "--agentuser=zabbix", "--agentgroup=zabbix"] diff --git a/Dockerfiles/snmptraps/rhel/conf/etc/snmp/snmptrapd.conf b/Dockerfiles/snmptraps/rhel/conf/etc/snmp/snmptrapd.conf index aa3bbf1dd..0c7ece5f6 100644 --- a/Dockerfiles/snmptraps/rhel/conf/etc/snmp/snmptrapd.conf +++ b/Dockerfiles/snmptraps/rhel/conf/etc/snmp/snmptrapd.conf @@ -3,7 +3,7 @@ snmpTrapdAddr udp:1162 snmpTrapdAddr udp6:1162 # Do not fork from the calling shell -doNotFork yes +#doNotFork yes # File in which to store the process ID of the notification receiver pidFile /tmp/snmptrapd.pid # Disables support for the NOTIFICATION-LOG-MIB diff --git a/Dockerfiles/snmptraps/ubuntu/Dockerfile b/Dockerfiles/snmptraps/ubuntu/Dockerfile index f112f14de..e602b9a0a 100644 --- a/Dockerfiles/snmptraps/ubuntu/Dockerfile +++ b/Dockerfiles/snmptraps/ubuntu/Dockerfile @@ -64,4 +64,4 @@ COPY ["conf/usr/sbin/zabbix_trap_handler.sh", "/usr/sbin/"] USER 1997 -CMD ["/usr/sbin/snmptrapd", "-n", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A"] +CMD ["/usr/sbin/snmptrapd", "-n", "-t", "-X", "-C", "-c", "/etc/snmp/snmptrapd.conf", "-Lo", "-A", "--doNotFork=yes", "--agentuser=zabbix", "--agentgroup=zabbix"] diff --git a/Dockerfiles/snmptraps/ubuntu/conf/etc/snmp/snmptrapd.conf b/Dockerfiles/snmptraps/ubuntu/conf/etc/snmp/snmptrapd.conf index aa3bbf1dd..0c7ece5f6 100644 --- a/Dockerfiles/snmptraps/ubuntu/conf/etc/snmp/snmptrapd.conf +++ b/Dockerfiles/snmptraps/ubuntu/conf/etc/snmp/snmptrapd.conf @@ -3,7 +3,7 @@ snmpTrapdAddr udp:1162 snmpTrapdAddr udp6:1162 # Do not fork from the calling shell -doNotFork yes +#doNotFork yes # File in which to store the process ID of the notification receiver pidFile /tmp/snmptrapd.pid # Disables support for the NOTIFICATION-LOG-MIB diff --git a/compose_zabbix_components.yaml b/compose_zabbix_components.yaml index 9f20c8dda..704c57fb0 100644 --- a/compose_zabbix_components.yaml +++ b/compose_zabbix_components.yaml @@ -472,7 +472,7 @@ services: snmptraps: # Override snmptrapd command arguments to receive SNMP traps by DNS # It must be done with ZBX_SNMP_TRAP_USE_DNS=true environment variable -# command: /usr/sbin/snmptrapd -C -c /etc/snmp/snmptrapd.conf -Lo -A +# command: /usr/sbin/snmptrapd -t -X -C -c /etc/snmp/snmptrapd.conf -Lo -A --doNotFork=yes --agentuser=zabbix --agentgroup=zabbix profiles: - full - all