Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYS-622 nagios 4.5.1 image update #152

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions images/nagios/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url=https://github.com/instantlinux/docker-tools

ARG NAGIOS_VERSION=4.4.13-r1
ARG NAGIOS_VERSION=4.5.1-r0
ARG NAGIOS_GID=1000
ARG NAGIOS_UID=999
ARG PLUGINS_VERSION=2.4.5-r1
Expand All @@ -29,13 +29,14 @@ RUN deluser xfs && addgroup -g $NAGIOS_GID nagios && \
adduser -g www-data -u $WWW_UID -DSH -h /var/www www-data && \
adduser -G nagios -g "Nagios Server" -DSH -h /var/nagios -u $NAGIOS_UID \
nagios && \
apk add --update --no-cache nagios=$NAGIOS_VERSION nagios-web \
echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/main' \
>>/etc/apk/repositories && \
apk add --update --no-cache nagios@edge=$NAGIOS_VERSION nagios-web \
nagios-plugins-all=$PLUGINS_VERSION \
nagios-plugins-mysql=$PLUGINS_VERSION \
nrpe-plugin bash curl fcgiwrap file mariadb-client nginx openssl \
perl-crypt-x509 perl-libwww perl-text-glob perl-timedate \
php81 php81-fpm py3-pip python3 ssmtp tzdata && \
pip3 install pymysql==1.0.2 && \
php81 php81-fpm py3-pip py3-pymysql python3 ssmtp tzdata && \
addgroup nginx nagios && \
chmod u+s /usr/lib/nagios/plugins/check_ping && \
sed -i -e s/use_syslog=.*/use_syslog=0/ \
Expand All @@ -50,6 +51,6 @@ EXPOSE 80
VOLUME /etc/nagios /opt/nagios/plugins /var/nagios

COPY nginx.conf /etc/nginx/http.d/nagios.conf
COPY php-fpm-www.conf /etc/php8/php-fpm.d/www.conf
COPY php-fpm-www.conf /etc/php81/php-fpm.d/www.conf
COPY entrypoint.sh mail.sh /usr/local/bin/
ENTRYPOINT /usr/local/bin/entrypoint.sh
13 changes: 2 additions & 11 deletions images/nagios/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,10 @@ for item in backup hosts services; do
done
start-stop-daemon -u nginx -b --exec /usr/bin/fcgiwrap -- \
-s unix:/run/fcgiwrap/fcgiwrap.sock
/usr/sbin/php-fpm8
/usr/sbin/php-fpm81
/usr/sbin/nginx
touch /var/nagios/nagios.log && tail -1 -f /var/nagios/nagios.log &
find /var/nagios -not -user nagios -exec chown nagios.nagios {} \;
find /etc/nagios/objects -not -user www-data -exec chown www-data.nagios {} \;

# TODO change this back to exec after fix is published
# https://github.com/NagiosEnterprises/nagioscore/issues/861
if ! /usr/sbin/nagios /etc/nagios/nagios.cfg; then
echo Segfault - please set check_for_updates=0 in /etc/nagios/nagios.cfg
exit 1
fi

while [ 1 == 1 ]; do
sleep 60
done
exec /usr/sbin/nagios /etc/nagios/nagios.cfg
Loading