Fork of JasonRivers Docker Nagios image to incorporate various improvements from the open PRs on his repo. I have incorporated the following PRs:
- #96 - Fix issue with Nagiosgraph source (fregge)
- #101 - Fixes to allow building on ARM aarch64 architecture (garethrandall)
- #110 - Update to Ubuntu 18.04 LTS (asimzeeshan)
- #112 - Add python3-nagiosplugin for plugins that need it (davralin)
- #116 - Update Nagios to 4.4.6 (mmerian)
- #120 - Add NSCA (mmerian)
- #130 - Add Perl encryption libraries (rehashedsalt)
- #132 - Add rSync (LutzLegu)
- #165 - Added libcrypt-x509-per and libtext-glob-perl modules (Scott-Jones-COS)
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 24.04 LTS
- Updated Nagios Core to the current latest
- Updated Nagios Plugins to current latest
- Updated NRPE to current latest
- Updated NCPA to current latest
- Updated NSCA to current latest
- Added NagiosTV
- Built multi-arch images (amd64 & arm64)
Nagios Core running on Ubuntu 24.04 LTS with NagiosGraph, NRPE, NCPA, NSCA, and NagiosTV.
Product | Version |
---|---|
Nagios Core | 4.5.4 |
Nagios Plugins | 2.4.11 |
NRPE | 4.1.1 |
NCPA | 3.1.0 |
NSCA | 2.10.3 |
NagiosTV | 0.9.2 |
You can find the Docker Hub Registry HERE or the GitHub Registry HERE.
- Nagios configuration is stored in the
/opt/nagios/etc
directory. - NagiosGraph configuration is stored in the
/opt/nagiosgraph/etc
directory. - NSCA configuration is stored in the
/opt/nagios/etc
directory.
docker pull tronyx/nagios
docker pull ghcr.io/tronyx/nagios
Branch | Image Tag | Notes |
---|---|---|
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. Use this for arm-v7 hardware. Will keep this as up-to-date as possible. |
Run the container with the example configuration using the following docker
commands:
docker run --name nagios -p 8080:80 tronyx/nagios
docker run --name nagios -p 8080:80 ghcr.io/tronyx/nagios
Alternatively you can use external Nagios configuration & log data with the following docker
commands:
docker run --name nagios \
-v /path-to-nagios/etc/:/opt/nagios/etc/ \
-v /path-to-nagios/var:/opt/nagios/var/ \
-v /path-to-custom-plugins:/opt/Custom-Nagios-Plugins \
-v /path-to-nagiosgraph-var:/opt/nagiosgraph/var \
-v /path-to-nagiosgraph-etc:/opt/nagiosgraph/etc \
-p 8080:80 tronyx/nagios
docker run --name nagios \
-v /path-to-nagios/etc/:/opt/nagios/etc/ \
-v /path-to-nagios/var:/opt/nagios/var/ \
-v /path-to-custom-plugins:/opt/Custom-Nagios-Plugins \
-v /path-to-nagiosgraph-var:/opt/nagiosgraph/var \
-v /path-to-nagiosgraph-etc:/opt/nagiosgraph/etc \
-p 8080:80 ghcr.io/tronyx/nagios
Note: The path for the custom plugins will be /opt/Custom-Nagios-Plugins
, which you will need to reference in your configuration scripts.
There are a number of environment variables that you can use to adjust the behaviour of the container:
Environment Variable | Description |
---|---|
MAIL_RELAY_HOST | Set Postfix relayhost |
MAIL_INET_PROTOCOLS | Set the inet_protocols in Postfix |
NAGIOS_FQDN | Set the server Fully Qualified Domain Name in Postfix |
NAGIOS_TIMEZONE | Set the timezone of the server |
For the best results your Nagios container should have access to both IPv4 & IPv6 networks.
The default credentials for the web interface are:
Username | Password |
---|---|
nagiosadmin |
nagios |
- Nagios NRPE
- Nagios NCPA
- Nagios NSCA
- Nagiosgraph
- JR-Nagios-Plugins - Custom plugins from Jason Rivers
- WL-Nagios-Plugins - Custom plugins from William Leibzon
- JE-Nagios-Plugins - Custom plugins from Justin Ellison
- DF-Nagios-Plugins - Custom pluging for MSSQL monitoring from Dan Fruehauf
- check-mqtt - Custom plugin for mqtt monitoring from Jan-Piet Mens
- NagiosTV - Monitor your Nagios server on a wall-mounted TV
- check_apc - Check APC for status, health, and load