Fork of JasonRivers image to incorporate various improvements.
50K+
Fork of JasonRivers Docker Nagios image to incorporate various improvements from the open PRs on his repo along with other updates and quality of life improvements.
Listing these as I wish to give the original users credit for their work.
Things that I have changed/updated/added to date:
Nagios Core running on Ubuntu 26.04 LTS with NagiosGraph, NRPE, NCPA, NSCA, and NagiosTV.
| Product | Version |
|---|---|
| Nagios Core | 4.5.14 |
| Nagios Plugins | 2.5 |
| NRPE | 4.1.3 |
| NCPA | 3.4.3 |
| NSCA | 2.10.3 |
| NagiosTV | 0.9.11 |
The images can be found on the Docker Hub Registry or the GitHub Registry.
/opt/nagios/etc directory./opt/nagiosgraph/etc directory./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. |
I may spawn other branches for testing from time to time, IE: new Ubuntu LTS or something similar, but for the most part these are the main branches.
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 |
NAGIOSADMIN_USER/NAGIOSADMIN_PASS only seed /opt/nagios/etc/htpasswd.users the first time the container starts (i.e. when that file doesn't already exist, such as on a fresh named volume). Changing these env vars on a container that already has a populated etc volume has no effect on the stored password.
To change the password on an existing container:
docker exec -it nagios htpasswd -b /opt/nagios/etc/htpasswd.users nagiosadmin '<new-password>'
The image defines a Docker HEALTHCHECK that reports unhealthy unless both of the following succeed:
http://localhost/ — any response counts, including a 401/403, since the check only cares that Apache itself is up and processing requests.runit reports the nagios service as up (sv check /etc/service/nagios).| Name/Link | Description |
|---|---|
| Nagios NRPE | Remotely execute Nagios plugins on other Linux/Unix machines |
| Nagios NCPA | Cross-platform monitoring agent |
| Nagios NSCA | Integrate passive alerts and checks from remote machines and applications |
| Nagiosgraph | Displays data in Nagios trends, as popups for hosts and services |
| 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 |
Content type
Image
Digest
sha256:4138bde77…
Size
218.7 MB
Last updated
14 days ago
docker pull tronyx/nagios