diff --git a/Dockerfiles/snmptraps/alpine/Dockerfile b/Dockerfiles/snmptraps/alpine/Dockerfile index a237379a0..9229bb9e4 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 ec170c9a6..e1dacabb7 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 882042b36..5884d6c30 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 71e64697a..ea5e77494 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 9385b31ff..d8f398f80 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