diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9437f26..59bb7ec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,15 +5,17 @@ on: branches: - master - develop + - ubuntu-24.04 pull_request: branches: - master - develop + - ubuntu-24.04 jobs: build: if: "!contains(github.event.head_commit.message, 'skip ci')" - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: architecture: [linux-amd64, linux-arm64, linux-arm-v7] @@ -154,7 +156,7 @@ jobs: ${{ steps.prep.outputs.build-args }} publish: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: matrix: registry: [docker.io, ghcr.io] diff --git a/Dockerfile.linux-amd64 b/Dockerfile.linux-amd64 index 8604d5f..2feb73b 100644 --- a/Dockerfile.linux-amd64 +++ b/Dockerfile.linux-amd64 @@ -2,7 +2,7 @@ ARG BUILDKIT_SBOM_SCAN_CONTEXT=true ARG BUILDKIT_SBOM_SCAN_STAGE=true -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL name="Nagios" LABEL nagiosVersion="4.5.2" @@ -88,7 +88,7 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libnet-tftp-perl \ libnet-xmpp-perl \ libpq-dev \ - libpython2-dev \ + #libpython2-dev \ libpython3-dev \ libredis-perl \ librrds-perl \ @@ -97,13 +97,14 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libtext-glob-perl \ libwww-perl \ m4 \ - netcat \ + netcat-traditional \ openssh-client \ parallel \ php-cli \ php-gd \ postfix \ - python2 \ + #python2 \ + python3-full \ python3-pip \ python3-nagiosplugin \ rsync \ @@ -220,30 +221,34 @@ RUN cd /tmp && \ # Install additional plugins RUN cd /opt && \ - wget -q -O get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \ - python2 get-pip.py && \ - pip install --no-cache-dir "pymssql<2.2.0" && \ - 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 && \ + #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 && \ + #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 && \ 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 9e4a5a1..bafa899 100644 --- a/Dockerfile.linux-arm-v7 +++ b/Dockerfile.linux-arm-v7 @@ -2,7 +2,7 @@ ARG BUILDKIT_SBOM_SCAN_CONTEXT=true ARG BUILDKIT_SBOM_SCAN_STAGE=true -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL name="Nagios" LABEL nagiosVersion="4.5.2" @@ -55,7 +55,6 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set bsd-mailx \ build-essential \ ca-certificates \ - curl \ dnsutils \ fping \ freetds-dev \ @@ -75,7 +74,6 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libdbi-dev \ libdbi-perl \ libdigest-hmac-perl \ - libffi-dev \ libfreeradius-dev \ libgdchart-gd2-xpm-dev \ libradsec-dev \ @@ -90,7 +88,7 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libnet-tftp-perl \ libnet-xmpp-perl \ libpq-dev \ - libpython2-dev \ + #libpython2-dev \ libpython3-dev \ libredis-perl \ librrds-perl \ @@ -99,13 +97,14 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libtext-glob-perl \ libwww-perl \ m4 \ - netcat \ + netcat-traditional \ openssh-client \ parallel \ php-cli \ php-gd \ postfix \ - python2 \ + #python2 \ + python3-full \ python3-pip \ python3-nagiosplugin \ rsync \ @@ -226,23 +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" && \ - wget -q -O get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \ - python2 get-pip.py && \ - echo "Cython==0.29.35" >> constraints.txt && \ - export PIP_CONSTRAINT="$(pwd)/constraints.txt" && \ - pip install --no-cache-dir "pymssql<2.2.0" && \ - 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 && \ + #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" && \ + #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 && \ 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* && \ @@ -250,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/ @@ -350,9 +353,10 @@ RUN apt-get -qq -y remove software-properties-common && \ /var/lib/dpkg/status-old && \ true > /var/log/dpkg.log && \ true > /var/log/lastlog && \ - true > /var/log/apt/term.log && \ + ####true > /var/log/apt/term.log && \ + true > /var/log/apt/term.log # Remove rust and all dependencies - echo y | /root/.cargo/bin/rustup self uninstall + #echo y | /root/.cargo/bin/rustup self uninstall # Expose port 80 for the web UI EXPOSE 80 5667 diff --git a/Dockerfile.linux-arm64 b/Dockerfile.linux-arm64 index 717b5c4..213b2ff 100644 --- a/Dockerfile.linux-arm64 +++ b/Dockerfile.linux-arm64 @@ -2,7 +2,7 @@ ARG BUILDKIT_SBOM_SCAN_CONTEXT=true ARG BUILDKIT_SBOM_SCAN_STAGE=true -FROM ubuntu:22.04 +FROM ubuntu:24.04 LABEL name="Nagios" LABEL nagiosVersion="4.5.2" @@ -88,7 +88,7 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libnet-tftp-perl \ libnet-xmpp-perl \ libpq-dev \ - libpython2-dev \ + #libpython2-dev \ libpython3-dev \ libredis-perl \ librrds-perl \ @@ -97,13 +97,14 @@ RUN echo postfix postfix/main_mailer_type string "'Internet Site'" | debconf-set libtext-glob-perl \ libwww-perl \ m4 \ - netcat \ + netcat-traditional \ openssh-client \ parallel \ php-cli \ php-gd \ postfix \ - python2 \ + #python2 \ + python3-full \ python3-pip \ python3-nagiosplugin \ rsync \ @@ -224,32 +225,36 @@ RUN cd /tmp && \ # Install additional plugins RUN cd /opt && \ - wget -q -O get-pip.py https://bootstrap.pypa.io/pip/2.7/get-pip.py && \ - python2 get-pip.py && \ - 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 --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 && \ + #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" && \ + #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 && \ 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 1f28ab8..c4dafa0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Listing these as I wish to give the original users credit for their work. Things that I have changed/updated/added to date: -* Updated the image to Ubuntu 22.04 LTS +* Updated the image to Ubuntu 24.04 LTS * Updated Nagios Core to the current latest * Updated Nagios Plugins to current latest * Updated NRPE to current latest @@ -33,7 +33,7 @@ Things that I have changed/updated/added to date: ## Information -Nagios Core running on Ubuntu 22.04 LTS with NagiosGraph, NRPE, NCPA, NSCA, and NagiosTV. +Nagios Core running on Ubuntu 24.04 LTS with NagiosGraph, NRPE, NCPA, NSCA, and NagiosTV. | Product | Version | | ------- | ------- | @@ -61,9 +61,12 @@ 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. +| Branch | Docker Tag | Notes | +| ------- | ------- | ------- | +| Master | `latest` | Master branch that is known to be stable. | +| Develop | `develop` | My testing/development branch for base image and component 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 @@ -125,6 +128,5 @@ The default credentials for the web interface are: * [WL-Nagios-Plugins](https://github.com/willixix/WL-NagiosPlugins) - Custom plugins from William Leibzon * [JE-Nagios-Plugins](https://github.com/justintime/nagios-plugins) - Custom plugins from Justin Ellison * [DF-Nagios-Plugins](https://github.com/danfruehauf/nagios-plugins) - Custom pluging for MSSQL monitoring from Dan Fruehauf -* [check-mqtt](https://github.com/jpmens/check-mqtt.git) - Custom plugin for mqtt monitoring from Jan-Piet Mens * [NagiosTV](https://github.com/chriscareycode/nagiostv-react) - Monitor your Nagios server on a wall-mounted TV * [check_apc](https://exchange.nagios.org/directory/Plugins/Hardware/UPS/APC/check_apc-2Epl/details) - Check APC for status, health, and load \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 726dcf0..4ef9ea0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,10 +24,14 @@ services: - customplugins:/opt/Custom-Nagios-Plugins - nagiosgraphvar:/opt/nagiosgraph/var - nagiosgraphetc:/opt/nagiosgraph/etc + - nagiosa2logs:/var/log/apache2 volumes: + # To change from Docker-managed volumes to bind mounts, add a driver_opts section as detailed here + # https://stackoverflow.com/questions/35841241/docker-compose-named-mounted-volume nagiosetc: nagiosvar: customplugins: nagiosgraphvar: nagiosgraphetc: + nagiosa2logs: