diff --git a/Dockerfiles/build-base/windows/Dockerfile.agent2 b/Dockerfiles/build-base/windows/Dockerfile.agent2 index 1d3269fe0..aceacd26b 100644 --- a/Dockerfiles/build-base/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile.agent2 @@ -6,7 +6,6 @@ FROM $BUILD_BASE_IMAGE as builder_base ARG PCRE2_VERSION=10.44 ARG OPENSSL_VERSION=3.3.2 ARG GOLANG_VERSION=1.23.2 -ARG SEVEN_ZIP_VERSION=2405 ARG MSYSTEM=UCRT64 @@ -16,10 +15,7 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.2 ARG ZBX_VERSION=${MAJOR_VERSION}.1 -ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-64-bit.zip -ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi - -ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-ucrt-rt_v11-rev1.7z +ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-win32-seh-ucrt-rt_v12-rev0.7z ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest @@ -29,7 +25,6 @@ ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OP ENV ZBX_VERSION=$ZBX_VERSION ` BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` - GIT_URL=$GIT_URL SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION ` MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` @@ -52,8 +47,7 @@ ADD --checksum=sha256:2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5f RUN Set-Location -Path $env:SystemDrive\.; ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` ` - $env:PATH = [string]::Format('{0}\mingw64\bin;{0}\go\bin;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;{1}\7-Zip;', $env:SystemDrive, ${env:ProgramFiles}) + $env:PATH; ` - $env:PATH = $env:PATH + [string]::Format(';{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` + $env:PATH = $env:PATH + [string]::Format(';{0}\mingw64\bin;{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); ` ` $env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); ` @@ -61,28 +55,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); ` [Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); ` ` - Write-Host ('Downloading {0} ...' -f $env:GIT_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; ` - ` - $sha256 = '50b04b55425b5c465d076cdb184f63a0cd0f86f6ec8bb4d5860114a713d2c29a'; ` - $d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum GIT for Windows ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` - Write-Host ('Downloading {0} ...' -f $env:SEVEN_ZIP_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\7z.msi -Uri $env:SEVEN_ZIP_URL; ` - ` - $sha256 = '0F6AA6596D418B1694F62C8583DE05D24589B8D7FFACCE5A7DAB52AE71F832B6'; ` - $d_sha256 = (Get-FileHash $env:TEMP\7z.msi -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum 7-zip ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); ` Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; ` ` @@ -94,17 +66,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` exit 1; ` }; ` ` - Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; ` - ` - $sha256 = '74ca64c55220edd3196681782fbff653c2b9cb4f427f9e532ab6e9a0823dc997'; ` - $d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host ('Downloading {0} ...' -f $env:MSYS2_URL); ` Invoke-WebRequest -OutFile $env:TEMP\msys2.sfx.exe -Uri $(Invoke-RestMethod -UseBasicParsing $env:MSYS2_URL | ` Select -ExpandProperty "assets" | ` @@ -119,45 +80,31 @@ RUN Set-Location -Path $env:SystemDrive\.; ` # exit 1; ` }; ` ` + Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` + Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; ` + ` + $sha256 = 'd7270f76483aefe0c88f45284b374e27648dec59fb6f89ee2f5cb62f6a060082'; ` + $d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; ` + Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` + if ($d_sha256 -ne $sha256) { ` + Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); ` + exit 1; ` + }; ` + ` Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); ` Invoke-WebRequest -OutFile $env:TEMP\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; ` ` - Write-Host 'Installing GIT...'; ` - Expand-Archive ` - -Path $env:TEMP\git.zip ` - -DestinationPath $env:SystemDrive\git\.; ` - Write-Host 'Removing downloaded...'; ` - ` - Write-Host 'Verifying install ("git version") ...'; ` - git version; ` - ` - Write-Host 'Installing 7z...'; ` - Start-Process ` - -FilePath $env:TEMP\7z.msi ` - -Wait ` - -ArgumentList '/qn /norestart'; ` - ` - Write-Host 'Verifying install ("7z -h") ...'; ` - 7z -h | Select -first 2; ` - ` Write-Host 'Installing Go Lang...'; ` Expand-Archive -Path $env:TEMP\go_lang.zip -DestinationPath $env:SystemDrive\; ` ` Write-Host 'Verifying install ("go version") ...'; ` go version; ` ` - Write-Host 'Installing Mingw-w64...'; ` - 7z x $env:TEMP\mingw.7z; ` - compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; ` - ` - Write-Host 'Verifying install ("gcc -v") ...'; ` - gcc -v; ` - ` Write-Host 'Installing MSYS2...'; ` & $env:TEMP\msys2.sfx.exe -y -o"""$env:SystemDrive\""" | Out-Null; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` - bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake'; ` + bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-make mingw-w64-ucrt-x86_64-7zip git'; ` bash -lc 'pacman --noprogressbar --noconfirm -Scc'; ` bash -lc 'rm -rf /usr/share/man/* /usr/share/doc/* /usr/share/locale/*'; ` bash -lc 'rm -rf /$MSYSTEM/usr/share/man/* /$MSYSTEM/usr/share/doc/* /$MSYSTEM/usr/share/locale/*'; ` @@ -169,6 +116,13 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Write-Host 'Verifying install ("bash --version") ...'; ` bash --version; ` ` + Write-Host 'Installing Mingw-w64...'; ` + 7z x $env:TEMP\mingw.7z; ` + compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; ` + ` + Write-Host 'Verifying install ("gcc -v") ...'; ` + gcc -v; ` + ` Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); ` cmd /C start /w $env:TEMP\vs_buildtools.exe ` --quiet ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 b/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 index 3b45ec3b8..06fccdd54 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_llvm_clang.agent2 @@ -3,9 +3,9 @@ ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 FROM $BUILD_BASE_IMAGE as builder_base -ARG PCRE2_VERSION=10.43 -ARG OPENSSL_VERSION=3.3.0 -ARG GOLANG_VERSION=1.22.3 +ARG PCRE2_VERSION=10.44 +ARG OPENSSL_VERSION=3.3.2 +ARG GOLANG_VERSION=1.23.2 ARG MSYSTEM=CLANG64 @@ -15,18 +15,15 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.2 ARG ZBX_VERSION=${MAJOR_VERSION} -ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip - ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip -ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz +ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` - GIT_URL=$GIT_URL ` GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` @@ -43,11 +40,13 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" ` SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +ADD --checksum=sha256:21c6f0523abfd37a2f5cc85879d0ff32723ab496347f0d20793df888ecec3957 $PCRE2_URL C:\pcre2.zip +ADD --checksum=sha256:2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 $OPENSSL_URL C:\openssl.tar.gz + RUN Set-Location -Path $env:SystemDrive\.; ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` ` - $env:PATH = [string]::Format('{0}\mingw64\bin;{0}\go\bin;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;{1}\7-Zip;', $env:SystemDrive, ${env:ProgramFiles}) + $env:PATH; ` - $env:PATH = $env:PATH + [string]::Format(';{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` + $env:PATH = $env:PATH + [string]::Format(';{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); ` ` $env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); ` @@ -55,21 +54,10 @@ RUN Set-Location -Path $env:SystemDrive\.; ` $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); ` [Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); ` ` - Write-Host ('Downloading {0} ...' -f $env:GIT_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; ` - ` - $sha256 = '273f55e881094d00877d64f56570b0c997c4da5dedcb26738d56481033c1eba1'; ` - $d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum GIT for Windows ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); ` Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; ` ` - $sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; ` + $sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; ` $d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` if ($d_sha256 -ne $sha256) { ` @@ -94,15 +82,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` # exit 1; ` }; ` ` - Write-Host 'Installing GIT...'; ` - Expand-Archive ` - -Path $env:TEMP\git.zip ` - -DestinationPath $env:SystemDrive\git\.; ` - Write-Host 'Removing downloaded...'; ` - ` - Write-Host 'Verifying install ("git version") ...'; ` - git version; ` - ` Write-Host 'Installing Go Lang...'; ` Expand-Archive -Path $env:TEMP\go_lang.zip -DestinationPath $env:SystemDrive\; ` ` @@ -114,7 +93,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` & $env:TEMP\msys2.sfx.exe -y -o"""$env:SystemDrive\""" | Out-Null; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` - bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-clang-x86_64-gcc-compat mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-make'; ` + bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-clang-x86_64-gcc-compat mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-make git'; ` bash -lc 'pacman --noprogressbar --noconfirm -Scc'; ` bash -lc 'rm -rf /usr/share/man/* /usr/share/doc/* /usr/share/locale/*'; ` bash -lc 'rm -rf /$MSYSTEM/usr/share/man/* /$MSYSTEM/usr/share/doc/* /$MSYSTEM/usr/share/locale/*'; ` @@ -160,41 +139,13 @@ RUN Set-Location -Path $env:SystemDrive\.; ` New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; ` Set-Location -Path $env:BUILD_SRC; ` ` - Write-Host ('Downloading {0} ...' -f $env:PCRE2_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\pcre2.zip -Uri $env:PCRE2_URL; ` - ` - $sha256 = 'F2816E84DD7A402068797501BF69E24ECA18D882ADB2143DE9F831F39B850257'; ` - $d_sha256 = (Get-FileHash $env:TEMP\pcre2.zip -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum PCRE2 library ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` - Write-Host ('Downloading {0} ...' -f $env:OPENSSL_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\openssl.tar.gz -Uri $env:OPENSSL_URL; ` - ` - $sha256 = '53E66B043322A606ABF0087E7699A0E033A37FA13FEB9742DF35C3A33B18FB02'; ` - $d_sha256 = (Get-FileHash $env:TEMP\openssl.tar.gz -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum OpenSSL library ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host 'Extracting PCRE2 archive ...'; ` - Expand-Archive -Path $env:TEMP\pcre2.zip -DestinationPath $env:BUILD_SRC; ` - ` - Write-Host 'Removing downloaded ...'; ` - Remove-Item -Force -Path $env:TEMP\pcre2.zip; ` + Expand-Archive -Path $env:SystemDrive\pcre2.zip -DestinationPath $env:BUILD_SRC; ` Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; ` ` Write-Host 'Extracting OpenSSL archive ...'; ` $env:SystemDirectory = [Environment]::SystemDirectory; ` - tar -zxf "$env:TEMP\openssl.tar.gz"; ` - ` - Write-Host 'Removing downloaded...'; ` - Remove-Item -Force -Path $env:TEMP\openssl.tar.gz; ` + tar -zxf "$env:SystemDrive\openssl.tar.gz"; ` Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; ` ` Write-Host 'Building PCRE2 library ...'; ` @@ -212,7 +163,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; ` mingw32-make -s clean | Out-Null; ` - Remove-Item -Path $env:BUILD_OUTPUT\pcre2\man -Force -Recurse; ` Remove-Item -Path $env:BUILD_OUTPUT\pcre2\share -Force -Recurse; ` Write-Host 'PCRE2 is ready...'; ` ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 b/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 index 77ff52757..a463aeb53 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_msvcrt.agent2 @@ -3,10 +3,9 @@ ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 FROM $BUILD_BASE_IMAGE as builder_base -ARG PCRE2_VERSION=10.43 -ARG OPENSSL_VERSION=3.3.0 -ARG GOLANG_VERSION=1.22.3 -ARG SEVEN_ZIP_VERSION=2405 +ARG PCRE2_VERSION=10.44 +ARG OPENSSL_VERSION=3.3.2 +ARG GOLANG_VERSION=1.23.2 ARG MSYSTEM=MINGW64 @@ -16,20 +15,16 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.2 ARG ZBX_VERSION=${MAJOR_VERSION} -ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip -ARG SEVEN_ZIP_URL=https://www.7-zip.org/a/7z$SEVEN_ZIP_VERSION-$BUILD_ARCH.msi - -ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/13.2.0-rt_v11-rev1/x86_64-13.2.0-release-win32-seh-msvcrt-rt_v11-rev1.7z +ARG MINGW_URL=https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-win32-seh-msvcrt-rt_v12-rev0.7z ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip ARG MSYS2_URL=https://api.github.com/repos/msys2/msys2-installer/releases/latest ARG PCRE2_URL=https://github.com/PhilipHazel/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.zip -ARG OPENSSL_URL=https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz +ARG OPENSSL_URL=https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz ENV ZBX_VERSION=$ZBX_VERSION ` BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` - GIT_URL=$GIT_URL SEVEN_ZIP_VERSION=$SEVEN_ZIP_VERSION ` MINGW_URL=$MINGW_URL VS_BUILDTOOLS_URL=$VS_BUILDTOOLS_URL GOLANG_VERSION=$GOLANG_VERSION MSYS2_URL=$MSYS2_URL ` PCRE2_VERSION=$PCRE2_VERSION OPENSSL_VERSION=$OPENSSL_VERSION ` PCRE2_URL=$PCRE2_URL OPENSSL_URL=$OPENSSL_URL ` @@ -46,11 +41,13 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build base for Windows" ` SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +ADD --checksum=sha256:21c6f0523abfd37a2f5cc85879d0ff32723ab496347f0d20793df888ecec3957 $PCRE2_URL C:\pcre2.zip +ADD --checksum=sha256:2e8a40b01979afe8be0bbfb3de5dc1c6709fedb46d6c89c10da114ab5fc3d281 $OPENSSL_URL C:\openssl.tar.gz + RUN Set-Location -Path $env:SystemDrive\.; ` [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; ` ` - $env:PATH = [string]::Format('{0}\mingw64\bin;{0}\go\bin;{0}\git\cmd;{0}\git\mingw64\bin;{0}\git\usr\bin;{1}\7-Zip;', $env:SystemDrive, ${env:ProgramFiles}) + $env:PATH; ` - $env:PATH = $env:PATH + [string]::Format(';{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` + $env:PATH = $env:PATH + [string]::Format(';{0}\mingw64\bin;{0}\go\bin;{0}\msys64\usr\bin;{0}\msys64\{1}\bin', $env:SystemDrive, $env:MSYSTEM.ToLower()); ` [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine); ` ` $env:BUILD_OUTPUT = [string]::Format('{0}\build_output', $env:SystemDrive); ` @@ -58,32 +55,10 @@ RUN Set-Location -Path $env:SystemDrive\.; ` $env:BUILD_SRC = [string]::Format('{0}\build_src', $env:SystemDrive); ` [Environment]::SetEnvironmentVariable('BUILD_SRC', $env:BUILD_SRC, [EnvironmentVariableTarget]::Machine); ` ` - Write-Host ('Downloading {0} ...' -f $env:GIT_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; ` - ` - $sha256 = '273f55e881094d00877d64f56570b0c997c4da5dedcb26738d56481033c1eba1'; ` - $d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum GIT for Windows ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` - Write-Host ('Downloading {0} ...' -f $env:SEVEN_ZIP_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\7z.msi -Uri $env:SEVEN_ZIP_URL; ` - ` - $sha256 = '0F6AA6596D418B1694F62C8583DE05D24589B8D7FFACCE5A7DAB52AE71F832B6'; ` - $d_sha256 = (Get-FileHash $env:TEMP\7z.msi -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum 7-zip ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); ` Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; ` ` - $sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; ` + $sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; ` $d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` if ($d_sha256 -ne $sha256) { ` @@ -91,17 +66,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` exit 1; ` }; ` ` - Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; ` - ` - $sha256 = '15B914F38F2F2E2D6F7B9B8425FF22B7E406878B01920190B09CE0DD8259C6AA'; ` - $d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host ('Downloading {0} ...' -f $env:MSYS2_URL); ` Invoke-WebRequest -OutFile $env:TEMP\msys2.sfx.exe -Uri $(Invoke-RestMethod -UseBasicParsing $env:MSYS2_URL | ` Select -ExpandProperty "assets" | ` @@ -116,45 +80,31 @@ RUN Set-Location -Path $env:SystemDrive\.; ` # exit 1; ` }; ` ` + Write-Host ('Downloading {0} ...' -f $env:MINGW_URL); ` + Invoke-WebRequest -OutFile $env:TEMP\mingw.7z -Uri $env:MINGW_URL; ` + ` + $sha256 = '32bf3d1337c89f1f0326b42f49fea96fc7eb115af29b765a69bc69be546fd2a1'; ` + $d_sha256 = (Get-FileHash $env:TEMP\mingw.7z -Algorithm sha256).Hash; ` + Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` + if ($d_sha256 -ne $sha256) { ` + Write-Host ('Checksum Mingw-w64 ({0}) failed!' -f $d_sha256); ` + exit 1; ` + }; ` + ` Write-Host ('Downloading {0} ...' -f $env:VS_BUILDTOOLS_URL); ` Invoke-WebRequest -OutFile $env:TEMP\vs_buildtools.exe $env:VS_BUILDTOOLS_URL; ` ` - Write-Host 'Installing GIT...'; ` - Expand-Archive ` - -Path $env:TEMP\git.zip ` - -DestinationPath $env:SystemDrive\git\.; ` - Write-Host 'Removing downloaded...'; ` - ` - Write-Host 'Verifying install ("git version") ...'; ` - git version; ` - ` - Write-Host 'Installing 7z...'; ` - Start-Process ` - -FilePath $env:TEMP\7z.msi ` - -Wait ` - -ArgumentList '/qn /norestart'; ` - ` - Write-Host 'Verifying install ("7z -h") ...'; ` - 7z -h | Select -first 2; ` - ` Write-Host 'Installing Go Lang...'; ` Expand-Archive -Path $env:TEMP\go_lang.zip -DestinationPath $env:SystemDrive\; ` ` Write-Host 'Verifying install ("go version") ...'; ` go version; ` ` - Write-Host 'Installing Mingw-w64...'; ` - 7z x $env:TEMP\mingw.7z; ` - compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; ` - ` - Write-Host 'Verifying install ("gcc -v") ...'; ` - gcc -v; ` - ` Write-Host 'Installing MSYS2...'; ` & $env:TEMP\msys2.sfx.exe -y -o"""$env:SystemDrive\""" | Out-Null; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` bash -lc 'pacman --noprogressbar --noconfirm -Syuu'; ` - bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-x86_64-cmake'; ` + bash -lc 'pacman --noprogressbar --sync --quiet --noconfirm mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-7zip git'; ` bash -lc 'pacman --noprogressbar --noconfirm -Scc'; ` bash -lc 'rm -rf /usr/share/man/* /usr/share/doc/* /usr/share/locale/*'; ` bash -lc 'rm -rf /$MSYSTEM/usr/share/man/* /$MSYSTEM/usr/share/doc/* /$MSYSTEM/usr/share/locale/*'; ` @@ -166,6 +116,13 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Write-Host 'Verifying install ("bash --version") ...'; ` bash --version; ` ` + Write-Host 'Installing Mingw-w64...'; ` + 7z x $env:TEMP\mingw.7z; ` + compact /c /i /s:$env:SystemDrive\mingw64 | Out-Null; ` + ` + Write-Host 'Verifying install ("gcc -v") ...'; ` + gcc -v; ` + ` Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); ` cmd /C start /w $env:TEMP\vs_buildtools.exe ` --quiet ` @@ -200,41 +157,13 @@ RUN Set-Location -Path $env:SystemDrive\.; ` New-Item -ItemType directory -Path $env:BUILD_SRC -Force | Out-Null; ` Set-Location -Path $env:BUILD_SRC; ` ` - Write-Host ('Downloading {0} ...' -f $env:PCRE2_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\pcre2.zip -Uri $env:PCRE2_URL; ` - ` - $sha256 = 'F2816E84DD7A402068797501BF69E24ECA18D882ADB2143DE9F831F39B850257'; ` - $d_sha256 = (Get-FileHash $env:TEMP\pcre2.zip -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum PCRE2 library ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` - Write-Host ('Downloading {0} ...' -f $env:OPENSSL_URL); ` - Invoke-WebRequest -OutFile $env:TEMP\openssl.tar.gz -Uri $env:OPENSSL_URL; ` - ` - $sha256 = '53E66B043322A606ABF0087E7699A0E033A37FA13FEB9742DF35C3A33B18FB02'; ` - $d_sha256 = (Get-FileHash $env:TEMP\openssl.tar.gz -Algorithm sha256).Hash; ` - Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` - if ($d_sha256 -ne $sha256) { ` - Write-Host ('Checksum OpenSSL library ({0}) failed!' -f $d_sha256); ` - exit 1; ` - }; ` - ` Write-Host 'Extracting PCRE2 archive ...'; ` - Expand-Archive -Path $env:TEMP\pcre2.zip -DestinationPath $env:BUILD_SRC; ` - ` - Write-Host 'Removing downloaded ...'; ` - Remove-Item -Force -Path $env:TEMP\pcre2.zip; ` + Expand-Archive -Path $env:SystemDrive\pcre2.zip -DestinationPath $env:BUILD_SRC; ` Rename-Item -Path $env:BUILD_SRC\pcre2-$env:PCRE2_VERSION -NewName $env:BUILD_SRC\pcre2; ` ` Write-Host 'Extracting OpenSSL archive ...'; ` $env:SystemDirectory = [Environment]::SystemDirectory; ` - tar -zxf "$env:TEMP\openssl.tar.gz"; ` - ` - Write-Host 'Removing downloaded...'; ` - Remove-Item -Force -Path $env:TEMP\openssl.tar.gz; ` + tar -zxf "$env:SystemDrive\openssl.tar.gz"; ` Rename-Item -Path $env:BUILD_SRC\openssl-$env:OPENSSL_VERSION -NewName $env:BUILD_SRC\openssl; ` ` Write-Host 'Building PCRE2 library ...'; ` @@ -252,7 +181,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS"""; ` mingw32-make -s -j"""$env:NUMBER_OF_PROCESSORS""" install; ` mingw32-make -s clean | Out-Null; ` - Remove-Item -Path $env:BUILD_OUTPUT\pcre2\man -Force -Recurse; ` Remove-Item -Path $env:BUILD_OUTPUT\pcre2\share -Force -Recurse; ` Write-Host 'PCRE2 is ready...'; ` ` diff --git a/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 b/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 index 598b8d8c1..54158d259 100644 --- a/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 +++ b/Dockerfiles/build-base/windows/Dockerfile_vcpkg.agent2 @@ -3,7 +3,7 @@ ARG BUILD_BASE_IMAGE=mcr.microsoft.com/windows/servercore:ltsc2022 FROM $BUILD_BASE_IMAGE as builder_base -ARG GOLANG_VERSION=1.22.3 +ARG GOLANG_VERSION=1.23.2 ARG BUILD_ARCH=x64 ARG CPU_MODEL=AMD64 @@ -11,12 +11,12 @@ ARG CPU_MODEL=AMD64 ARG MAJOR_VERSION=7.2 ARG ZBX_VERSION=${MAJOR_VERSION} -ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.2/MinGit-2.33.0.2-busybox-64-bit.zip +ARG GIT_URL=https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/MinGit-2.47.1-busybox-64-bit.zip ARG VS_BUILDTOOLS_URL=https://aka.ms/vs/17/release/vs_buildtools.exe ARG GOLANG_URL=https://go.dev/dl/go$GOLANG_VERSION.windows-amd64.zip -ARG LLVM_MINGW=https://github.com/mstorsjo/llvm-mingw/releases/download/20240502/llvm-mingw-20240502-ucrt-x86_64.zip -ARG VCPKG_GIT=https://github.com/microsoft/vcpkg +ARG LLVM_MINGW=https://github.com/mstorsjo/llvm-mingw/releases/download/20241030/llvm-mingw-20241030-ucrt-x86_64.zip +ARG VCPKG_GIT=https://github.com/microsoft/vcpkg.git ENV ZBX_VERSION=$ZBX_VERSION ` BUILD_ARCH=$BUILD_ARCH CPU_MODEL=$CPU_MODEL ` @@ -49,7 +49,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Write-Host ('Downloading {0} ...' -f $env:GIT_URL); ` Invoke-WebRequest -OutFile $env:TEMP\git.zip -Uri $env:GIT_URL; ` ` - $sha256 = '273f55e881094d00877d64f56570b0c997c4da5dedcb26738d56481033c1eba1'; ` + $sha256 = '7b26cc61866c5c0ec050797f57837bf064eacd3aaa87ae316e96c6936235cf29'; ` $d_sha256 = (Get-FileHash $env:TEMP\git.zip -Algorithm sha256).Hash; ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` if ($d_sha256 -ne $sha256) { ` @@ -60,7 +60,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Write-Host ('Downloading {0} ...' -f $env:GOLANG_URL); ` Invoke-WebRequest -OutFile $env:TEMP\go_lang.zip -Uri $env:GOLANG_URL; ` ` - $sha256 = 'cab2af6951a6e2115824263f6df13ff069c47270f5788714fa1d776f7f60cb39'; ` + $sha256 = 'bc28fe3002cd65cec65d0e4f6000584dacb8c71bfaff8801dfb532855ca42513'; ` $d_sha256 = (Get-FileHash $env:TEMP\go_lang.zip -Algorithm sha256).Hash; ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` if ($d_sha256 -ne $sha256) { ` @@ -71,7 +71,7 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Write-Host ('Downloading {0} ...' -f $env:LLVM_MINGW); ` Invoke-WebRequest -OutFile $env:TEMP\llvm_mingw.zip -Uri $env:LLVM_MINGW; ` ` - $sha256 = '2487683A7341FFA4D0C1D107268D22DC722A43EA2E7C7F46DA0648E34F4F4C8B'; ` + $sha256 = '7dd9884c976bb20bcbcda9077aa3dd2e857cfd073012f39668cdeddb285d93f8'; ` $d_sha256 = (Get-FileHash $env:TEMP\llvm_mingw.zip -Algorithm sha256).Hash; ` Write-Host ('Verifying SHA256 ({0}) ...' -f $sha256); ` if ((Get-FileHash $env:TEMP\llvm_mingw.zip -Algorithm sha256).Hash -ne $sha256) { ` @@ -98,9 +98,9 @@ RUN Set-Location -Path $env:SystemDrive\.; ` ` Write-Host 'Installing LLVM MinGW ...'; ` Expand-Archive -Path $env:TEMP\llvm_mingw.zip -DestinationPath $env:SystemDrive\; ` - Move-Item -Path $env:SystemDrive\llvm-mingw-20240502-ucrt-x86_64\ -Destination $env:SystemDrive\llvm_mingw; ` + Move-Item -Path $env:SystemDrive\llvm-mingw-20241030-ucrt-x86_64\ -Destination $env:SystemDrive\llvm_mingw; ` ` - Write-Host 'Verifying install ("git version") ...'; ` + Write-Host 'Verifying install ("gcc -v") ...'; ` gcc -v; ` ` Write-Host ('{0} - Visual Studio components installing...' -f $(Get-Date -format 'u')); ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent b/Dockerfiles/build-mysql/windows/Dockerfile.agent index b6b1e3bff..e545c3715 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent @@ -30,6 +30,8 @@ LABEL org.opencontainers.image.title="Zabbix agent build (Windows)" ` SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +ADD config_templates C:\config_templates + RUN Set-Location -Path $env:SystemDrive\.; ` ` New-Item -ItemType directory -Path $env:SystemDrive\zabbix_src | Out-Null; ` @@ -70,5 +72,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agentd.exe $env:ZBX_OUTPUT_DIR\sbin; ` Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_get.exe $env:ZBX_OUTPUT_DIR\bin; ` Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_sender.exe $env:ZBX_OUTPUT_DIR\bin; ` - Copy-Item -Path $env:ZBX_SOURCES_DIR\conf\zabbix_agentd.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.conf; ` + Copy-Item -Path $env:ZBX_SOURCES_DIR\conf\zabbix_agentd.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agentd.conf_template; ` + Copy-Item -Recurse -Path $env:SystemDrive\config_templates\agent $env:ZBX_OUTPUT_DIR\conf\; ` Write-Host 'Zabbix binaries are compiled...'; diff --git a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 index 393437295..d4af05afb 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile.agent2 @@ -40,6 +40,8 @@ LABEL org.opencontainers.image.title="Zabbix agent 2 build (Windows)" ` org.opencontainers.image.version="${ZBX_VERSION}" ` org.opencontainers.image.source="${ZBX_SOURCES}" +ADD config_templates C:\config_templates + RUN Set-Location -Path $env:SystemDrive\.; ` ` New-Item -ItemType directory -Path $env:ZBX_SOURCES_DIR | Out-Null; ` @@ -72,8 +74,9 @@ RUN Set-Location -Path $env:SystemDrive\.; ` dumpbin /dependents $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agent2.exe; ` ` Copy-Item -Path $env:ZBX_SOURCES_DIR\bin\win64\zabbix_agent2.exe $env:ZBX_OUTPUT_DIR\sbin; ` - Copy-Item -Path $env:ZBX_SOURCES_DIR\src\go\conf\zabbix_agent2.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.conf; ` + Copy-Item -Path $env:ZBX_SOURCES_DIR\src\go\conf\zabbix_agent2.win.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.conf_template; ` Copy-Item -Recurse -Path $env:ZBX_SOURCES_DIR\src\go\conf\zabbix_agent2.d $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.d; ` + Copy-Item -Recurse -Path $env:SystemDrive\config_templates\agent2 $env:ZBX_OUTPUT_DIR\conf; ` mingw32-make -s clean; ` ` Write-Host ('Building Zabbix MongoDB plugin {0} version ...' -f $env:MONGODB_PLUGIN_VERSION); ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 index dcc1a268d..bfb149758 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_llvm_clang.agent2 @@ -110,7 +110,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\mssql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.d\plugins.d; ` mingw32-make -s clean; ` ` - Write-Host ('Building Zabbix Ember+ plugin {0} version ...' -f $env:EMBER_PLUS_PLUGIN_VERSION); ` git -c advice.detachedHead=false clone $env:EMBER_PLUS_PLUGIN_SOURCES --branch $env:EMBER_PLUS_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` Set-Location -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` diff --git a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 index 6785d38ec..1b448c541 100644 --- a/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 +++ b/Dockerfiles/build-mysql/windows/Dockerfile_vcpkg.agent2 @@ -111,7 +111,6 @@ RUN Set-Location -Path $env:SystemDrive\.; ` Copy-Item -Path $env:SystemDrive\mssql-plugin-$env:MSSQL_PLUGIN_VERSION\mssql.conf $env:ZBX_OUTPUT_DIR\conf\zabbix_agent2.d\plugins.d; ` mingw32-make -s clean; ` ` - Write-Host ('Building Zabbix Ember+ plugin {0} version ...' -f $env:EMBER_PLUS_PLUGIN_VERSION); ` git -c advice.detachedHead=false clone $env:EMBER_PLUS_PLUGIN_SOURCES --branch $env:EMBER_PLUS_PLUGIN_VERSION --depth 1 --single-branch $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` Set-Location -Path $env:SystemDrive\ember-plus-plugin-$env:EMBER_PLUS_PLUGIN_VERSION; ` diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd.conf new file mode 100644 index 000000000..d195b9047 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd.conf @@ -0,0 +1,28 @@ +# This is a configuration file for Zabbix agent service (Windows) +# To get more information about Zabbix, visit https://www.zabbix.com + +############ ADVANCED PARAMETERS ################# + +### Option: Include +# You may include individual files in the configuration file. +# +# Mandatory: no +# Default: +# Include= + +# Include=c:\zabbix\zabbix_agentd.userparams.conf +# Include=c:\zabbix\zabbix_agentd.conf.d\ +# Include=c:\zabbix\zabbix_agentd.conf.d\*.conf + +Include=C:\zabbix\conf\zabbix_agentd_active_checks.conf +Include=C:\zabbix\conf\zabbix_agentd_aliases.conf +Include=C:\zabbix\conf\zabbix_agentd_item_keys.conf +Include=C:\zabbix\conf\zabbix_agentd_logging.conf +Include=C:\zabbix\conf\zabbix_agentd_network.conf +Include=C:\zabbix\conf\zabbix_agentd_passive_checks.conf +Include=C:\zabbix\conf\zabbix_agentd_perf_counters.conf +Include=C:\zabbix\conf\zabbix_agentd_timeouts.conf +Include=C:\zabbix\conf\zabbix_agentd_tls.conf +Include=C:\zabbix\conf\zabbix_agentd_user_parameters.conf + +Include=C:\zabbix\conf\zabbix_agentd.d\*.conf diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_active_checks.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_active_checks.conf new file mode 100644 index 000000000..939fbc4fa --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_active_checks.conf @@ -0,0 +1,157 @@ +##### Active checks related + +### Option: ServerActive +# Zabbix server/proxy address or cluster configuration to get active checks from. +# Server/proxy address is IP address or DNS name and optional port separated by colon. +# Cluster configuration is one or more server addresses separated by semicolon. +# Multiple Zabbix servers/clusters and Zabbix proxies can be specified, separated by comma. +# More than one Zabbix proxy should not be specified from each Zabbix server/cluster. +# If Zabbix proxy is specified then Zabbix server/cluster for that proxy should not be specified. +# Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed. +# If port is not specified, default port is used. +# IPv6 addresses must be enclosed in square brackets if port for that host is specified. +# If port is not specified, square brackets for IPv6 addresses are optional. +# If this parameter is not specified, active checks are disabled. +# Example for Zabbix proxy: +# ServerActive=127.0.0.1:10051 +# Example for multiple servers: +# ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] +# Example for high availability: +# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051;zabbix.cluster.node3 +# Example for high availability with two clusters and one server: +# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051,zabbix.cluster2.node1;zabbix.cluster2.node2,zabbix.domain +# +# Mandatory: no +# Default: +# ServerActive= + +ServerActive=${ZBX_ACTIVESERVERS} + +### Option: Hostname +# List of comma delimited unique, case sensitive hostnames. +# Required for active checks and must match hostnames as configured on the server. +# Value is acquired from HostnameItem if undefined. +# +# Mandatory: no +# Default: +# Hostname= + +Hostname=${ZBX_HOSTNAME} + +### Option: HostnameItem +# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. +# Does not support UserParameters or aliases. +# +# Mandatory: no +# Default: +# HostnameItem=system.hostname + +HostnameItem=${ZBX_HOSTNAMEITEM} + +### Option: HostMetadata +# Optional parameter that defines host metadata. +# Host metadata is used at host auto-registration process. +# An agent will issue an error and not start if the value is over limit of 2034 bytes. +# If not defined, value will be acquired from HostMetadataItem. +# +# Mandatory: no +# Range: 0-2034 bytes +# Default: +# HostMetadata= + +HostMetadata=${ZBX_METADATA} + +### Option: HostMetadataItem +# Optional parameter that defines an item used for getting host metadata. +# Host metadata is used at host auto-registration process. +# During an auto-registration request an agent will log a warning message if +# the value returned by specified item is over limit of 65535 characters. +# This option is only used when HostMetadata is not defined. +# +# Mandatory: no +# Default: +# HostMetadataItem= + +HostMetadataItem=${ZBX_METADATAITEM} + +### Option: HostInterface +# Optional parameter that defines host interface. +# Host interface is used at host auto-registration process. +# An agent will issue an error and not start if the value is over limit of 255 characters. +# If not defined, value will be acquired from HostInterfaceItem. +# +# Mandatory: no +# Range: 0-255 characters +# Default: +# HostInterface= + +HostInterface=${ZBX_HOSTINTERFACE} + +### Option: HostInterfaceItem +# Optional parameter that defines an item used for getting host interface. +# Host interface is used at host auto-registration process. +# During an auto-registration request an agent will log a warning message if +# the value returned by specified item is over limit of 255 characters. +# This option is only used when HostInterface is not defined. +# +# Mandatory: no +# Default: +# HostInterfaceItem= + +HostInterfaceItem=${ZBX_HOSTINTERFACEITEM} + +### Option: RefreshActiveChecks +# How often list of active checks is refreshed, in seconds. +# +# Mandatory: no +# Range: 1-86400 +# Default: +# RefreshActiveChecks=5 + +RefreshActiveChecks=${ZBX_REFRESHACTIVECHECKS} + +### Option: BufferSend +# Do not keep data longer than N seconds in buffer. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# BufferSend=5 + +BufferSend=${ZBX_BUFFERSEND} + +### Option: BufferSize +# Maximum number of values in a memory buffer. The agent will send +# all collected data to Zabbix Server or Proxy if the buffer is full. +# +# Mandatory: no +# Range: 2-65535 +# Default: +# BufferSize=100 + +BufferSize=${ZBX_BUFFERSIZE} + +### Option: MaxLinesPerSecond +# Maximum number of new lines the agent will send per second to Zabbix Server +# or Proxy processing 'log' and 'logrt' active checks. +# The provided value will be overridden by the parameter 'maxlines', +# provided in 'log' or 'logrt' item keys. +# +# Mandatory: no +# Range: 1-1000 +# Default: +# MaxLinesPerSecond=20 + +MaxLinesPerSecond=${ZBX_MAXLINESPERSECOND} + +### Option: HeartbeatFrequency +# Frequency of heartbeat messages in seconds. +# Used for monitoring availability of active checks. +# 0 - heartbeat messages disabled. +# +# Mandatory: no +# Range: 0-3600 +# Default: 60 +# HeartbeatFrequency= + +HeartbeatFrequency=${ZBX_HEARTBEATFREQUENCY} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_aliases.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_aliases.conf new file mode 100644 index 000000000..3205405bf --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_aliases.conf @@ -0,0 +1,12 @@ +### Option: Alias +# Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one. +# Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed. +# Different Alias keys may reference the same item key. +# For example, to retrieve paging file usage in percents from the server: +# Alias=pg_usage:perf_counter[\Paging File(_Total)\% Usage] +# Now shorthand key pg_usage may be used to retrieve data. +# Aliases can be used in HostMetadataItem but not in HostnameItem or PerfCounter parameters. +# +# Mandatory: no +# Range: +# Default: diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_item_keys.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_item_keys.conf new file mode 100644 index 000000000..e508eaf30 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_item_keys.conf @@ -0,0 +1,20 @@ +### Option: AllowKey +# Allow execution of item keys matching pattern. +# Multiple keys matching rules may be defined in combination with DenyKey. +# Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments. +# Parameters are processed one by one according their appearance order. +# If no AllowKey or DenyKey rules defined, all keys are allowed. +# +# Mandatory: no + +### Option: DenyKey +# Deny execution of items keys matching pattern. +# Multiple keys matching rules may be defined in combination with AllowKey. +# Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments. +# Parameters are processed one by one according their appearance order. +# If no AllowKey or DenyKey rules defined, all keys are allowed. +# Unless another system.run[*] rule is specified DenyKey=system.run[*] is added by default. +# +# Mandatory: no +# Default: +# DenyKey=system.run[*] diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_logging.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_logging.conf new file mode 100644 index 000000000..1e168e890 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_logging.conf @@ -0,0 +1,38 @@ +### Option: LogType +# Specifies where log messages are written to: +# system - syslog +# file - file specified with LogFile parameter +# console - standard output +# +# Mandatory: no +# Default: +# LogType=file + +LogType=console + +### Option: DebugLevel +# Specifies debug level: +# 0 - basic information about starting and stopping of Zabbix processes +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# 5 - extended debugging (produces even more information) +# +# Mandatory: no +# Range: 0-5 +# Default: +# DebugLevel=3 + +DebugLevel=${ZBX_DEBUGLEVEL} + +### Option: LogRemoteCommands +# Enable logging of executed shell commands as warnings. +# 0 - disabled +# 1 - enabled +# +# Mandatory: no +# Default: +# LogRemoteCommands=0 + +LogRemoteCommands=${ZBX_LOGREMOTECOMMANDS} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_network.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_network.conf new file mode 100644 index 000000000..441477ba7 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_network.conf @@ -0,0 +1,41 @@ +### Option: ListenPort +# Agent will listen on this port for connections from the server. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10050 + +ListenPort=${ZBX_LISTENPORT} + +### Option: ListenIP +# List of comma delimited IP addresses that the agent should listen on. +# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +ListenIP=${ZBX_LISTENIP} + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +SourceIP=${ZBX_SOURCEIP} + +####### For advanced users - TCP-related fine-tuning parameters ####### + +## Option: ListenBacklog +# The maximum number of pending connections in the queue. This parameter is passed to +# listen() function as argument 'backlog' (see "man listen"). +# +# Mandatory: no +# Range: 0 - INT_MAX (depends on system, too large values may be silently truncated to implementation-specified maximum) +# Default: SOMAXCONN (hard-coded constant, depends on system) +# ListenBacklog= + +ListenBacklog=${ZBX_LISTENBACKLOG} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_passive_checks.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_passive_checks.conf new file mode 100644 index 000000000..0e618c524 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_passive_checks.conf @@ -0,0 +1,26 @@ +##### Passive checks related + +### Option: Server +# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies. +# Incoming connections will be accepted only from the hosts listed here. +# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally +# and '::/0' will allow any IPv4 or IPv6 address. +# '0.0.0.0/0' can be used to allow any IPv4 address. +# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com +# +# Mandatory: yes, if StartAgents is not explicitly set to 0 +# Default: +# Server= + +Server=${ZBX_PASSIVESERVERS} + +### Option: StartAgents +# Number of pre-forked instances of zabbix_agentd that process passive checks. +# If set to 0, disables passive checks and the agent will not listen on any TCP port. +# +# Mandatory: no +# Range: 0-100 +# Default: +# StartAgents=10 + +StartAgents=${ZBX_STARTAGENTS} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_perf_counters.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_perf_counters.conf new file mode 100644 index 000000000..d2757e3ec --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_perf_counters.conf @@ -0,0 +1,12 @@ +### Option: PerfCounter +# Syntax: ,"", +# Defines new parameter which is an average value for system performance counter for the specified time period (in seconds). +# For example, if you wish to receive average number of processor interrupts per second for last minute, you can define new parameter "interrupts" as following: +# PerfCounter = interrupts,"\Processor(0)\Interrupts/sec",60 +# Please note double quotes around performance counter path. +# Samples for calculating average value will be taken every second. +# You may run "typeperf -qx" to get list of all performance counters available in Windows. +# +# Mandatory: no +# Range: +# Default: diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_timeouts.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_timeouts.conf new file mode 100644 index 000000000..d50cf2d75 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_timeouts.conf @@ -0,0 +1,9 @@ +### Option: Timeout +# Specifies how long to wait (in seconds) for establishing connection and exchanging data with Zabbix proxy or server. +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +Timeout=${ZBX_TIMEOUT} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_tls.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_tls.conf new file mode 100644 index 000000000..c4e59b803 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_tls.conf @@ -0,0 +1,178 @@ +####### TLS-RELATED PARAMETERS ####### + +### Option: TLSConnect +# How the agent should connect to server or proxy. Used for active checks. +# Only one value can be specified: +# unencrypted - connect without encryption +# psk - connect using TLS and a pre-shared key +# cert - connect using TLS and a certificate +# +# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) +# Default: +# TLSConnect=unencrypted + +TLSConnect=${ZBX_TLSCONNECT} + +### Option: TLSAccept +# What incoming connections to accept. +# Multiple values can be specified, separated by comma: +# unencrypted - accept connections without encryption +# psk - accept connections secured with TLS and a pre-shared key +# cert - accept connections secured with TLS and a certificate +# +# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) +# Default: +# TLSAccept=unencrypted + +TLSAccept=${ZBX_TLSACCEPT} + +### Option: TLSCAFile +# Full pathname of a file containing the top-level CA(s) certificates for +# peer certificate verification. +# +# Mandatory: no +# Default: +# TLSCAFile= + +TLSCAFile=${ZBX_TLSCAFILE} + +### Option: TLSCRLFile +# Full pathname of a file containing revoked certificates. +# +# Mandatory: no +# Default: +# TLSCRLFile= + +TLSCRLFile=${ZBX_TLSCRLFILE} + +### Option: TLSServerCertIssuer +# Allowed server certificate issuer. +# +# Mandatory: no +# Default: +# TLSServerCertIssuer= + +TLSServerCertIssuer=${ZBX_TLSSERVERCERTISSUER} + +### Option: TLSServerCertSubject +# Allowed server certificate subject. +# +# Mandatory: no +# Default: +# TLSServerCertSubject= + +TLSServerCertSubject=${ZBX_TLSSERVERCERTSUBJECT} + +### Option: TLSCertFile +# Full pathname of a file containing the agent certificate or certificate chain. +# +# Mandatory: no +# Default: +# TLSCertFile= + +TLSCertFile=${ZBX_TLSCERTFILE} + +### Option: TLSKeyFile +# Full pathname of a file containing the agent private key. +# +# Mandatory: no +# Default: +# TLSKeyFile= + +TLSKeyFile=${ZBX_TLSKEYFILE} + +### Option: TLSPSKIdentity +# Unique, case sensitive string used to identify the pre-shared key. +# +# Mandatory: no +# Default: +# TLSPSKIdentity= + +TLSPSKIdentity=${ZBX_TLSPSKIDENTITY} + +### Option: TLSPSKFile +# Full pathname of a file containing the pre-shared key. +# +# Mandatory: no +# Default: +# TLSPSKFile= + +TLSPSKFile=${ZBX_TLSPSKFILE} + +####### For advanced users - TLS ciphersuite selection criteria ####### + +### Option: TLSCipherCert13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for certificate-based encryption. +# +# Mandatory: no +# Default: +# TLSCipherCert13= + +TLSCipherCert13=${ZBX_TLSCIPHERCERT13} + +### Option: TLSCipherCert +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. +# Override the default ciphersuite selection criteria for certificate-based encryption. +# Example for GnuTLS: +# NONE:+VERS-TLS1.2:+ECDHE-RSA:+RSA:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509 +# Example for OpenSSL: +# EECDH+aRSA+AES128:RSA+aRSA+AES128 +# +# Mandatory: no +# Default: +# TLSCipherCert= + +TLSCipherCert=${ZBX_TLSCIPHERCERT} + +### Option: TLSCipherPSK13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for PSK-based encryption. +# Example: +# TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 +# +# Mandatory: no +# Default: +# TLSCipherPSK13= + +TLSCipherPSK13=${ZBX_TLSCIPHERPSK13} + +### Option: TLSCipherPSK +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. +# Override the default ciphersuite selection criteria for PSK-based encryption. +# Example for GnuTLS: +# NONE:+VERS-TLS1.2:+ECDHE-PSK:+PSK:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL +# Example for OpenSSL: +# kECDHEPSK+AES128:kPSK+AES128 +# +# Mandatory: no +# Default: +# TLSCipherPSK= + +TLSCipherPSK=${ZBX_TLSCIPHERPSK} + +### Option: TLSCipherAll13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for certificate- and PSK-based encryption. +# Example: +# TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 +# +# Mandatory: no +# Default: +# TLSCipherAll13= + +TLSCipherAll13=${ZBX_TLSCIPHERALL13} + +### Option: TLSCipherAll +# GnuTLS priority string or OpenSSL (TLS 1.2) cipher string. +# Override the default ciphersuite selection criteria for certificate- and PSK-based encryption. +# Example for GnuTLS: +# NONE:+VERS-TLS1.2:+ECDHE-RSA:+RSA:+ECDHE-PSK:+PSK:+AES-128-GCM:+AES-128-CBC:+AEAD:+SHA256:+SHA1:+CURVE-ALL:+COMP-NULL:+SIGN-ALL:+CTYPE-X.509 +# Example for OpenSSL: +# EECDH+aRSA+AES128:RSA+aRSA+AES128:kECDHEPSK+AES128:kPSK+AES128 +# +# Mandatory: no +# Default: +# TLSCipherAll= + +TLSCipherAll=${ZBX_TLSCIPHERALL} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_user_parameters.conf b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_user_parameters.conf new file mode 100644 index 000000000..fd664958c --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent/zabbix_agentd_user_parameters.conf @@ -0,0 +1,35 @@ +####### USER-DEFINED MONITORED PARAMETERS ####### + +### Option: UnsafeUserParameters +# Allow all characters to be passed in arguments to user-defined parameters. +# The following characters are not allowed: +# \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @ +# Additionally, newline characters are not allowed. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Range: 0-1 +# Default: +# UnsafeUserParameters=0 + +UnsafeUserParameters=${ZBX_UNSAFEUSERPARAMETERS} + +### Option: UserParameter +# User-defined parameter to monitor. There can be several user-defined parameters. +# Format: UserParameter=, +# See 'zabbix_agentd' directory for examples. +# +# Mandatory: no +# Default: +# UserParameter= + +### Option: UserParameterDir +# Directory to execute UserParameter commands from. Only one entry is allowed. +# When executing UserParameter commands the agent will change the working directory to the one +# specified in the UserParameterDir option. +# This way UserParameter commands can be specified using the relative ./ prefix. +# +# Mandatory: no +# Default: +# UserParameterDir= diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2.conf new file mode 100644 index 000000000..b37d2ba60 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2.conf @@ -0,0 +1,43 @@ +# This is a configuration file for Zabbix agent 2 (Windows) +# To get more information about Zabbix, visit https://www.zabbix.com + +### Option: Include +# You may include individual files or all files in a directory in the configuration file. +# Installing Zabbix will create include directory in /usr/local/etc, unless modified during the compile time. +# +# Mandatory: no +# Default: +# Include= + +# Include=c:\zabbix\zabbix_agent2.userparams.conf +# Include=c:\zabbix\zabbix_agent2.conf.d\ +# Include=c:\zabbix\zabbix_agent2.conf.d\*.conf + +Include=C:\zabbix\conf\zabbix_agent2_active_checks.conf +Include=C:\zabbix\conf\zabbix_agent2_aliases.conf +Include=C:\zabbix\conf\zabbix_agent2_item_keys.conf +Include=C:\zabbix\conf\zabbix_agent2_locations.conf +Include=C:\zabbix\conf\zabbix_agent2_logging.conf +Include=C:\zabbix\conf\zabbix_agent2_network.conf +Include=C:\zabbix\conf\zabbix_agent2_passive_checks.conf +Include=C:\zabbix\conf\zabbix_agent2_timeouts.conf +Include=C:\zabbix\conf\zabbix_agent2_tls.conf +Include=C:\zabbix\conf\zabbix_agent2_user_parameters.conf + +Include=C:\zabbix\conf\zabbix_agentd.d\*.conf +Include=C:\zabbix\conf\zabbix_agent2.d\*.conf + +####### PLUGIN-SPECIFIC PARAMETERS ####### + +### Option: Plugins +# A plugin can have one or more plugin specific configuration parameters in format: +# Plugins..= +# Plugins..= +# +# Mandatory: no +# Range: +# Default: + +# Include configuration files for plugins + +Include=C:\zabbix\conf\zabbix_agent2.d\plugins.d\*.conf diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_active_checks.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_active_checks.conf new file mode 100644 index 000000000..13decb188 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_active_checks.conf @@ -0,0 +1,213 @@ +##### Active checks related + +### Option: ServerActive +# Zabbix server/proxy address or cluster configuration to get active checks from. +# Server/proxy address is IP address or DNS name and optional port separated by colon. +# Cluster configuration is one or more server addresses separated by semicolon. +# Multiple Zabbix servers/clusters and Zabbix proxies can be specified, separated by comma. +# More than one Zabbix proxy should not be specified from each Zabbix server/cluster. +# If Zabbix proxy is specified then Zabbix server/cluster for that proxy should not be specified. +# Multiple comma-delimited addresses can be provided to use several independent Zabbix servers in parallel. Spaces are allowed. +# If port is not specified, default port is used. +# IPv6 addresses must be enclosed in square brackets if port for that host is specified. +# If port is not specified, square brackets for IPv6 addresses are optional. +# If this parameter is not specified, active checks are disabled. +# Example for Zabbix proxy: +# ServerActive=127.0.0.1:10051 +# Example for multiple servers: +# ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1] +# Example for high availability: +# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051;zabbix.cluster.node3 +# Example for high availability with two clusters and one server: +# ServerActive=zabbix.cluster.node1;zabbix.cluster.node2:20051,zabbix.cluster2.node1;zabbix.cluster2.node2,zabbix.domain +# +# Mandatory: no +# Default: +# ServerActive= + +ServerActive=${ZBX_ACTIVESERVERS} + +### Option: Hostname +# List of comma delimited unique, case sensitive hostnames. +# Required for active checks and must match hostnames as configured on the server. +# Value is acquired from HostnameItem if undefined. +# +# Mandatory: no +# Default: +# Hostname= + +Hostname=${ZBX_HOSTNAME} + +### Option: HostnameItem +# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined. +# Does not support UserParameters or aliases. +# +# Mandatory: no +# Default: +# HostnameItem=system.hostname + +HostnameItem=${ZBX_HOSTNAMEITEM} + +### Option: HostMetadata +# Optional parameter that defines host metadata. +# Host metadata is used at host auto-registration process. +# An agent will issue an error and not start if the value is over limit of 2034 bytes. +# If not defined, value will be acquired from HostMetadataItem. +# +# Mandatory: no +# Range: 0-2034 bytes +# Default: +# HostMetadata= + +HostMetadata=${ZBX_METADATA} + +### Option: HostMetadataItem +# Optional parameter that defines an item used for getting host metadata. +# Host metadata is used at host auto-registration process. +# During an auto-registration request an agent will log a warning message if +# the value returned by specified item is over limit of 65535 characters. +# This option is only used when HostMetadata is not defined. +# +# Mandatory: no +# Default: +# HostMetadataItem= + +HostMetadataItem=${ZBX_METADATAITEM} + +### Option: HostInterface +# Optional parameter that defines host interface. +# Host interface is used at host auto-registration process. +# An agent will issue an error and not start if the value is over limit of 255 characters. +# If not defined, value will be acquired from HostInterfaceItem. +# +# Mandatory: no +# Range: 0-255 characters +# Default: +# HostInterface= + +HostInterface=${ZBX_HOSTINTERFACE} + +### Option: HostInterfaceItem +# Optional parameter that defines an item used for getting host interface. +# Host interface is used at host auto-registration process. +# During an auto-registration request an agent will log a warning message if +# the value returned by specified item is over limit of 255 characters. +# This option is only used when HostInterface is not defined. +# +# Mandatory: no +# Default: +# HostInterfaceItem= + +HostInterfaceItem=${ZBX_HOSTINTERFACEITEM} + +### Option: RefreshActiveChecks +# How often list of active checks is refreshed, in seconds. +# +# Mandatory: no +# Range: 1-86400 +# Default: +# RefreshActiveChecks=5 + +RefreshActiveChecks=${ZBX_REFRESHACTIVECHECKS} + +### Option: BufferSend +# Do not keep data longer than N seconds in buffer. +# +# Mandatory: no +# Range: 1-3600 +# Default: +# BufferSend=5 + +BufferSend=${ZBX_BUFFERSEND} + +### Option: BufferSize +# Maximum number of values in a memory buffer. The agent will send +# all collected data to Zabbix Server or Proxy if the buffer is full. +# +# Mandatory: no +# Range: 2-65535 +# Default: +# BufferSize=1000 + +BufferSize=${ZBX_BUFFERSIZE} + +### Option: EnablePersistentBuffer +# Enable usage of local persistent storage for active items. +# 0 - disabled, in-memory buffer is used (default); 1 - use persistent buffer +# Mandatory: no +# Range: 0-1 +# Default: +# EnablePersistentBuffer=0 + +EnablePersistentBuffer=${ZBX_ENABLEPERSISTENTBUFFER} + +### Option: PersistentBufferPeriod +# Zabbix Agent2 will keep data for this time period in case of no +# connectivity with Zabbix server or proxy. Older data will be lost. Log data will be preserved. +# Option is valid if EnablePersistentBuffer=1 +# +# Mandatory: no +# Range: 1m-365d +# Default: +# PersistentBufferPeriod=1h + +PersistentBufferPeriod=${ZBX_PERSISTENTBUFFERPERIOD} + +### Option: PersistentBufferFile +# Full filename. Zabbix Agent2 will keep SQLite database in this file. +# Option is valid if EnablePersistentBuffer=1 +# +# Mandatory: no +# Default: +# PersistentBufferFile= + +PersistentBufferFile=${ZBX_PERSISTENTBUFFERFILE} + +### Option: Plugins.Log.MaxLinesPerSecond +# Maximum number of new lines the agent will send per second to Zabbix Server +# or Proxy processing 'log' and 'logrt' active checks. +# The provided value will be overridden by the parameter 'maxlines', +# provided in 'log' or 'logrt' item keys. +# +# Mandatory: no +# Range: 1-1000 +# Default: +# Plugins.Log.MaxLinesPerSecond=20 + +Plugins.Log.MaxLinesPerSecond=${ZBX_MAXLINESPERSECOND} + +### Option: Plugins.WindowsEventlog.MaxLinesPerSecond +# Maximum number of new lines the agent will send per second to Zabbix Server +# or Proxy processing 'eventlog' checks. +# The provided value will be overridden by the parameter 'maxlines', +# provided in 'eventlog' item keys. +# +# Mandatory: no +# Range: 1-1000 +# Default: +# Plugins.WindowsEventlog.MaxLinesPerSecond=20 + +Plugins.WindowsEventlog.MaxLinesPerSecond=${ZBX_EVENTLOGMAXLINESPERSECOND} + +### Option: HeartbeatFrequency +# Frequency of heartbeat messages in seconds. +# Used for monitoring availability of active checks. +# 0 - heartbeat messages disabled. +# +# Mandatory: no +# Range: 0-3600 +# Default: 60 +# HeartbeatFrequency= + +HeartbeatFrequency=${ZBX_HEARTBEAT_FREQUENCY} + +### Option: ForceActiveChecksOnStart +# Perform active checks immediately after restart for first received configuration. +# Also available as per plugin configuration, example: Plugins.Uptime.System.ForceActiveChecksOnStart=1 +# +# Mandatory: no +# Range: 0-1 +# Default: +# ForceActiveChecksOnStart=0 + +ForceActiveChecksOnStart=${ZBX_FORCEACTIVECHECKSONSTART} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_aliases.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_aliases.conf new file mode 100644 index 000000000..892723bea --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_aliases.conf @@ -0,0 +1,12 @@ +### Option: Alias +# Sets an alias for an item key. It can be used to substitute long and complex item key with a smaller and simpler one. +# Multiple Alias parameters may be present. Multiple parameters with the same Alias key are not allowed. +# Different Alias keys may reference the same item key. +# For example, to retrieve the ID of user 'zabbix': +# Alias=zabbix.userid:vfs.file.regexp[/etc/passwd,^zabbix:.:([0-9]+),,,,\1] +# Now shorthand key zabbix.userid may be used to retrieve data. +# Aliases can be used in HostMetadataItem but not in HostnameItem parameters. +# +# Mandatory: no +# Range: +# Default: diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_item_keys.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_item_keys.conf new file mode 100644 index 000000000..e508eaf30 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_item_keys.conf @@ -0,0 +1,20 @@ +### Option: AllowKey +# Allow execution of item keys matching pattern. +# Multiple keys matching rules may be defined in combination with DenyKey. +# Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments. +# Parameters are processed one by one according their appearance order. +# If no AllowKey or DenyKey rules defined, all keys are allowed. +# +# Mandatory: no + +### Option: DenyKey +# Deny execution of items keys matching pattern. +# Multiple keys matching rules may be defined in combination with AllowKey. +# Key pattern is wildcard expression, which support "*" character to match any number of any characters in certain position. It might be used in both key name and key arguments. +# Parameters are processed one by one according their appearance order. +# If no AllowKey or DenyKey rules defined, all keys are allowed. +# Unless another system.run[*] rule is specified DenyKey=system.run[*] is added by default. +# +# Mandatory: no +# Default: +# DenyKey=system.run[*] diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_locations.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_locations.conf new file mode 100644 index 000000000..d479597f2 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_locations.conf @@ -0,0 +1,17 @@ +### Option:PluginSocket +# Path to unix socket for external plugin communications. +# +# Mandatory: no +# Default:\\.\pipe\agent.plugin.sock +# PluginSocket= + +PluginSocket=\\.\pipe\agent.plugin.sock + +### Option: ControlSocket +# The control socket, used to send runtime commands with '-R' option. +# +# Mandatory: no +# Default: +# ControlSocket= + +ControlSocket=\\.\pipe\agent.sock diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_logging.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_logging.conf new file mode 100644 index 000000000..c6a4f4bed --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_logging.conf @@ -0,0 +1,38 @@ +### Option: LogType +# Specifies where log messages are written to: +# system - syslog +# file - file specified with LogFile parameter +# console - standard output +# +# Mandatory: no +# Default: +# LogType=file + +LogType=console + +### Option: DebugLevel +# Specifies debug level: +# 0 - basic information about starting and stopping of Zabbix processes +# 1 - critical information +# 2 - error information +# 3 - warnings +# 4 - for debugging (produces lots of information) +# 5 - extended debugging (produces even more information) +# +# Mandatory: no +# Range: 0-5 +# Default: +# DebugLevel=3 + +DebugLevel=${ZBX_DEBUGLEVEL} + +### Option: Plugins.SystemRun.LogRemoteCommands +# Enable logging of executed shell commands as warnings. +# 0 - disabled +# 1 - enabled +# +# Mandatory: no +# Default: +# Plugins.SystemRun.LogRemoteCommands=0 + +Plugins.SystemRun.LogRemoteCommands=${ZBX_LOGREMOTECOMMANDS} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_network.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_network.conf new file mode 100644 index 000000000..3a7ce6461 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_network.conf @@ -0,0 +1,38 @@ +### Option: ListenIP +# List of comma delimited IP addresses that the agent should listen on. +# First IP address is sent to Zabbix server if connecting to it to retrieve list of active checks. +# +# Mandatory: no +# Default: +# ListenIP=0.0.0.0 + +ListenIP=${ZBX_LISTENIP} + +### Option: ListenPort +# Agent will listen on this port for connections from the server. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# ListenPort=10050 + +ListenPort=${ZBX_LISTENPORT} + +### Option: SourceIP +# Source IP address for outgoing connections. +# +# Mandatory: no +# Default: +# SourceIP= + +SourceIP=${ZBX_SOURCEIP} + +### Option: StatusPort +# Agent will listen on this port for HTTP status requests. +# +# Mandatory: no +# Range: 1024-32767 +# Default: +# StatusPort= + +StatusPort=${ZBX_STATUSPORT} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_passive_checks.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_passive_checks.conf new file mode 100644 index 000000000..cc8b98609 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_passive_checks.conf @@ -0,0 +1,15 @@ +##### Passive checks related + +### Option: Server +# List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies. +# Incoming connections will be accepted only from the hosts listed here. +# If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally +# and '::/0' will allow any IPv4 or IPv6 address. +# '0.0.0.0/0' can be used to allow any IPv4 address. +# Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com +# +# Mandatory: yes, if StartAgents is not explicitly set to 0 +# Default: +# Server= + +Server=${ZBX_PASSIVESERVERS} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_timeouts.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_timeouts.conf new file mode 100644 index 000000000..d56ff5810 --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_timeouts.conf @@ -0,0 +1,19 @@ +### Option: Timeout +# Specifies how long to wait (in seconds) for establishing connection and exchanging data with Zabbix proxy or server. +# +# Mandatory: no +# Range: 1-30 +# Default: +# Timeout=3 + +Timeout=${ZBX_TIMEOUT} + +### Option:PluginTimeout +# Timeout for connections with external plugins. +# +# Mandatory: no +# Range: 1-30 +# Default: +# PluginTimeout= + +PluginTimeout=${ZBX_PLUGINTIMEOUT} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_tls.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_tls.conf new file mode 100644 index 000000000..7f2b8be8c --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_tls.conf @@ -0,0 +1,136 @@ +####### TLS-RELATED PARAMETERS ####### + +### Option: TLSConnect +# How the agent should connect to server or proxy. Used for active checks. +# Only one value can be specified: +# unencrypted - connect without encryption +# psk - connect using TLS and a pre-shared key +# cert - connect using TLS and a certificate +# +# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) +# Default: +# TLSConnect=unencrypted + +TLSConnect=${ZBX_TLSCONNECT} + +### Option: TLSAccept +# What incoming connections to accept. +# Multiple values can be specified, separated by comma: +# unencrypted - accept connections without encryption +# psk - accept connections secured with TLS and a pre-shared key +# cert - accept connections secured with TLS and a certificate +# +# Mandatory: yes, if TLS certificate or PSK parameters are defined (even for 'unencrypted' connection) +# Default: +# TLSAccept=unencrypted + +TLSAccept=${ZBX_TLSACCEPT} + +### Option: TLSCAFile +# Full pathname of a file containing the top-level CA(s) certificates for +# peer certificate verification. +# +# Mandatory: no +# Default: +# TLSCAFile= + +TLSCAFile=${ZBX_TLSCAFILE} + +### Option: TLSCRLFile +# Full pathname of a file containing revoked certificates. +# +# Mandatory: no +# Default: +# TLSCRLFile= + +TLSCRLFile=${ZBX_TLSCRLFILE} + +### Option: TLSServerCertIssuer +# Allowed server certificate issuer. +# +# Mandatory: no +# Default: +# TLSServerCertIssuer= + +TLSServerCertIssuer=${ZBX_TLSSERVERCERTISSUER} + +### Option: TLSServerCertSubject +# Allowed server certificate subject. +# +# Mandatory: no +# Default: +# TLSServerCertSubject= + +TLSServerCertSubject=${ZBX_TLSSERVERCERTSUBJECT} + +### Option: TLSCertFile +# Full pathname of a file containing the agent certificate or certificate chain. +# +# Mandatory: no +# Default: +# TLSCertFile= + +TLSCertFile=${ZBX_TLSCERTFILE} + +### Option: TLSKeyFile +# Full pathname of a file containing the agent private key. +# +# Mandatory: no +# Default: +# TLSKeyFile= + +TLSKeyFile=${ZBX_TLSKEYFILE} + +### Option: TLSPSKIdentity +# Unique, case sensitive string used to identify the pre-shared key. +# +# Mandatory: no +# Default: +# TLSPSKIdentity= + +TLSPSKIdentity=${ZBX_TLSPSKIDENTITY} + +### Option: TLSPSKFile +# Full pathname of a file containing the pre-shared key. +# +# Mandatory: no +# Default: +# TLSPSKFile= + +TLSPSKFile=${ZBX_TLSPSKFILE} + +####### For advanced users - TLS ciphersuite selection criteria ####### + +### Option: TLSCipherCert13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for certificate-based encryption. +# +# Mandatory: no +# Default: +# TLSCipherCert13= + +TLSCipherCert13=${ZBX_TLSCIPHERCERT13} + +### Option: TLSCipherPSK13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for PSK-based encryption. +# Example: +# TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 +# +# Mandatory: no +# Default: +# TLSCipherPSK13= + +TLSCipherPSK13=${ZBX_TLSCIPHERPSK13} + +### Option: TLSCipherAll13 +# Cipher string for OpenSSL 1.1.1 or newer in TLS 1.3. +# Override the default ciphersuite selection criteria for certificate- and PSK-based encryption. +# Example: +# TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256 +# +# Mandatory: no +# Default: +# TLSCipherAll13= + +TLSCipherAll13=${ZBX_TLSCIPHERALL13} diff --git a/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_user_parameters.conf b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_user_parameters.conf new file mode 100644 index 000000000..3e584eb7f --- /dev/null +++ b/Dockerfiles/build-mysql/windows/config_templates/agent2/zabbix_agent2_user_parameters.conf @@ -0,0 +1,37 @@ +####### USER-DEFINED MONITORED PARAMETERS ####### + +### Option: UnsafeUserParameters +# Allow all characters to be passed in arguments to user-defined parameters. +# The following characters are not allowed: +# \ ' " ` * ? [ ] { } ~ $ ! & ; ( ) < > | # @ +# Additionally, newline characters are not allowed. +# 0 - do not allow +# 1 - allow +# +# Mandatory: no +# Range: 0-1 +# Default: +# UnsafeUserParameters=0 + +UnsafeUserParameters=${ZBX_UNSAFEUSERPARAMETERS} + +### Option: UserParameter +# User-defined parameter to monitor. There can be several user-defined parameters. +# Format: UserParameter=, +# See 'zabbix_agentd' directory for examples. +# +# Mandatory: no +# Default: +# UserParameter= + +### Option: UserParameterDir +# Directory to execute UserParameter commands from. Only one entry is allowed. +# When executing UserParameter commands the agent will change the working directory to the one +# specified in the UserParameterDir option. +# This way UserParameter commands can be specified using the relative ./ prefix. +# +# Mandatory: no +# Default: +# UserParameterDir= + +UserParameterDir=${ZBX_USERPARAMETERDIR}