Added new plugin NVIDIA GPU

This commit is contained in:
Alexey Pustovalov
2024-12-21 03:02:58 +09:00
parent 527e146761
commit 0cad94f31e
22 changed files with 187 additions and 31 deletions

View File

@ -29,7 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git NVIDIA_GPU_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
@ -138,4 +139,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${NVIDIA_GPU_PLUGIN_SOURCES} --branch ${NVIDIA_GPU_PLUGIN_VERSION} --depth 1 --single-branch /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
cd /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
make && \
strip /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/nvidia.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/

View File

@ -29,7 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git NVIDIA_GPU_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
@ -138,4 +139,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${NVIDIA_GPU_PLUGIN_SOURCES} --branch ${NVIDIA_GPU_PLUGIN_VERSION} --depth 1 --single-branch /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
cd /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
make && \
strip /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/nvidia.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/

View File

@ -29,7 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git NVIDIA_GPU_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
@ -138,4 +139,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${NVIDIA_GPU_PLUGIN_SOURCES} --branch ${NVIDIA_GPU_PLUGIN_VERSION} --depth 1 --single-branch /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
cd /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
make && \
strip /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/nvidia.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/

View File

@ -40,7 +40,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git NVIDIA_GPU_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
@ -149,4 +150,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${NVIDIA_GPU_PLUGIN_SOURCES} --branch ${NVIDIA_GPU_PLUGIN_VERSION} --depth 1 --single-branch /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
cd /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
make && \
strip /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/nvidia.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/

View File

@ -29,7 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
NVIDIA_GPU_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/nvidia-gpu.git NVIDIA_GPU_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
@ -139,4 +140,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
make && \
strip /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/zabbix-agent2-plugin-ember-plus ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/ember-plus && \
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/
cp /tmp/ember-plugin-${EMBER_PLUS_PLUGIN_VERSION}/ember.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/ && \
cd /tmp/ && \
git -c advice.detachedHead=false clone ${NVIDIA_GPU_PLUGIN_SOURCES} --branch ${NVIDIA_GPU_PLUGIN_VERSION} --depth 1 --single-branch /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
cd /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION} && \
make && \
strip /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/zabbix-agent2-plugin-nvidia-gpu ${ZBX_OUTPUT_DIR}/agent2/sbin/zabbix-agent2-plugin/nvidia-gpu && \
cp /tmp/nvidia-gpu-plugin-${NVIDIA_GPU_PLUGIN_VERSION}/nvidia.conf ${ZBX_OUTPUT_DIR}/agent2/conf/zabbix_agent2.d/plugins.d/