Skip to content

Commit

Permalink
Comment out lines for old Python 2 based plugins and their dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tronyx committed May 30, 2024
1 parent 17caf79 commit 13922bc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 39 deletions.
21 changes: 11 additions & 10 deletions Dockerfile.linux-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
35 changes: 18 additions & 17 deletions Dockerfile.linux-arm-v7
Original file line number Diff line number Diff line change
Expand Up @@ -225,41 +225,42 @@ 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* && \
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/
Expand Down
25 changes: 13 additions & 12 deletions Dockerfile.linux-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 13922bc

Please sign in to comment.