From 13922bcc706ef84d30450388531560387c0b8d12 Mon Sep 17 00:00:00 2001 From: Chris Yocum Date: Thu, 30 May 2024 13:07:34 -0400 Subject: [PATCH] Comment out lines for old Python 2 based plugins and their dependencies --- Dockerfile.linux-amd64 | 21 +++++++++++---------- Dockerfile.linux-arm-v7 | 35 ++++++++++++++++++----------------- Dockerfile.linux-arm64 | 25 +++++++++++++------------ README.md | 6 ++++++ 4 files changed, 48 insertions(+), 39 deletions(-) diff --git a/Dockerfile.linux-amd64 b/Dockerfile.linux-amd64 index 3993596..2feb73b 100644 --- a/Dockerfile.linux-amd64 +++ b/Dockerfile.linux-amd64 @@ -226,28 +226,29 @@ RUN cd /opt && \ #python2 get-pip.py && \ #python3 get-pip.py && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --no-cache-dir pymssql && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + #pip3 install --no-cache-dir pymssql && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ - git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ + #git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ git clone https://github.com/danfruehauf/nagios-plugins.git DF-Nagios-Plugins && \ - git clone https://github.com/jpmens/check-mqtt.git jpmens-mqtt && \ + #git clone https://github.com/jpmens/check-mqtt.git jpmens-mqtt && \ chmod +x /opt/WL-Nagios-Plugins/check* && \ chmod +x /opt/JE-Nagios-Plugins/check_mem/check_mem.pl && \ chmod +x /opt/DF-Nagios-Plugins/check_sql/check_sql && \ chmod +x /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins && \ chmod +x /opt/DF-Nagios-Plugins/check_vpn/check_vpn && \ - chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ + #chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ cp /opt/JE-Nagios-Plugins/check_mem/check_mem.pl ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_sql/check_sql ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins ${NAGIOS_HOME}/libexec/ && \ - cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ - cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ + ######cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ + cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ + #cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ # Add check_apc.pl check COPY plugins/check_apc.pl ${NAGIOS_HOME}/libexec/ diff --git a/Dockerfile.linux-arm-v7 b/Dockerfile.linux-arm-v7 index ab94cfa..e6e344a 100644 --- a/Dockerfile.linux-arm-v7 +++ b/Dockerfile.linux-arm-v7 @@ -225,26 +225,26 @@ RUN cd /tmp && \ # Install additional plugins RUN cd /opt && \ - export RUSTUP_HOME=/root/.rustup && \ - export CARGO_HOME=/root/.cargo && \ - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sed 's#/proc/self/exe#\/bin\/sh#g' | sh -s -- --profile minimal -y && \ - . "/root/.cargo/env" && \ - export PATH="/root/.cargo/bin:$PATH" && \ + #export RUSTUP_HOME=/root/.rustup && \ + #export CARGO_HOME=/root/.cargo && \ + #curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sed 's#/proc/self/exe#\/bin\/sh#g' | sh -s -- --profile minimal -y && \ + #. "/root/.cargo/env" && \ + #export PATH="/root/.cargo/bin:$PATH" && \ #wget -q -O get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \ #wget -q https://bootstrap.pypa.io/get-pip.py && \ #python2 get-pip.py && \ #python3 get-pip.py && \ - echo "Cython==0.29.35" >> constraints.txt && \ - export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ + #echo "Cython==0.29.35" >> constraints.txt && \ + #export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --no-cache-dir pymssql && \ - python3 -m pip install --upgrade pip && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt bcrypt && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + #pip3 install --no-cache-dir pymssql && \ + #python3 -m pip install --upgrade pip && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt bcrypt && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ - git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ + #git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ git clone https://github.com/danfruehauf/nagios-plugins.git DF-Nagios-Plugins && \ git clone https://github.com/jpmens/check-mqtt.git jpmens-mqtt && \ chmod +x /opt/WL-Nagios-Plugins/check* && \ @@ -252,14 +252,15 @@ RUN cd /opt && \ chmod +x /opt/DF-Nagios-Plugins/check_sql/check_sql && \ chmod +x /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins && \ chmod +x /opt/DF-Nagios-Plugins/check_vpn/check_vpn && \ - chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ + #chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ cp /opt/JE-Nagios-Plugins/check_mem/check_mem.pl ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_sql/check_sql ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins ${NAGIOS_HOME}/libexec/ && \ - cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ - cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ + #######cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ + cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ + #cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ # Add check_apc.pl check COPY plugins/check_apc.pl ${NAGIOS_HOME}/libexec/ diff --git a/Dockerfile.linux-arm64 b/Dockerfile.linux-arm64 index 478e332..213b2ff 100644 --- a/Dockerfile.linux-arm64 +++ b/Dockerfile.linux-arm64 @@ -229,31 +229,32 @@ RUN cd /opt && \ #wget -q https://bootstrap.pypa.io/get-pip.py && \ #python2 get-pip.py && \ #python3 get-pip.py && \ - echo "Cython==0.29.35" >> constraints.txt && \ - export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ + #echo "Cython==0.29.35" >> constraints.txt && \ + #export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ #pip install --no-cache-dir "pymssql<2.2.0" && \ - pip3 install --no-cache-dir pymssql && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ - pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ + #pip3 install --no-cache-dir pymssql && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ pywbem paramiko pplogger paho-mqtt && \ + #pip3 install --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ --upgrade requests && \ git clone https://github.com/willixix/naglio-plugins.git WL-Nagios-Plugins && \ git clone https://github.com/JasonRivers/nagios-plugins.git JR-Nagios-Plugins && \ git clone https://github.com/justintime/nagios-plugins.git JE-Nagios-Plugins && \ - git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ + #git clone https://github.com/nagiosenterprises/check_mssql_collection.git nagios-mssql && \ git clone https://github.com/danfruehauf/nagios-plugins.git DF-Nagios-Plugins && \ - git clone https://github.com/jpmens/check-mqtt.git jpmens-mqtt && \ + #git clone https://github.com/jpmens/check-mqtt.git jpmens-mqtt && \ chmod +x /opt/WL-Nagios-Plugins/check* && \ chmod +x /opt/JE-Nagios-Plugins/check_mem/check_mem.pl && \ chmod +x /opt/DF-Nagios-Plugins/check_sql/check_sql && \ chmod +x /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins && \ chmod +x /opt/DF-Nagios-Plugins/check_vpn/check_vpn && \ - chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ + #chmod +x /opt/jpmens-mqtt/check-mqtt.py && \ cp /opt/JE-Nagios-Plugins/check_mem/check_mem.pl ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ - cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_database.py ${NAGIOS_HOME}/libexec/ && \ + #cp /opt/nagios-mssql/check_mssql_server.py ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_sql/check_sql ${NAGIOS_HOME}/libexec/ && \ cp /opt/DF-Nagios-Plugins/check_jenkins/check_jenkins ${NAGIOS_HOME}/libexec/ && \ - cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ - cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ + ######cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ && \ + cp /opt/DF-Nagios-Plugins/check_vpn/check_vpn ${NAGIOS_HOME}/libexec/ + #cp /opt/jpmens-mqtt/check-mqtt.py ${NAGIOS_HOME}/libexec/ # Add check_apc.pl check COPY plugins/check_apc.pl ${NAGIOS_HOME}/libexec/ diff --git a/README.md b/README.md index 9465e63..1d2c720 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,12 @@ docker pull tronyx/nagios docker pull ghcr.io/tronyx/nagios ``` +#### Versions/Docker Tags + +* Master (:latest) - Master branch that is known to be stable. +* Develop (:develop) - My testing/development branch for updates. +* Ubuntu-22.04 (:ubuntu-22.04) - Older Ubuntu base version that still has Python 2 and the plugins that require it. Will keep this as up-to-date as possible. + ### Running Run the container with the example configuration using the following `docker` commands: