Docker image for Nagios
Nagios Core 4.3.4 running on Ubuntu 16.04 LTS with NagiosGraph & NRPE
Nagios Configuration lives in /opt/nagios/etc
NagiosGraph configuration lives in /opt/nagiosgraph/etc
docker pull jasonrivers/nagios:latest
Run with the example configuration with the following:
docker run --name nagios4 -p 0.0.0.0:8080:80 jasonrivers/nagios:latest
alternatively you can use external Nagios configuration & log data with the following:
docker run --name nagios4 \ -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 \ -p 0.0.0.0:8080:80 jasonrivers/nagios:latest
Note: The path for the custom plugins will be /opt/Custom-Nagios-Plugins, you will need to reference this directory in your configuration scripts.
For best results your Nagios image should have access to both IPv4 & IPv6 networks
The default credentials for the web interface is
- Nagios nrpe [http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details]
- Nagiosgraph [http://exchange.nagios.org/directory/Addons/Graphing-and-Trending/nagiosgraph/details]
- JR-Nagios-Plugins - custom plugins I've created [https://github.com/JasonRivers/nagios-plugins]
- WL-Nagios-Plugins - custom plugins from William Leibzon [https://github.com/willixix/WL-NagiosPlugins]
- JE-Nagios-Plugins - custom plugins from Justin Ellison [https://github.com/justintime/nagios-plugins]
Works great, thanks. However is there a way to add SSL?
The container is running on a synology nas very well. Just one Problem, the nagios datetim is 2 hours to early. The use_timezone setting in nagios.cfg did not work. Any idea how to fix datetime
can you please expose the port 25 for mail notification?
Very good. A lot of dockers do not work as published and you have to become Sherlock Holmes to find out why. Maybe broken dockers teach you more ?
is there any instructions to run this on Synology Docker? i dont get it to run at all, it doesnt even accept the web connection to the given IP and port set when the container is created
I seem to be having troubles with nagiosgraph. i can see the RRD charts but there is no data in there and the values ar nan.
any assistance is much appreciated.
I know someone already asked, but how to restart nagios using command line? I restarted using Web Interface but i have errors so I can not use it anymore.
I already tried service nagios restart but it doesn't work, neither does /etc/rc.d/init.d/nagios restart and /etc/init.d/nagios restart
Probably your firewall rules started after docker service start. For me restarting docker service fixed it, but I have to do it after every restart or configure order of boot somehow.
When I mounting local volumes to container it is failed to run properly
it is failed on : nagios: Error: Unable to create temp file '/opt/nagios/var/nagios.tmpkZqPAY' for writing status data: Permission denied
Dont know my question is correct or not . i want to moniter my internal infra with this docker image . if i give my docker host machine ip in nagios configuration file will it work ? do i need to install nrpe packge for this image ?