├── .github └── FUNDING.yml ├── .gitignore ├── Dockerfile-bookworm ├── Dockerfile-jammy ├── Makefile-adapt-ran-npm-target.patch ├── Makefile-reduce-webpack-memory-consumption.patch ├── README.md ├── build_check_mk_debian_32bit.sh ├── build_check_mk_ubuntu_64bit.sh ├── check_for_update ├── agent │ └── plugins │ │ └── 14400 │ │ └── mk_check_mk_version └── check_mk │ └── checks │ └── check_mk_version ├── checkmk-64bit-patches.zip ├── create_build_environment_variables-allow-empty-pathhash.patch ├── data └── check_mk.png ├── defines.make-use-official-python-mirror.patch ├── heirloom-mailx-fix-source-url.patch ├── omd-Makefile-remove-module-navicli.patch ├── pipfile-remove-pbr.patch ├── pipfile-remove-playwright.patch ├── pipfile-update-pymssql.patch ├── protobuf-make-add-latomic.patch ├── python-make-add-fno-semantic-interposition.patch ├── python-make-set-aarch64-architecture.patch ├── python-make-set-arm-architecture.patch └── xmlsec1-fix-source-url.patch /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: ['https://donate.chofer.at'] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | ### STS ### 4 | .classpath 5 | .factorypath 6 | .project 7 | .settings 8 | .springBeans 9 | 10 | ### IntelliJ IDEA ### 11 | .idea 12 | *.iws 13 | *.iml 14 | *.ipr 15 | 16 | ### Other ### 17 | -------------------------------------------------------------------------------- /Dockerfile-bookworm: -------------------------------------------------------------------------------- 1 | FROM arm64v8/debian:bookworm-slim 2 | 3 | SHELL ["/bin/bash", "-c"] 4 | ENV DEBIAN_FRONTEND=noninteractive LC_ALL=C.UTF-8 LANG=C.UTF-8 PATH="/opt/bin:${PATH}" 5 | RUN mkdir -p /usr/share/man/man1 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y \ 9 | alien \ 10 | apache2 \ 11 | apache2-dev \ 12 | apt-utils \ 13 | aptitude \ 14 | autoconf \ 15 | bear \ 16 | binutils \ 17 | build-essential \ 18 | cargo \ 19 | chrpath \ 20 | clang-15 \ 21 | clang-format-15 \ 22 | clang-tidy-15 \ 23 | clang-tools-15 \ 24 | clangd-15 \ 25 | cppcheck \ 26 | clang-tidy \ 27 | cmake \ 28 | curl \ 29 | dialog \ 30 | direnv \ 31 | devscripts \ 32 | dnsutils \ 33 | doxygen \ 34 | enchant-2 \ 35 | figlet \ 36 | flex \ 37 | freetds-bin \ 38 | freetds-dev \ 39 | g++ \ 40 | gawk \ 41 | gcc \ 42 | gdebi \ 43 | gettext \ 44 | git \ 45 | git-buildpackage \ 46 | graphviz \ 47 | gtk-doc-tools \ 48 | iputils-ping \ 49 | ksh \ 50 | libclang-15-dev \ 51 | libclang-common-15-dev \ 52 | libclang1-15 \ 53 | libcurl4-openssl-dev \ 54 | libenchant-2-2 \ 55 | libevent-dev \ 56 | libffi-dev \ 57 | libfreeradius-dev \ 58 | libgd-dev \ 59 | libglib2.0-dev \ 60 | libgnutls28-dev \ 61 | libgsf-1-dev \ 62 | libjpeg-dev \ 63 | libkrb5-dev \ 64 | libldap2-dev \ 65 | libltdl-dev \ 66 | libmcrypt-dev \ 67 | libmariadb-dev-compat \ 68 | libmariadb-dev \ 69 | libncurses5-dev \ 70 | libopenblas-dev \ 71 | libpango1.0-dev \ 72 | libpcap-dev \ 73 | libperl-dev \ 74 | libpq-dev \ 75 | libreadline-dev \ 76 | librrd-dev \ 77 | libsasl2-dev \ 78 | libsodium-dev \ 79 | libsqlite3-dev \ 80 | libssl-dev \ 81 | libtool \ 82 | libxml2 \ 83 | libxml2-dev \ 84 | libxmlsec1-dev \ 85 | libxmlsec1-openssl \ 86 | lldb \ 87 | lld \ 88 | lsb-release \ 89 | make \ 90 | mono-complete \ 91 | mono-xbuild \ 92 | nullmailer \ 93 | openssh-client \ 94 | openssl \ 95 | patch \ 96 | patchelf \ 97 | php-common \ 98 | pngcrush \ 99 | p7zip-full \ 100 | rpcbind \ 101 | rpm \ 102 | rrdtool \ 103 | rsync \ 104 | rustc \ 105 | shellcheck \ 106 | smbclient \ 107 | software-properties-common \ 108 | strace \ 109 | sudo \ 110 | tar \ 111 | texinfo \ 112 | tk-dev \ 113 | uuid-dev \ 114 | vim \ 115 | valgrind \ 116 | xmlsec1 \ 117 | zlib1g-dev \ 118 | zstd \ 119 | && rm -rf /var/lib/apt/lists/* 120 | 121 | RUN apt-get update && \ 122 | apt-get upgrade -y 123 | 124 | RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences && \ 125 | echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences && \ 126 | echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences 127 | 128 | RUN apt-get remove -y nodejs libnode-dev libnode72 129 | RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - 130 | RUN apt-get update -y && apt-get install -y nodejs 131 | 132 | RUN apt-get remove -y cmake 133 | RUN wget https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-linux-aarch64.sh && chmod 755 cmake-3.26.4-linux-aarch64.sh 134 | RUN ./cmake-3.26.4-linux-aarch64.sh --skip-license --prefix=/usr 135 | 136 | RUN apt-get autoremove -y 137 | 138 | #RUN wget https://www.python.org/ftp/python/3.11.3/Python-3.11.3.tgz && tar xzf Python-3.11.3.tgz 139 | #RUN cd Python-3.11.3 && ./configure --enable-optimizations && make install 140 | #RUN python3 -V 141 | 142 | RUN apt-get install -y python3 \ 143 | libpython3.11 \ 144 | libpython3-dev \ 145 | python3-dev \ 146 | python3-distutils \ 147 | python3-pip \ 148 | python3-venv \ 149 | python3-setuptools \ 150 | python3-sphinx \ 151 | pipenv \ 152 | && rm -rf /var/lib/apt/lists/* 153 | 154 | RUN python3 -V 155 | RUN pip3 -V 156 | 157 | #RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 158 | #RUN python3.11 -m ensurepip 159 | #RUN pip3 -V 160 | 161 | #RUN cp /usr/local/bin/pip3 /usr/bin 162 | #RUN cp /usr/local/bin/pip3.11 /usr/bin 163 | 164 | #RUN python3 -m pip install --upgrade pip 165 | #RUN pip3 install pipenv 166 | #RUN cp /usr/local/bin/pipenv* /usr/bin/ 167 | #RUN cp /usr/local/bin/virtualenv* /usr/bin/ 168 | 169 | COPY bazel-5.3.2-linux-arm64 /usr/bin/bazel 170 | RUN chmod 755 /usr/bin/bazel 171 | 172 | #RUN ln -sf /usr/bin/g++ /usr/bin/g++-12 173 | 174 | ENV DISTRO="debian" DISTRO_CODE="bookworm" 175 | 176 | RUN mkdir -p /opt/build-mk/debs 177 | RUN mkdir -p /opt/build-mk/patches 178 | 179 | ENTRYPOINT ["/opt/build-mk/patches/build_check_mk.sh"] 180 | -------------------------------------------------------------------------------- /Dockerfile-jammy: -------------------------------------------------------------------------------- 1 | FROM arm64v8/ubuntu:jammy 2 | 3 | SHELL ["/bin/bash", "-c"] 4 | ENV DEBIAN_FRONTEND=noninteractive LC_ALL=C.UTF-8 LANG=C.UTF-8 PATH="/opt/bin:${PATH}" 5 | 6 | RUN apt-get update && \ 7 | apt-get install -y software-properties-common && \ 8 | rm -rf /var/lib/apt/lists/* 9 | 10 | RUN add-apt-repository ppa:deadsnakes/ppa -y 11 | RUN apt-get update -y 12 | 13 | RUN apt-get remove -y \ 14 | libpython3.10:arm64 \ 15 | libpython3.10-dev:arm64 \ 16 | libpython3.10-minimal:arm64 \ 17 | libpython3.10-stdlib:arm64 \ 18 | python3.10 \ 19 | python3.10-dev \ 20 | python3.10-minimal 21 | 22 | RUN apt-get update \ 23 | && apt-get install -y \ 24 | alien \ 25 | apache2 \ 26 | apache2-dev \ 27 | apt-utils \ 28 | aptitude \ 29 | autoconf \ 30 | bear \ 31 | binutils \ 32 | build-essential \ 33 | cargo \ 34 | chrpath \ 35 | clang-12 \ 36 | clang-format-12 \ 37 | clang-tidy-12 \ 38 | clang-tools-12 \ 39 | clangd-12 \ 40 | cppcheck \ 41 | clang-tidy \ 42 | cmake \ 43 | curl \ 44 | dialog \ 45 | direnv \ 46 | devscripts \ 47 | dnsutils \ 48 | doxygen \ 49 | dpatch \ 50 | enchant-2 \ 51 | figlet \ 52 | flex \ 53 | freetds-bin \ 54 | freetds-dev \ 55 | g++ \ 56 | g++-12 \ 57 | gawk \ 58 | gcc \ 59 | gcc-12 \ 60 | gdebi \ 61 | gettext \ 62 | git \ 63 | git-buildpackage \ 64 | graphviz \ 65 | gtk-doc-tools \ 66 | iputils-ping \ 67 | ksh \ 68 | libclang-12-dev \ 69 | libclang-common-12-dev \ 70 | libclang1-12 \ 71 | libcurl4-openssl-dev \ 72 | libenchant-2-2 \ 73 | libevent-dev \ 74 | libffi-dev \ 75 | libfreeradius-dev \ 76 | libgd-dev \ 77 | libglib2.0-dev \ 78 | libgnutls28-dev \ 79 | libgsf-1-dev \ 80 | libjpeg-dev \ 81 | libkrb5-dev \ 82 | libldap2-dev \ 83 | libltdl-dev \ 84 | libmcrypt-dev \ 85 | libmysqlclient-dev \ 86 | libncurses5-dev \ 87 | libopenblas-dev \ 88 | libpango1.0-dev \ 89 | libpcap-dev \ 90 | libperl-dev \ 91 | libpq-dev \ 92 | libreadline-dev \ 93 | librrd-dev \ 94 | libsasl2-dev \ 95 | libsodium-dev \ 96 | libsqlite3-dev \ 97 | libssl-dev \ 98 | libstdc++-12-dev \ 99 | libtool \ 100 | libxml2 \ 101 | libxml2-dev \ 102 | libxmlsec1-dev \ 103 | libxmlsec1-openssl \ 104 | lldb \ 105 | lld \ 106 | lsb-release \ 107 | make \ 108 | mono-complete \ 109 | mono-xbuild \ 110 | nodejs \ 111 | npm \ 112 | nullmailer \ 113 | openssh-client \ 114 | openssl \ 115 | patch \ 116 | patchelf \ 117 | php-common \ 118 | pngcrush \ 119 | p7zip-full \ 120 | rpcbind \ 121 | rpm \ 122 | rrdtool \ 123 | rsync \ 124 | rustc \ 125 | shellcheck \ 126 | smbclient \ 127 | software-properties-common \ 128 | strace \ 129 | sudo \ 130 | tar \ 131 | texinfo \ 132 | tk-dev \ 133 | uuid-dev \ 134 | vim \ 135 | valgrind \ 136 | xmlsec1 \ 137 | zlib1g-dev \ 138 | zstd \ 139 | && rm -rf /var/lib/apt/lists/* 140 | 141 | RUN apt-get update && \ 142 | apt-get upgrade -y 143 | 144 | RUN apt-get remove -y nodejs libnode-dev libnode72 145 | RUN curl -sL https://deb.nodesource.com/setup_18.x | bash 146 | RUN apt-get update -y && apt-get install -y nodejs 147 | RUN node --version 148 | RUN npm --version 149 | 150 | RUN apt-get remove -y cmake 151 | RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null 152 | RUN add-apt-repository 'deb https://apt.kitware.com/ubuntu/ jammy main' 153 | RUN apt-get update -y && apt-get install -y cmake 154 | 155 | RUN apt-get autoremove -y 156 | 157 | RUN apt-get install -y python3.11 \ 158 | libpython3.11 \ 159 | libpython3.11-dev \ 160 | python3.11-dev \ 161 | python3.11-distutils \ 162 | python3.11-venv \ 163 | python3-setuptools \ 164 | python3-sphinx \ 165 | && rm -rf /var/lib/apt/lists/* 166 | 167 | RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 168 | RUN python3 -V 169 | 170 | #RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 171 | RUN python3.11 -m ensurepip 172 | RUN pip3 -V 173 | 174 | RUN cp /usr/local/bin/pip3 /usr/bin 175 | RUN cp /usr/local/bin/pip3.11 /usr/bin 176 | 177 | RUN python3.11 -m pip install --upgrade pip 178 | RUN pip3 install pipenv 179 | RUN cp /usr/local/bin/pipenv* /usr/bin/ 180 | RUN cp /usr/local/bin/virtualenv* /usr/bin/ 181 | 182 | COPY bazel-5.3.2-linux-arm64 /usr/bin/bazel 183 | RUN chmod 755 /usr/bin/bazel 184 | 185 | ENV DISTRO="ubuntu-22.04" DISTRO_CODE="jammy" 186 | 187 | RUN mkdir -p /opt/build-mk/debs 188 | RUN mkdir -p /opt/build-mk/patches 189 | 190 | ENTRYPOINT ["/opt/build-mk/patches/build_check_mk.sh"] 191 | -------------------------------------------------------------------------------- /Makefile-adapt-ran-npm-target.patch: -------------------------------------------------------------------------------- 1 | --- Makefile 2023-08-20 00:15:49.000000000 +0100 2 | +++ Makefile_v2 2023-09-07 19:46:26.864885523 +0100 3 | @@ -274,9 +274,7 @@ 4 | node_modules/.bin/prettier: .ran-npm 5 | .ran-npm: package.json package-lock.json 6 | @echo "npm version: $$(npm --version)" 7 | - npm --version | grep "^$(NPM_VERSION)\." >/dev/null 2>&1 8 | @echo "node version: $$(node --version)" 9 | - node --version | grep "^v$(NODEJS_VERSION)\." >/dev/null 2>&1 10 | @echo "open file descriptor limit (soft): $$(ulimit -Sn)" 11 | @echo "open file descriptor limit (hard): $$(ulimit -Hn)" 12 | @if curl --silent --output /dev/null --head '${ARTIFACT_STORAGE}/#browse/browse:npm-proxy'; then \ 13 | @@ -287,7 +285,7 @@ 14 | REGISTRY= ; \ 15 | echo "Installing from public registry" ; \ 16 | fi ; \ 17 | - npm ci --yes --audit=false --unsafe-perm $$REGISTRY 18 | + npm install 19 | sed -i 's#"resolved": "https://artifacts.lan.tribe29.com/repository/npm-proxy/#"resolved": "https://registry.npmjs.org/#g' package-lock.json 20 | touch node_modules/.bin/webpack node_modules/.bin/redoc-cli node_modules/.bin/prettier 21 | 22 | -------------------------------------------------------------------------------- /Makefile-reduce-webpack-memory-consumption.patch: -------------------------------------------------------------------------------- 1 | --- Makefile 2023-05-12 00:02:21.000000000 +0100 2 | +++ Makefile_v2 2023-06-09 09:15:20.787179676 +0100 3 | @@ -296,6 +296,7 @@ 4 | .INTERMEDIATE: .ran-webpack 5 | $(JAVASCRIPT_MINI): .ran-webpack 6 | $(THEME_CSS_FILES): .ran-webpack 7 | +.ran-webpack: export NODE_OPTIONS := --max-old-space-size=2048 8 | .ran-webpack: node_modules/.bin/webpack webpack.config.js postcss.config.js $(JAVASCRIPT_SOURCES) $(SCSS_SOURCES) 9 | WEBPACK_MODE=$(WEBPACK_MODE) ENTERPRISE=$(ENTERPRISE) MANAGED=$(MANAGED) PLUS=$(PLUS) node_modules/.bin/webpack --mode=$(WEBPACK_MODE:quick=development) 10 | touch $(JAVASCRIPT_MINI) $(THEME_CSS_FILES) 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Updates discontinued 3 | 4 | Great news, there is an official commitment to add support for certain ARM architectures by Checkmk: [Checkmk – our road to ARM support](https://checkmk.com/blog/checkmk-our-road-arm-support). 5 | This could mean, that at some point the Raspberry Pi 5 and subsequent models could use native Checkmk packages. 6 | In the meantime, you can try [Zabbix](https://www.zabbix.com/download?os_distribution=raspberry_pi_os), it might even be the better choice anyway. 7 | 8 | Unfortunately, due to native ARM support on the horizon we have decided to retire this project (thank you [@martux69](https://github.com/martux69) for all your hard work supporting arm64 over all the years). 9 | This decision was based on the fact that keeping up with upstream changes has recently become increasingly time-consuming, additionally other (personal) things have become more important, so that there is no longer enough time. 10 | 11 | There is a fork of the project that is being maintained on a "best effort" basis: https://github.com/FloTheSysadmin/check-mk-arm. 12 | -------------------------------------------------------------------------------- /build_check_mk_debian_32bit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CHECKMK_VERSION="2.2.0p1" 4 | SNAP7_VERSION="1.4.2" 5 | 6 | if [ $# -gt 0 ]; then 7 | CHECKMK_VERSION="$1" 8 | fi 9 | 10 | echo "building Check_MK ${CHECKMK_VERSION}..." 11 | 12 | # get check_mk build dependencies 13 | if [ ${INSTALL_DEPENDENCIES:-0} -eq 1 ]; then 14 | # get bazel 15 | wget -q https://github.com/koenvervloesem/bazel-on-arm/releases/download/v4.2.2/bazel-4.2.2 16 | mv bazel-4.2.2 /usr/local/bin/bazel 17 | chmod +x /usr/local/bin/bazel 18 | 19 | # add nodesource repository to get latest nodejs and npm 20 | curl -sL https://deb.nodesource.com/setup_16.x | bash 21 | 22 | # create symlink to c++ compiler 23 | ln -sf /usr/bin/g++ /usr/bin/g++-12 24 | 25 | apt-get -y install apache2 build-essential chrpath debhelper dnsutils dpatch flex fping freetds-dev git \ 26 | git-buildpackage make rpcbind rrdtool smbclient snmp apache2-dev default-libmysqlclient-dev dietlibc-dev \ 27 | libboost-all-dev libboost-dev libcurl4-openssl-dev libcloog-ppl1 libdbi-dev libevent-dev libffi-dev \ 28 | libfreeradius-dev libgd-dev libglib2.0-dev libgnutls28-dev libgsf-1-dev libkrb5-dev libmcrypt-dev \ 29 | libncurses-dev libpango1.0-dev libpcap-dev libperl-dev libpq-dev libreadline-dev librrd-dev libsasl2-dev \ 30 | libsodium-dev libsqlite3-dev libssl-dev libxml2-dev libxmlsec1-dev nodejs openjdk-11-jdk patchelf \ 31 | python3-pip rpm tk-dev uuid-dev zstd 32 | fi 33 | 34 | # get check_mk sources 35 | if [ ! -f check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz ]; then 36 | wget https://download.checkmk.com/checkmk/${CHECKMK_VERSION}/check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz 37 | fi 38 | # get check_mk for windows artifact extraction 39 | if [ ! -f check-mk-cloud-${CHECKMK_VERSION}_0.kinetic_amd64.deb ]; then 40 | wget https://download.checkmk.com/checkmk/${CHECKMK_VERSION}/check-mk-cloud-${CHECKMK_VERSION}_0.kinetic_amd64.deb 41 | fi 42 | rm -rf check-mk-raw-${CHECKMK_VERSION}.cre 43 | tar xfz check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz 44 | 45 | # configure check_mk 46 | cd check-mk-raw-${CHECKMK_VERSION}.cre 47 | ./configure 48 | 49 | # apply patches 50 | patch -p0 < ../create_build_environment_variables-allow-empty-pathhash.patch 51 | patch -p0 < ../defines.make-use-official-python-mirror.patch 52 | patch -p0 < ../heirloom-mailx-fix-source-url.patch 53 | patch -p0 < ../Makefile-adapt-ran-npm-target.patch 54 | patch -p0 < ../Makefile-reduce-webpack-memory-consumption.patch 55 | patch -p0 < ../omd-Makefile-remove-module-navicli.patch 56 | patch -p0 < ../python-make-add-fno-semantic-interposition.patch 57 | patch -p0 < ../python-make-set-arm-architecture.patch 58 | patch -p0 < ../protobuf-make-add-latomic.patch 59 | patch -p0 < ../pipfile-remove-pbr.patch 60 | patch -p0 < ../pipfile-remove-playwright.patch 61 | patch -p0 < ../pipfile-update-pymssql.patch 62 | patch -p0 < ../xmlsec1-fix-source-url.patch 63 | 64 | # prepare windows artifacts 65 | ar x ../check-mk-cloud-${CHECKMK_VERSION}_0.kinetic_amd64.deb 66 | tar -I zstd -xf data.tar.zst 67 | rm -rf agents/windows 68 | mv opt/omd/versions/${CHECKMK_VERSION}.cce/share/check_mk/agents/windows agents/ 69 | 70 | # prepare snap7 71 | tar xvzf omd/packages/snap7/snap7-${SNAP7_VERSION}.tar.gz -C omd/packages/snap7 72 | cp omd/packages/snap7/snap7-${SNAP7_VERSION}/build/unix/arm_v6_linux.mk omd/packages/snap7/snap7-${SNAP7_VERSION}/build/unix/armv6l_linux.mk 73 | ln -s arm_v6-linux omd/packages/snap7/snap7-${SNAP7_VERSION}/build/bin/armv6l-linux 74 | cp omd/packages/snap7/snap7-${SNAP7_VERSION}/build/unix/arm_v7_linux.mk omd/packages/snap7/snap7-${SNAP7_VERSION}/build/unix/armv7l_linux.mk 75 | ln -s arm_v7-linux omd/packages/snap7/snap7-${SNAP7_VERSION}/build/bin/armv7l-linux 76 | tar czf omd/packages/snap7/snap7-${SNAP7_VERSION}.tar.gz -C omd/packages/snap7 snap7-${SNAP7_VERSION} 77 | 78 | # setup pipenv 79 | bash buildscripts/infrastructure/build-nodes/scripts/install-pipenv.sh 80 | 81 | # compile and package 82 | make deb DEBFULLNAME="Christian Hofer" DEBEMAIL=chrisss404@gmail.com 83 | 84 | # cleanup 85 | if [ $? -eq 0 ]; then 86 | mv check-mk-raw-${CHECKMK_VERSION}* .. 87 | cd .. 88 | rm -rf check-mk-raw-${CHECKMK_VERSION}.cre 89 | fi 90 | -------------------------------------------------------------------------------- /build_check_mk_ubuntu_64bit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | CHECKMK_VERSION="2.1.0p21" 4 | NAGIOS_VERSION="3.5.1" 5 | NSCA_VERSION="2.9.1" 6 | PNP4NAGIOS_VERSION="0.6.26" 7 | SNAP7_VERSION="1.4.2" 8 | 9 | if [ $# -gt 0 ]; then 10 | CHECKMK_VERSION="$1" 11 | fi 12 | 13 | echo "building Check_MK ${CHECKMK_VERSION}..." 14 | 15 | # get check_mk build dependencies 16 | if [ ${INSTALL_DEPENDENCIES:-0} -eq 1 ]; then 17 | sudo apt-get -y install apache2-dev build-essential cmake devscripts flex freetds-dev libcurl4-openssl-dev \ 18 | libffi-dev libglib2.0-dev libgsf-1-dev libjpeg-dev libkrb5-dev libldap2-dev libncurses5-dev libpango1.0-dev \ 19 | libpcap-dev libperl-dev libpq-dev libreadline-dev librrd-dev libsasl2-dev libsodium-dev libssl-dev libxml2-dev \ 20 | libxmlsec1-dev libxmlsec1-openssl libxslt-dev patchelf pipenv python3.9 python3.9-distutils python3.9-dev \ 21 | rsync zlib1g-dev 22 | fi 23 | 24 | # get check_mk sources 25 | if [ ! -f check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz ]; then 26 | wget -q https://download.checkmk.com/checkmk/${CHECKMK_VERSION}/check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz 27 | fi 28 | rm -rf check-mk-raw-${CHECKMK_VERSION}.cre 29 | tar xfz check-mk-raw-${CHECKMK_VERSION}.cre.tar.gz 30 | 31 | # configure check_mk 32 | cd check-mk-raw-${CHECKMK_VERSION}.cre 33 | ./configure 34 | 35 | # apply patches 36 | patch -p0 < ../omd-Makefile-remove-module-navicli.patch 37 | patch -p0 < ../python-make-add-fno-semantic-interposition.patch 38 | patch -p0 < ../python-make-set-aarch64-architecture.patch 39 | patch -p0 < ../protobuf-make-add-latomic.patch 40 | patch -p0 < ../pipfile-remove-pbr.patch 41 | patch -p0 < ../pipfile-remove-playwright.patch 42 | 43 | # prepare nagios 44 | tar xvzf omd/packages/nagios/nagios-${NAGIOS_VERSION}.tar.gz -C /tmp 45 | cp /usr/share/misc/config.guess /tmp/nagios-${NAGIOS_VERSION}/ 46 | tar czf omd/packages/nagios/nagios-${NAGIOS_VERSION}.tar.gz -C /tmp nagios-${NAGIOS_VERSION} 47 | rm -rf /tmp/nagios-${NAGIOS_VERSION} 48 | 49 | # prepare nsca 50 | tar xzf omd/packages/nsca/nsca-${NSCA_VERSION}.tar.gz -C /tmp 51 | cp /usr/share/misc/config.guess /tmp/nsca-${NSCA_VERSION}/ 52 | tar czf omd/packages/nsca/nsca-${NSCA_VERSION}.tar.gz -C /tmp nsca-${NSCA_VERSION} 53 | rm -rf /tmp/nsca-${NSCA_VERSION} 54 | 55 | # prepare pnp4nagios 56 | tar xzf omd/packages/pnp4nagios/pnp4nagios-${PNP4NAGIOS_VERSION}.tar.gz -C /tmp 57 | cp /usr/share/misc/config.guess /tmp/pnp4nagios-${PNP4NAGIOS_VERSION}/ 58 | tar czf omd/packages/pnp4nagios/pnp4nagios-${PNP4NAGIOS_VERSION}.tar.gz -C /tmp pnp4nagios-${PNP4NAGIOS_VERSION} 59 | rm -rf /tmp/pnp4nagios-${PNP4NAGIOS_VERSION} 60 | 61 | # prepare snap7 62 | tar xvzf omd/packages/snap7/snap7-${SNAP7_VERSION}.tar.gz -C /tmp 63 | cp /tmp/snap7-${SNAP7_VERSION}/build/unix/arm_v6_linux.mk /tmp/snap7-${SNAP7_VERSION}/build/unix/aarch64_linux.mk 64 | sed -i 's/arm_v6/aarch64/' /tmp/snap7-${SNAP7_VERSION}/build/unix/aarch64_linux.mk 65 | tar czf omd/packages/snap7/snap7-${SNAP7_VERSION}.tar.gz -C /tmp snap7-${SNAP7_VERSION} 66 | rm -rf /tmp/snap7-${SNAP7_VERSION} 67 | 68 | # setup pipenv 69 | sudo bash buildscripts/infrastructure/build-nodes/scripts/install-pipenv.sh 70 | 71 | # compile and package 72 | make deb DEBFULLNAME="Martin Petersen" DEBEMAIL=martin@petersen20.de 73 | 74 | # cleanup 75 | if [ $? -eq 0 ]; then 76 | mv check-mk-raw-${CHECKMK_VERSION}* .. 77 | cd .. 78 | rm -rf check-mk-raw-${CHECKMK_VERSION}.cre 79 | fi 80 | -------------------------------------------------------------------------------- /check_for_update/agent/plugins/14400/mk_check_mk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- encoding: utf-8; py-indent-offset: 4 -*- 3 | 4 | import json 5 | import requests 6 | 7 | 8 | access_token = '' 9 | version_of_interest = '2.0.0' 10 | 11 | 12 | def get_arm_version(): 13 | response = requests.get('https://api.github.com/repos/chrisss404/check-mk-arm/releases/latest') 14 | last_release = json.loads(response.text) 15 | return last_release['tag_name'] 16 | 17 | 18 | def get_checkmk_version(): 19 | headers = {"Authorization": "token " + access_token} 20 | query = ''' 21 | query($repo_owner: String!, $repo_name: String!) { 22 | repository(owner: $repo_owner, name: $repo_name) { 23 | refs(refPrefix: "refs/tags/", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) { 24 | edges { 25 | node { 26 | name 27 | } 28 | } 29 | } 30 | } 31 | }''' 32 | variables = { 33 | "repo_owner": "tribe29", 34 | "repo_name": "checkmk" 35 | } 36 | 37 | response = requests.post('https://api.github.com/graphql', json={'query': query, 'variables': variables}, headers=headers) 38 | if response.status_code == 200: 39 | try: 40 | edges = reversed(json.loads(response.text)['data']['repository']['refs']['edges']) 41 | for edge in edges: 42 | tag_name = edge['node']['name'] 43 | if version_of_interest in tag_name: 44 | return tag_name.lstrip('v') 45 | except: 46 | pass 47 | return 'unknown' 48 | 49 | 50 | arm_version = get_arm_version() 51 | latest_version = get_checkmk_version() 52 | print('<<>>') 53 | print('%s %s %s' % (arm_version, latest_version, '0' if arm_version == latest_version else '1')) 54 | -------------------------------------------------------------------------------- /check_for_update/check_mk/checks/check_mk_version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # -*- encoding: utf-8; py-indent-offset: 4 -*- 3 | 4 | 5 | def check_mk_version_valid_info(info): 6 | return info is not None and len(info) == 1 and len(info[0]) == 3 7 | 8 | 9 | def inventory_check_mk_version(info): 10 | if check_mk_version_valid_info(info): 11 | yield None, {} 12 | 13 | 14 | def check_check_mk_version(_no_item, _no_params, info): 15 | if not check_mk_version_valid_info(info): 16 | return 17 | 18 | arm_version, latest_version, up_to_date = info[0] 19 | state = int(up_to_date) 20 | details = 'Check_MK %s is the latest version' % arm_version 21 | if state > 0: 22 | details = 'Check_MK %s is out of date, current version: %s' % (arm_version, latest_version) 23 | 24 | return state, details 25 | 26 | 27 | check_info['check_mk_version'] = { 28 | 'inventory_function' : inventory_check_mk_version, 29 | 'check_function' : check_check_mk_version, 30 | 'service_description' : 'Check_MK Version', 31 | } 32 | -------------------------------------------------------------------------------- /checkmk-64bit-patches.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisss404/check-mk-arm/c6e2da1123c7a515f1c18b80f44831d6b3b8c924/checkmk-64bit-patches.zip -------------------------------------------------------------------------------- /create_build_environment_variables-allow-empty-pathhash.patch: -------------------------------------------------------------------------------- 1 | --- scripts/create_build_environment_variables.py 2023-05-12 00:02:22.000000000 +0100 2 | +++ scripts/create_build_environment_variables.py_v2 2023-06-09 09:11:01.358209808 +0100 3 | @@ -71,11 +71,6 @@ 4 | for op, path in (e.split(":", 1),) 5 | if op == "pathhash" 6 | ] 7 | - if checksums and all(v == "--" for k, v in checksums): 8 | - raise RuntimeError( 9 | - "All provided 'pathhash' items result in emtpy hashes." 10 | - " This is considerd to be an error." 11 | - ) 12 | 13 | evals = [ 14 | (f"eval:{name}", cmd_out(expr).strip()) 15 | -------------------------------------------------------------------------------- /data/check_mk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chrisss404/check-mk-arm/c6e2da1123c7a515f1c18b80f44831d6b3b8c924/data/check_mk.png -------------------------------------------------------------------------------- /defines.make-use-official-python-mirror.patch: -------------------------------------------------------------------------------- 1 | --- defines.make 2023-05-22 09:36:30.000000000 +0100 2 | +++ defines.make_v2 2023-06-09 09:12:40.627821729 +0100 3 | @@ -88,14 +88,7 @@ 4 | # PyPi Mirror Configuration 5 | # By default our internal Python mirror is used. 6 | # To use the official Python mirror, please export `USE_EXTERNAL_PIPENV_MIRROR=true`. 7 | -EXTERNAL_PYPI_MIRROR := https://pypi.python.org/simple 8 | -INTERNAL_PYPI_MIRROR := https://devpi.lan.tribe29.com/root/pypi 9 | - 10 | -ifeq (true,${USE_EXTERNAL_PIPENV_MIRROR}) 11 | -PIPENV_PYPI_MIRROR := $(EXTERNAL_PYPI_MIRROR) 12 | -else 13 | -PIPENV_PYPI_MIRROR := $(INTERNAL_PYPI_MIRROR) 14 | -endif 15 | +PIPENV_PYPI_MIRROR := https://pypi.python.org/simple 16 | 17 | print-%: 18 | @echo '$($*)' 19 | -------------------------------------------------------------------------------- /heirloom-mailx-fix-source-url.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/heirloom-mailx/heirloom-mailx_http.bzl 2023-05-12 00:02:21.000000000 +0100 2 | +++ omd/packages/heirloom-mailx/heirloom-mailx_http.bzl_v2 2023-06-09 09:14:34.707366151 +0100 3 | @@ -5,8 +5,7 @@ 4 | http_archive( 5 | name = "heirloom-mailx", 6 | urls = [ 7 | - "https://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_" + HEIRLOOMMAILX_VERSION + ".orig.tar.gz", 8 | - "https://artifacts.lan.tribe29.com/repository/upstream-archives/heirloom-mailx_" + HEIRLOOMMAILX_VERSION + ".orig.tar.gz", 9 | + "http://archive.ubuntu.com/ubuntu/pool/universe/h/heirloom-mailx/heirloom-mailx_" + HEIRLOOMMAILX_VERSION + ".orig.tar.gz", 10 | ], 11 | sha256 = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad", 12 | build_file = "@omd_packages//packages/heirloom-mailx:BUILD.bazel", 13 | -------------------------------------------------------------------------------- /omd-Makefile-remove-module-navicli.patch: -------------------------------------------------------------------------------- 1 | --- omd/Makefile 2023-05-12 00:02:21.000000000 +0100 2 | +++ omd/Makefile_v2 2023-06-09 09:16:01.097015535 +0100 3 | @@ -45,7 +45,6 @@ 4 | nagvis \ 5 | nrpe \ 6 | omd \ 7 | - navicli \ 8 | pnp4nagios \ 9 | maintenance \ 10 | patch \ 11 | -------------------------------------------------------------------------------- /pipfile-remove-pbr.patch: -------------------------------------------------------------------------------- 1 | --- Pipfile 2023-05-12 00:02:21.000000000 +0100 2 | +++ Pipfile_v2 2023-06-09 09:21:49.845565251 +0100 3 | @@ -100,7 +100,6 @@ 4 | chardet = "==5.1.0" # needed by requests 5 | urllib3 = "==1.26.13" # needed by requests 6 | pyOpenSSL = "==19.1.0" # needed by requests with extras = ["security"] 7 | -pbr = "==5.11.0" # needed by jira 8 | pyghmi = "==1.5.13" # needed by base for IPMI 9 | requests = {version = "==2.28.1",extras = ["security"]} # needed by DCD, connexion 10 | pykerberos = "==1.2.1" # needed by check_bi_aggr 11 | -------------------------------------------------------------------------------- /pipfile-remove-playwright.patch: -------------------------------------------------------------------------------- 1 | --- Pipfile 2023-05-12 00:02:21.000000000 +0100 2 | +++ Pipfile_v2 2023-06-09 09:22:34.125378189 +0100 3 | @@ -37,7 +37,6 @@ 4 | types-setuptools = "==67.2.0.0" # used for type checking 5 | types-pyOpenSSL = "==23.0.0.0" # used for type checking 6 | types-waitress = "==2.1.4.4" # used for type checking 7 | -playwright = "==1.30.0" # used for in-browser testing 8 | pydantic-factories = "==1.17.1" # used for pydantic model testing; 9 | pymongo = "==4.3.3" # used by mk_mongodb agent plugin 10 | pytest = "==7.2.1" # used by various test/Makefile targets 11 | -------------------------------------------------------------------------------- /pipfile-update-pymssql.patch: -------------------------------------------------------------------------------- 1 | --- Pipfile 2023-07-19 10:27:00.000000000 +0100 2 | +++ Pipfile_v2 2023-08-05 10:27:55.308412543 +0100 3 | @@ -145,7 +145,7 @@ 4 | s3transfer = "==0.4.2" # needed by boto3 (aws) 5 | boto3 = "==1.17.102" # needed by boto3 (aws) 6 | python-snap7 = "==1.2" # needed by Siemens PLC special agent 7 | -pymssql = "==2.2.7" # needed by check_sql active check 8 | +pymssql = "==2.2.8" # needed by check_sql active check 9 | PyMySQL = "==0.9.3" # needed by check_sql active check 10 | psycopg2-binary = "==2.9.5" # needed by check_sql active check 11 | apispec = "==5.2.2" # direct dependency 12 | -------------------------------------------------------------------------------- /protobuf-make-add-latomic.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/protobuf/protobuf.make 2023-05-12 00:02:22.000000000 +0100 2 | +++ omd/packages/protobuf/protobuf.make_v2 2023-06-09 09:21:09.395735669 +0100 3 | @@ -65,7 +65,7 @@ 4 | `: Let me know in case you got a cleaner approach. ` \ 5 | cd src && \ 6 | rm protoc && \ 7 | - echo -e '\nprotoc-static: $(protoc_OBJECTS) $(protoc_DEPENDENCIES) $(EXTRA_protoc_DEPENDENCIES)\n\tg++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -static-libgcc -static-libstdc++ -s -o protoc google/protobuf/compiler/main.o -lpthread ./.libs/libprotoc.a ./.libs/libprotobuf.a' >> Makefile && \ 8 | + echo -e '\nprotoc-static: $(protoc_OBJECTS) $(protoc_DEPENDENCIES) $(EXTRA_protoc_DEPENDENCIES)\n\tg++ -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -static-libgcc -static-libstdc++ -s -o protoc google/protobuf/compiler/main.o -lpthread ./.libs/libprotoc.a ./.libs/libprotobuf.a -latomic' >> Makefile && \ 9 | make -j6 protoc-static && \ 10 | file $(PROTOBUF_BUILD_DIR)/src/protoc | grep ELF >/dev/null && \ 11 | ldd $(PROTOBUF_BUILD_DIR)/src/protoc | grep -v libstdc++ >/dev/null 12 | -------------------------------------------------------------------------------- /python-make-add-fno-semantic-interposition.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/Python/Python.make 2023-05-12 00:02:21.000000000 +0100 2 | +++ omd/packages/Python/Python.make_v2 2023-06-09 09:17:50.516565773 +0100 3 | @@ -92,7 +92,8 @@ 4 | --with-ensurepip=install \ 5 | --with-openssl=$(PACKAGE_OPENSSL_DESTDIR) \ 6 | $(PYTHON_ENABLE_OPTIMIZATIONS) \ 7 | - LDFLAGS="-Wl,--rpath,/omd/versions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lib $(PACKAGE_OPENSSL_LDFLAGS)" 8 | + CFLAGS="${CFLAGS} -fno-semantic-interposition" \ 9 | + LDFLAGS="-Wl,--rpath,/omd/versions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/lib -fno-semantic-interposition $(PACKAGE_OPENSSL_LDFLAGS)" 10 | cd $(PYTHON_BUILD_DIR) ; \ 11 | $(MAKE) -j2 12 | $(TOUCH) $@ 13 | -------------------------------------------------------------------------------- /python-make-set-aarch64-architecture.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/Python/Python.make 2023-05-12 00:02:21.000000000 +0100 2 | +++ omd/packages/Python/Python.make_v2 2023-06-09 09:19:07.446246378 +0100 3 | @@ -17,7 +17,7 @@ 4 | PYTHON_INTERMEDIATE_INSTALL := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-install-intermediate 5 | PYTHON_CACHE_PKG_PROCESS := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-cache-pkg-process 6 | PYTHON_INSTALL := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-install 7 | -PYTHON_SYSCONFIGDATA := _sysconfigdata__linux_x86_64-linux-gnu.py 8 | +PYTHON_SYSCONFIGDATA := _sysconfigdata__linux_aarch64-linux-gnu.py 9 | 10 | PYTHON_INSTALL_DIR := $(INTERMEDIATE_INSTALL_BASE)/$(PYTHON_DIR) 11 | PYTHON_BUILD_DIR := $(PACKAGE_BUILD_DIR)/$(PYTHON_DIR) 12 | -------------------------------------------------------------------------------- /python-make-set-arm-architecture.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/Python/Python.make 2023-05-12 00:02:21.000000000 +0100 2 | +++ omd/packages/Python/Python.make_v2 2023-06-09 09:19:58.346033819 +0100 3 | @@ -17,7 +17,7 @@ 4 | PYTHON_INTERMEDIATE_INSTALL := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-install-intermediate 5 | PYTHON_CACHE_PKG_PROCESS := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-cache-pkg-process 6 | PYTHON_INSTALL := $(BUILD_HELPER_DIR)/$(PYTHON_DIR)-install 7 | -PYTHON_SYSCONFIGDATA := _sysconfigdata__linux_x86_64-linux-gnu.py 8 | +PYTHON_SYSCONFIGDATA := _sysconfigdata__linux_arm-linux-gnueabihf.py 9 | 10 | PYTHON_INSTALL_DIR := $(INTERMEDIATE_INSTALL_BASE)/$(PYTHON_DIR) 11 | PYTHON_BUILD_DIR := $(PACKAGE_BUILD_DIR)/$(PYTHON_DIR) 12 | -------------------------------------------------------------------------------- /xmlsec1-fix-source-url.patch: -------------------------------------------------------------------------------- 1 | --- omd/packages/xmlsec1/xmlsec1_http.bzl 2023-07-13 00:02:41.000000000 +0100 2 | +++ omd/packages/xmlsec1/xmlsec1_http.bzl_v2 2023-08-03 20:49:58.704118095 +0100 3 | @@ -6,8 +6,7 @@ 4 | http_archive( 5 | name = "xmlsec1", 6 | urls = [ 7 | - "https://www.aleksey.com/xmlsec/download/xmlsec1-" + XMLSEC1_VERSION + ".tar.gz", 8 | - "https://artifacts.lan.tribe29.com/repository/upstream-archives/xmlsec1-" + XMLSEC1_VERSION + ".tar.gz", 9 | + "https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-" + XMLSEC1_VERSION + ".tar.gz", 10 | ], 11 | sha256 = "5f8dfbcb6d1e56bddd0b5ec2e00a3d0ca5342a9f57c24dffde5c796b2be2871c", 12 | build_file = "@omd_packages//packages/xmlsec1:BUILD.xmlsec1", 13 | --------------------------------------------------------------------------------