Merge branch 'master' into 5.0

This commit is contained in:
Alexey Pustovalov 2021-09-13 17:45:39 +02:00
commit adcdc6eb29
9 changed files with 18 additions and 78 deletions

View File

@ -39,8 +39,6 @@ LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentati
org.opencontainers.image.version="${ZBX_VERSION}" \
org.opencontainers.image.source="${ZBX_SOURCES}"
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
apk add --no-cache --virtual build-dependencies \
autoconf \
@ -69,7 +67,8 @@ RUN set -eux && \
mkdir -p /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
cd /tmp/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/sbin/zabbix_java/ && \

View File

@ -1,15 +0,0 @@
<configuration scan="true" scanPeriod="15 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -18,14 +18,10 @@ prepare_java_gateway_config() {
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
if [ -n "${ZBX_DEBUGLEVEL}" ]; then
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
if [ -f "$ZBX_GATEWAY_CONFIG" ]; then
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
else
echo "**** Zabbix Java Gateway log configuration file '$ZBX_GATEWAY_CONFIG' not found"
fi
fi
: ${ZBX_DEBUGLEVEL:="info"}
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
}
prepare_java_gateway() {

View File

@ -38,8 +38,6 @@ LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentati
org.opencontainers.image.version="${ZBX_VERSION}" \
org.opencontainers.image.source="${ZBX_SOURCES}"
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
dnf --quiet makecache && \
dnf -y install --setopt=tsflags=nodocs --setopt=install_weak_deps=False --best \
@ -67,7 +65,8 @@ RUN set -eux && \
mkdir -p /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
cd /tmp/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
dnf -y history undo `dnf -q history | sed -n 3p |column -t | cut -d' ' -f1` && \

View File

@ -1,15 +0,0 @@
<configuration scan="true" scanPeriod="15 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -18,14 +18,10 @@ prepare_java_gateway_config() {
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
if [ -n "${ZBX_DEBUGLEVEL}" ]; then
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
if [ -f "$ZBX_GATEWAY_CONFIG" ]; then
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
else
echo "**** Zabbix Java Gateway log configuration file '$ZBX_GATEWAY_CONFIG' not found"
fi
fi
: ${ZBX_DEBUGLEVEL:="info"}
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
}
prepare_java_gateway() {

View File

@ -39,8 +39,6 @@ LABEL org.opencontainers.image.documentation="https://www.zabbix.com/documentati
org.opencontainers.image.version="${ZBX_VERSION}" \
org.opencontainers.image.source="${ZBX_SOURCES}"
COPY ["conf/etc/", "/etc/"]
RUN set -eux && \
apt-get -y update && \
DEBIAN_FRONTEND=noninteractive apt-get -y --no-install-recommends install \
@ -70,7 +68,8 @@ RUN set -eux && \
mkdir -p /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/bin /usr/sbin/zabbix_java/ && \
cp -r src/zabbix_java/lib /usr/sbin/zabbix_java/ && \
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
rm -rf /usr/sbin/zabbix_java/lib/logback.xml && \
mv /usr/sbin/zabbix_java/lib/logback-console.xml /etc/zabbix/zabbix_java_gateway_logback.xml && \
cd /tmp/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
DEBIAN_FRONTEND=noninteractive apt-get -y purge \

View File

@ -1,15 +0,0 @@
<configuration scan="true" scanPeriod="15 seconds">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

View File

@ -18,14 +18,10 @@ prepare_java_gateway_config() {
ZBX_GATEWAY_CONFIG=$ZABBIX_ETC_DIR/zabbix_java_gateway_logback.xml
if [ -n "${ZBX_DEBUGLEVEL}" ]; then
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
if [ -f "$ZBX_GATEWAY_CONFIG" ]; then
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
else
echo "**** Zabbix Java Gateway log configuration file '$ZBX_GATEWAY_CONFIG' not found"
fi
fi
: ${ZBX_DEBUGLEVEL:="info"}
echo "Updating $ZBX_GATEWAY_CONFIG 'DebugLevel' parameter: '${ZBX_DEBUGLEVEL}'... updated"
sed -i -e "/^.*<root level=/s/=.*/=\"${ZBX_DEBUGLEVEL}\">/" "$ZBX_GATEWAY_CONFIG"
}
prepare_java_gateway() {