Updated snmptraps image. Fixed source IP handling and trap format

This commit is contained in:
Alexey Pustovalov 2021-02-08 20:02:15 -05:00
parent f1c3e71e91
commit fe91d5d3fb
3 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
FROM alpine:3.12 FROM alpine:3.13
ARG MAJOR_VERSION=5.4 ARG MAJOR_VERSION=5.4
ARG ZBX_VERSION=${MAJOR_VERSION} ARG ZBX_VERSION=${MAJOR_VERSION}
@ -6,7 +6,7 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm 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=" " ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-alpine" \ LABEL org.opencontainers.image.title="zabbix-snmptraps-alpine" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \

View File

@ -6,7 +6,7 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm 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=" " ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-centos" \ LABEL org.opencontainers.image.title="zabbix-snmptraps-centos" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \
@ -28,9 +28,8 @@ RUN set -eux && \
--shell /sbin/nologin \ --shell /sbin/nologin \
--home-dir /var/lib/zabbix/ \ --home-dir /var/lib/zabbix/ \
zabbix && \ zabbix && \
yum --quiet makecache && \ dnf --quiet makecache && \
yum -y install epel-release && \ dnf -y install --setopt=tsflags=nodocs \
yum -y install --setopt=tsflags=nodocs \
tzdata \ tzdata \
net-snmp && \ net-snmp && \
mkdir -p /var/lib/zabbix && \ mkdir -p /var/lib/zabbix && \
@ -40,7 +39,7 @@ RUN set -eux && \
chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chown --quiet -R zabbix:root /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chgrp -R 0 /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \ chmod -R g=u /etc/snmp/ /var/lib/zabbix/ /var/tmp/ /var/run/ && \
yum -y clean all && \ dnf -y clean all && \
rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \ rm -rf /var/cache/yum /var/lib/yum/yumdb/* /usr/lib/udev/hwdb.d/* && \
rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki rm -rf /var/cache/dnf /etc/udev/hwdb.bin /root/.pki

View File

@ -6,7 +6,7 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \ ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/mibs/iana:/usr/share/snmp/mibs:/var/lib/zabbix/mibs MIBS=+ALL \ MIBDIRS=/var/lib/snmp/mibs/ietf:/var/lib/snmp/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=" " ZBX_SNMP_TRAP_DATE_FORMAT=+%Y%m%d.%H%M%S ZBX_SNMP_TRAP_FORMAT="\n"
LABEL org.opencontainers.image.title="zabbix-snmptraps-ubuntu" \ LABEL org.opencontainers.image.title="zabbix-snmptraps-ubuntu" \
org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \ org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zabbix.com>" \