diff --git a/Dockerfiles/snmptraps/alpine/Dockerfile b/Dockerfiles/snmptraps/alpine/Dockerfile index de10f553a..2781e0826 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 1f28317fe..434e4c40b 100644 --- a/Dockerfiles/snmptraps/centos/Dockerfile +++ b/Dockerfiles/snmptraps/centos/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/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 e635d0289..61c46c00d 100644 --- a/Dockerfiles/snmptraps/ol/Dockerfile +++ b/Dockerfiles/snmptraps/ol/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/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 86ad5922a..8af5dd28c 100644 --- a/Dockerfiles/snmptraps/rhel/Dockerfile +++ b/Dockerfiles/snmptraps/rhel/Dockerfile @@ -90,4 +90,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 58dc351c3..95b7b94fe 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 1591bdfae..a15910694 100644 --- a/compose_zabbix_components.yaml +++ b/compose_zabbix_components.yaml @@ -466,7 +466,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