diff --git a/Dockerfile b/Dockerfile index 5d182c2..adfa945 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,8 +18,8 @@ ENV NAGIOS_HOME=/opt/nagios \ NAGIOS_FQDN=nagios.example.com \ NAGIOSADMIN_USER=nagiosadmin \ NAGIOSADMIN_PASS=nagios \ - NAGIOS_VERSION=4.4.6 \ - NAGIOS_PLUGINS_VERSION=2.3.3 \ + NAGIOS_VERSION=4.4.7 \ + NAGIOS_PLUGINS_VERSION=2.4.0 \ NRPE_VERSION=4.0.3 \ APACHE_LOCK_DIR=/var/run \ APACHE_LOG_DIR=/var/log/apache2 @@ -103,9 +103,6 @@ RUN ls -l /tmp && cd /tmp && \ : 'Apply patches to Nagios Core sources:' && \ echo -n "Replacing \"\" with \"\": " && \ sed -i 's///g' ./include/config.h && \ - echo -n "Patching cgi scripts in order not to throw segmentation fault. For more info please check: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12516" && \ - wget "https://gitlab.alpinelinux.org/alpine/aports/-/raw/f22889166a9e09b63fbfa1ddc34d3057813931f1/main/nagios/cgi-pairlist-truncation-fix.patch" && \ - patch cgi/getcgi.c cgi-pairlist-truncation-fix.patch && \ echo "OK" && \ echo -e "\n\n ===========================\n Compile Nagios Core\n ===========================\n" && \ make all && \ @@ -133,10 +130,6 @@ RUN echo -e "\n\n ===========================\n Configure Nagios Plugins\n = egrep -rl "\" . | xargs sed -i 's///g' && \ egrep -rl "\"sys\/poll.h\"" . | xargs sed -i 's/"sys\/poll.h"/"poll.h"/g' && \ echo "OK" && \ - echo -n "Patching check_mysql_query plugin. For more info please check: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12601" && \ - wget "https://gitlab.alpinelinux.org/alpine/aports/-/raw/074d8cfb5ef7bd3fdb922b6a6cb86f0fd5db346d/main/nagios-plugins/check_mysql_query-fix-use-after-free.patch" && \ - patch plugins/check_mysql_query.c check_mysql_query-fix-use-after-free.patch && \ - echo "OK" && \ echo -e "\n\n ===========================\n Compile Nagios Plugins\n ===========================\n" && \ make && \ echo "Nagios plugins compile successfully: OK" && \ @@ -203,9 +196,9 @@ FROM builder-base MAINTAINER Christos Manios LABEL name="Nagios" \ - nagiosVersion="4.4.6" \ - nagiosPluginsVersion="2.3.3" \ - nrpeVersion="4.0.3" \ + nagiosVersion=$NAGIOS_VERSION \ + nagiosPluginsVersion=$NAGIOS_PLUGINS_VERSION \ + nrpeVersion=$NRPE_VERSION \ homepage="https://www.nagios.com/" \ maintainer="Christos Manios " \ build="8" diff --git a/overlay/usr/local/bin/start_nagios b/overlay/usr/local/bin/start_nagios index 51b1017..5f138b2 100755 --- a/overlay/usr/local/bin/start_nagios +++ b/overlay/usr/local/bin/start_nagios @@ -31,6 +31,11 @@ echo -n "Removing rsyslogd PID file before starting it ..." (rm -f /var/run/rsyslogd.pid || true) echo "OK" +# Temporary workaround for Nagios 4.4.7 automatic update check issue +echo -n "Disable automatic updates due to SSL issue in Nagios 4.4.7 (https://github.com/NagiosEnterprises/nagioscore/issues/861) ..." +sed -i 's/check_for_updates=./check_for_updates=0/g' "${NAGIOS_HOME}/etc/nagios.cfg" +echo "OK" + # This function sets the timezone to Nagios and Apache configuration files setTimezone() {