diff --git a/Dockerfiles/snmptraps/alpine/Dockerfile b/Dockerfiles/snmptraps/alpine/Dockerfile index 408f3595f..d62498c42 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 cee60d7df..e0aa6437e 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 87ff80850..abe002fed 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 de38d63a9..f73d26e50 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 5757e68e5..f72e230fe 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 c4ec62583..f69c2a785 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