mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-23 06:49:34 +01:00
Added PosgreSQL and MongoDB plugins to agent 2 image
This commit is contained in:
parent
9cded2a83c
commit
7dd6612411
@ -31,6 +31,10 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="tini \
|
||||
@ -65,9 +69,9 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
EXPOSE 10050/TCP 31999/TCP
|
||||
|
@ -198,9 +198,17 @@ prepare_zbx_agent_config() {
|
||||
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -31,6 +31,10 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
||||
|
||||
RUN set -eux && \
|
||||
REPOLIST="baseos,appstream,epel" && \
|
||||
@ -70,9 +74,9 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
dnf -y clean all && \
|
||||
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
|
||||
|
@ -198,9 +198,17 @@ prepare_zbx_agent_config() {
|
||||
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -31,6 +31,10 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
||||
COPY ["conf/etc/yum.repos.d/oracle-epel-ol8.repo", "/etc/yum.repos.d/oracle-epel-ol8.repo"]
|
||||
|
||||
RUN set -eux && \
|
||||
@ -71,9 +75,9 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
microdnf -y clean all && \
|
||||
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
|
||||
|
@ -198,9 +198,17 @@ prepare_zbx_agent_config() {
|
||||
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -50,6 +50,10 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
||||
|
||||
RUN set -eux && \
|
||||
INSTALL_PKGS="bash \
|
||||
@ -97,9 +101,9 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
microdnf -y clean all && \
|
||||
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
|
||||
|
@ -198,9 +198,17 @@ prepare_zbx_agent_config() {
|
||||
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -31,6 +31,10 @@ COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get", "/u
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender", "/usr/bin/zabbix_sender"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.conf", "/etc/zabbix/zabbix_agent2.conf"]
|
||||
COPY --from=builder ["/tmp/zabbix-${ZBX_VERSION}/src/go/conf/zabbix_agent2.d/plugins.d", "/etc/zabbix/zabbix_agent2.d/plugins.d"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/mongodb.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/postgresql.conf", "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf"]
|
||||
COPY --from=builder ["/tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"]
|
||||
COPY --from=builder ["/tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql", "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"]
|
||||
|
||||
RUN set -eux && \
|
||||
echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
|
||||
@ -66,9 +70,9 @@ RUN set -eux && \
|
||||
mkdir -p /var/lib/zabbix/enc && \
|
||||
mkdir -p /var/lib/zabbix/modules && \
|
||||
mkdir -p /var/lib/zabbix/buffer && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ && \
|
||||
chown --quiet -R zabbix:root /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chgrp -R 0 /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
chmod -R g=u /etc/zabbix/ /var/lib/zabbix/ /usr/sbin/zabbix-agent2-plugin/ && \
|
||||
apt-get -y autoremove && \
|
||||
apt-get -y clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
@ -198,9 +198,17 @@ prepare_zbx_agent_config() {
|
||||
update_config_multiple_var $ZBX_AGENT_CONFIG "AllowKey" "${ZBX_ALLOWKEY}"
|
||||
}
|
||||
|
||||
prepare_zbx_agent_plugin_config() {
|
||||
echo "** Preparing Zabbix agent plugin configuration files"
|
||||
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf" "Plugins.MongoDB.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-mongodb"
|
||||
update_config_var "/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf" "Plugins.PostgreSQL.System.Path" "/usr/sbin/zabbix-agent2-plugin/zabbix-agent2-plugin-postgresql"
|
||||
}
|
||||
|
||||
prepare_agent() {
|
||||
echo "** Preparing Zabbix agent"
|
||||
prepare_zbx_agent_config
|
||||
prepare_zbx_agent_plugin_config
|
||||
}
|
||||
|
||||
#################################################
|
||||
|
@ -19,6 +19,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
RUN set -eux && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
case "$ARCH_SUFFIX" in \
|
||||
@ -91,4 +94,14 @@ RUN set -eux && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \
|
||||
cd /tmp/mongodb_plugin && \
|
||||
make && \
|
||||
strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
|
@ -19,6 +19,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
RUN set -eux && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
case "$ARCH_SUFFIX" in \
|
||||
@ -85,4 +88,14 @@ RUN set -eux && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \
|
||||
cd /tmp/mongodb_plugin && \
|
||||
make && \
|
||||
strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
|
@ -19,6 +19,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
RUN set -eux && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch master --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
@ -72,4 +75,14 @@ RUN set -eux && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \
|
||||
cd /tmp/mongodb_plugin && \
|
||||
make && \
|
||||
strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
|
@ -29,6 +29,9 @@ LABEL description="Zabbix build base for MySQL based images" \
|
||||
org.label-schema.vcs-ref="${VCS_REF}" \
|
||||
org.label-schema.vendor="Zabbix LLC"
|
||||
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
RUN set -eux && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
case "$ARCH_SUFFIX" in \
|
||||
@ -95,4 +98,14 @@ RUN set -eux && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \
|
||||
cd /tmp/mongodb_plugin && \
|
||||
make && \
|
||||
strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
|
@ -19,6 +19,9 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab
|
||||
org.opencontainers.image.vendor="Zabbix LLC" \
|
||||
org.opencontainers.image.version="${ZBX_VERSION}"
|
||||
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
RUN set -eux && \
|
||||
ARCH_SUFFIX="$(arch)"; \
|
||||
case "$ARCH_SUFFIX" in \
|
||||
@ -91,4 +94,14 @@ RUN set -eux && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_get/zabbix_get && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/zabbix_sender/zabbix_sender && \
|
||||
strip /tmp/zabbix-${ZBX_VERSION}/src/go/bin/zabbix_web_service && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${MONGODB_PLUGIN_SOURCES} --branch ${MONGODB_PLUGIN_VERSION} --depth 1 --single-branch /tmp/mongodb_plugin && \
|
||||
cd /tmp/mongodb_plugin && \
|
||||
make && \
|
||||
strip /tmp/mongodb_plugin/zabbix-agent2-plugin-mongodb && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
|
Loading…
Reference in New Issue
Block a user