Public | Automated Build

Last pushed: 2 years ago
Short Description
Monitoring based on nagios within a docker container.
Full Description

#Nagios within Docker

Sticking to 'old' 3.5.1 verson as newer ones are not usable in production...

#Usage

##Sample

docker run -d --name nagios \
  -e 'NAGIOSADMIN_USER=nagiosadmin' \
  -e 'NAGIOSAMDIN_PASS=nagios' \
  -v /host/path/to/config:/opt/nagios/etc \
  -v /host/path/to/log:/var/log/apache2 \
  -p 80:80 mkodockx/docker-nagios

##Generated password

You can generate a password for example with:

docker run -d --name nagios \
  -e 'NAGIOSADMIN_USER=nagiosadmin' \
  -e 'NAGIOSAMDIN_PASS=*$(pwgen -s 20 1)*' \
  -v /host/path/to/var:/opt/nagios/var \
  -v /host/path/to/config:/opt/nagios/etc \
  -v /host/path/to/log:/var/log/apache2 \
  -p 80:80 mkodockx/docker-nagios

Password will be printed to:

/host/path/to/var/last_start.log

##Environment variables

ENV NAGIOS_GROUP nagios
ENV NAGIOS_CMDUSER nagios
ENV NAGIOS_CMDGROUP nagios
ENV NAGIOSADMIN_USER nagiosadmin
ENV NAGIOSADMIN_PASS nagios
ENV APACHE_RUN_USER nagios
ENV APACHE_RUN_GROUP nagios
ENV NAGIOS_TIMEZONE UTC

##Volumes

VOLUME /opt/nagios/var
VOLUME /opt/nagios/etc
VOLUME /opt/nagios/libexec
VOLUME /var/log/apache2
VOLUME /usr/share/snmp/mibs

Docker-Nagios

Basic Docker image for running Nagios.
This is running Nagios 3.5.1

You should either link a mail container in as "mail" or set MAIL_SERVER, otherwise
mail will not work.

Defaults

  • NAGIOSADMIN_USER=nagiosadmin
  • NAGIOSAMDIN_PASS=nagios

Web UI

The Nagios Web UI is available on port 80 of the container.

##More Info

based on work by tpires

Docker Pull Command
Owner
mkodockx
Source Repository