Add snmp trap settings for test

This commit is contained in:
Mico Micic 2024-07-29 07:53:01 +02:00 committed by Olof Hagsand
parent 1a248b75e5
commit 87921cb740
2 changed files with 4 additions and 0 deletions

View file

@ -133,6 +133,8 @@ RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf
RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf
RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf
RUN echo "trap2sink localhost public 162" >> /etc/snmp/snmpd.conf
RUN echo "disableAuthorization yes" >> /etc/snmp/snmptrapd.conf
# Test-specific (for test scripts) # Test-specific (for test scripts)
RUN apk add --update sudo curl procps grep make bash expect openssh coreutils RUN apk add --update sudo curl procps grep make bash expect openssh coreutils

View file

@ -141,6 +141,8 @@ RUN echo "agentaddress 127.0.0.1" >> /etc/snmp/snmpd.conf
RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf RUN echo "rwcommunity public localhost" >> /etc/snmp/snmpd.conf
RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf RUN echo "agentXSocket unix:/var/run/snmp.sock" >> /etc/snmp/snmpd.conf
RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf RUN echo "agentxperms 777 777" >> /etc/snmp/snmpd.conf
RUN echo "trap2sink localhost public 162" >> /etc/snmp/snmpd.conf
RUN echo "disableAuthorization yes" >> /etc/snmp/snmptrapd.conf
# Need to add www user manually, but group www-data already exists on Alpine # Need to add www user manually, but group www-data already exists on Alpine
RUN adduser -D -H -G www-data www-data RUN adduser -D -H -G www-data www-data