mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-03-09 12:01:14 +01:00
Added support for DNS resolving for SNMP traps image
This commit is contained in:
parent
7aee917872
commit
bcf0b165f2
@ -58,6 +58,23 @@ The Zabbix snmptraps log is available through Docker's container log:
|
|||||||
$ docker logs some-zabbix-snmptraps
|
$ docker logs some-zabbix-snmptraps
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
When you start the `zabbix-snmptraps` image, you can adjust the configuration by passing one or more environment variables on the `docker run` command line.
|
||||||
|
|
||||||
|
### `ZBX_SNMP_TRAP_DATE_FORMAT`
|
||||||
|
|
||||||
|
This variable is represent date and time format in the output `snmptraps.log` file. By default, value is `+%Y%m%d.%H%M%S`. Please, refer to `date` command man for more details about date and time format.
|
||||||
|
|
||||||
|
### `ZBX_SNMP_TRAP_FORMAT`
|
||||||
|
|
||||||
|
This variable is SNMP trap format in the output `snmptraps.log` file. By default, value is `\n`, in this case each new variable is placed on new line.
|
||||||
|
|
||||||
|
### `ZBX_SNMP_TRAP_USE_DNS`
|
||||||
|
|
||||||
|
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 `false`.
|
||||||
|
|
||||||
|
|
||||||
## Allowed volumes for the Zabbix snmptraps container
|
## Allowed volumes for the Zabbix snmptraps container
|
||||||
|
|
||||||
### ``/var/lib/zabbix/snmptraps``
|
### ``/var/lib/zabbix/snmptraps``
|
||||||
|
@ -7,7 +7,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|||||||
ENV TERM=xterm \
|
ENV TERM=xterm \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||||
|
@ -6,6 +6,8 @@ ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y%m%d.%H%M%S"}
|
|||||||
|
|
||||||
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
||||||
|
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=${ZBX_SNMP_TRAP_USE_DNS:-"false"}
|
||||||
|
|
||||||
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
||||||
|
|
||||||
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
||||||
@ -40,4 +42,6 @@ done
|
|||||||
|
|
||||||
! [ -z $trap_address ] && sender_addr=$trap_address
|
! [ -z $trap_address ] && sender_addr=$trap_address
|
||||||
|
|
||||||
|
[[ "$ZBX_SNMP_TRAP_USE_DNS" == "true" ]] && ! [[ ${host} =~ \[(.*?)\].*\-\> ]] && sender_addr=$host
|
||||||
|
|
||||||
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
||||||
|
@ -7,7 +7,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|||||||
ENV TERM=xterm \
|
ENV TERM=xterm \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||||
|
@ -6,6 +6,8 @@ ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y%m%d.%H%M%S"}
|
|||||||
|
|
||||||
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
||||||
|
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=${ZBX_SNMP_TRAP_USE_DNS:-"false"}
|
||||||
|
|
||||||
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
||||||
|
|
||||||
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
||||||
@ -40,4 +42,6 @@ done
|
|||||||
|
|
||||||
! [ -z $trap_address ] && sender_addr=$trap_address
|
! [ -z $trap_address ] && sender_addr=$trap_address
|
||||||
|
|
||||||
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
[[ "$ZBX_SNMP_TRAP_USE_DNS" == "true" ]] && ! [[ ${host} =~ \[(.*?)\].*\-\> ]] && sender_addr=$host
|
||||||
|
|
||||||
|
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
||||||
|
@ -7,7 +7,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|||||||
ENV TERM=xterm \
|
ENV TERM=xterm \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||||
|
@ -6,6 +6,8 @@ ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y%m%d.%H%M%S"}
|
|||||||
|
|
||||||
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
||||||
|
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=${ZBX_SNMP_TRAP_USE_DNS:-"false"}
|
||||||
|
|
||||||
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
||||||
|
|
||||||
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
||||||
@ -40,4 +42,6 @@ done
|
|||||||
|
|
||||||
! [ -z $trap_address ] && sender_addr=$trap_address
|
! [ -z $trap_address ] && sender_addr=$trap_address
|
||||||
|
|
||||||
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
[[ "$ZBX_SNMP_TRAP_USE_DNS" == "true" ]] && ! [[ ${host} =~ \[(.*?)\].*\-\> ]] && sender_addr=$host
|
||||||
|
|
||||||
|
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
||||||
|
@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|||||||
ENV TERM=xterm \
|
ENV TERM=xterm \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
MIBDIRS=/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
||||||
|
|
||||||
LABEL description="Zabbix SNMP traps receiver" \
|
LABEL description="Zabbix SNMP traps receiver" \
|
||||||
maintainer="alexey.pustovalov@zabbix.com" \
|
maintainer="alexey.pustovalov@zabbix.com" \
|
||||||
|
@ -6,6 +6,8 @@ ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y%m%d.%H%M%S"}
|
|||||||
|
|
||||||
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
||||||
|
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=${ZBX_SNMP_TRAP_USE_DNS:-"false"}
|
||||||
|
|
||||||
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
||||||
|
|
||||||
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
||||||
@ -40,4 +42,6 @@ done
|
|||||||
|
|
||||||
! [ -z $trap_address ] && sender_addr=$trap_address
|
! [ -z $trap_address ] && sender_addr=$trap_address
|
||||||
|
|
||||||
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
[[ "$ZBX_SNMP_TRAP_USE_DNS" == "true" ]] && ! [[ ${host} =~ \[(.*?)\].*\-\> ]] && sender_addr=$host
|
||||||
|
|
||||||
|
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
||||||
|
@ -7,7 +7,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
|
|||||||
ENV TERM=xterm \
|
ENV TERM=xterm \
|
||||||
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
|
||||||
MIBDIRS=/var/lib/mibs/ietf:/var/lib/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
MIBDIRS=/var/lib/mibs/ietf:/var/lib/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \
|
||||||
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n" \
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
||||||
|
|
||||||
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
|
||||||
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
org.opencontainers.image.description="Zabbix SNMP traps receiver" \
|
||||||
|
@ -6,6 +6,8 @@ ZBX_SNMP_TRAP_DATE_FORMAT=${ZBX_SNMP_TRAP_DATE_FORMAT:-"+%Y%m%d.%H%M%S"}
|
|||||||
|
|
||||||
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
ZBX_SNMP_TRAP_FORMAT=${ZBX_SNMP_TRAP_FORMAT:-"\n"}
|
||||||
|
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=${ZBX_SNMP_TRAP_USE_DNS:-"false"}
|
||||||
|
|
||||||
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
date=$(date "$ZBX_SNMP_TRAP_DATE_FORMAT")
|
||||||
|
|
||||||
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
# The name of the host that sent the notification, as determined by gethostbyaddr(3).
|
||||||
@ -40,4 +42,6 @@ done
|
|||||||
|
|
||||||
! [ -z $trap_address ] && sender_addr=$trap_address
|
! [ -z $trap_address ] && sender_addr=$trap_address
|
||||||
|
|
||||||
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
[[ "$ZBX_SNMP_TRAP_USE_DNS" == "true" ]] && ! [[ ${host} =~ \[(.*?)\].*\-\> ]] && sender_addr=$host
|
||||||
|
|
||||||
|
echo -e "$date ZBXTRAP $sender_addr$ZBX_SNMP_TRAP_FORMAT$sender$ZBX_SNMP_TRAP_FORMAT$vars" >> $ZABBIX_TRAPS_FILE
|
||||||
|
@ -362,6 +362,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:alpine-trunk
|
image: zabbix/zabbix-snmptraps:alpine-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -377,6 +380,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -447,6 +447,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- alpine:3.18
|
- alpine:3.18
|
||||||
image: zabbix-snmptraps:alpine-local
|
image: zabbix-snmptraps:alpine-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -462,6 +465,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -353,6 +353,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:alpine-trunk
|
image: zabbix/zabbix-snmptraps:alpine-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -368,6 +371,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -452,6 +452,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- alpine:3.18
|
- alpine:3.18
|
||||||
image: zabbix-snmptraps:alpine-local
|
image: zabbix-snmptraps:alpine-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -467,6 +470,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -362,6 +362,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:centos-trunk
|
image: zabbix/zabbix-snmptraps:centos-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -377,6 +380,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -448,6 +448,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- quay.io/centos/centos:stream9
|
- quay.io/centos/centos:stream9
|
||||||
image: zabbix-snmptraps:centos-local
|
image: zabbix-snmptraps:centos-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -463,6 +466,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -353,6 +353,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:centos-trunk
|
image: zabbix/zabbix-snmptraps:centos-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -368,6 +371,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -452,6 +452,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- quay.io/centos/centos:stream9
|
- quay.io/centos/centos:stream9
|
||||||
image: zabbix-snmptraps:centos-local
|
image: zabbix-snmptraps:centos-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -467,6 +470,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -362,6 +362,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:ol-trunk
|
image: zabbix/zabbix-snmptraps:ol-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -377,6 +380,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -448,6 +448,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:9-slim
|
- oraclelinux:9-slim
|
||||||
image: zabbix-snmptraps:ol-local
|
image: zabbix-snmptraps:ol-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -463,6 +466,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -353,6 +353,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:ol-trunk
|
image: zabbix/zabbix-snmptraps:ol-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -368,6 +371,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -452,6 +452,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- oraclelinux:9-slim
|
- oraclelinux:9-slim
|
||||||
image: zabbix-snmptraps:ol-local
|
image: zabbix-snmptraps:ol-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -467,6 +470,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -354,6 +354,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:ubuntu-trunk
|
image: zabbix/zabbix-snmptraps:ubuntu-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -369,6 +372,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -442,6 +442,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- ubuntu:jammy
|
- ubuntu:jammy
|
||||||
image: zabbix-snmptraps:ubuntu-local
|
image: zabbix-snmptraps:ubuntu-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -457,6 +460,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -347,6 +347,9 @@ services:
|
|||||||
|
|
||||||
zabbix-snmptraps:
|
zabbix-snmptraps:
|
||||||
image: zabbix/zabbix-snmptraps:ubuntu-trunk
|
image: zabbix/zabbix-snmptraps:ubuntu-trunk
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -362,6 +365,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
@ -446,6 +446,9 @@ services:
|
|||||||
cache_from:
|
cache_from:
|
||||||
- ubuntu:jammy
|
- ubuntu:jammy
|
||||||
image: zabbix-snmptraps:ubuntu-local
|
image: zabbix-snmptraps:ubuntu-local
|
||||||
|
# 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
|
||||||
profiles:
|
profiles:
|
||||||
- full
|
- full
|
||||||
- all
|
- all
|
||||||
@ -461,6 +464,8 @@ services:
|
|||||||
reservations:
|
reservations:
|
||||||
cpus: '0.25'
|
cpus: '0.25'
|
||||||
memory: 128M
|
memory: 128M
|
||||||
|
env_file:
|
||||||
|
- ./env_vars/.env_snmptraps
|
||||||
networks:
|
networks:
|
||||||
zbx_net_frontend:
|
zbx_net_frontend:
|
||||||
aliases:
|
aliases:
|
||||||
|
5
env_vars/.env_snmptraps
Normal file
5
env_vars/.env_snmptraps
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S
|
||||||
|
ZBX_SNMP_TRAP_FORMAT=\n
|
||||||
|
# To use DNS instead of sender IP override container's command: /usr/sbin/snmptrapd -C -c /etc/snmp/snmptrapd.conf -Lo -A
|
||||||
|
# Need to remove "-n" command argument
|
||||||
|
ZBX_SNMP_TRAP_USE_DNS=false
|
Loading…
Reference in New Issue
Block a user