Comments (2)
Hi,
The error is slightly odd as it references /usr/local/nagios - I'll make some assumptions, please correct me if I'm incorrect.
Your main nagios.cfg on your system is located in /usr/local/nagios/etc/nagios.cfg, But references other files or directories with the full path of /usr/local/nagios/etc/file.cfg - which of course doesn't work in the container because it's expecting the config in /opt/nagios/etc.
There's 2 things you can do here,
- you can modify your nagios config to reference the directory in the container (/opt/nagios/etc) - you may not want to do this if you're still on the fence about using the image from what you have currently running.
- When starting the container, you can mount /usr/local/nagios inside the container as well as /opt/nagios/etc - this way any references will work unchanged, EG:
docker run -d --name nagios4 \
-v /usr/local/nagios/etc:/opt/nagios/etc \
-v /usr/local/nagios:/usr/local/nagios \
-v /usr/local/nagios/var:/opt/nagios/var \
-p 80:80 jasonrivers/Nagios
Hope this helps.
If my assumptions are incorrect, please could you show the contents of /usr/lib/nagios and /usr/lib/nagios/etc
from docker-nagios.
Well, mounting /usr/local/nagios inside the container made it work like a charm, for a second I thought I'm still looking at my local nagios box lol - Many thanks Jason.
from docker-nagios.
Related Issues (20)
- Nagios script request : check_apc.pl HOT 1
- Apache2 and NSCA not removing PID on reboot HOT 4
- Unable to get process status HOT 5
- Segmentation fault (core dumped) running nagios HOT 8
- NRPE plugin not installed in the container? HOT 2
- ENVs are not populated using notify_by_xmpp
- Nagios service does not start HOT 1
- HTTPS Options? HOT 2
- wrong data from remote server
- No map shown when using Umlaut in alias HOT 2
- postfix username and password for AWS SES HOT 1
- Not using nsca fills up the docker log file
- Web UI doesnt showup any config data
- Ruby missing from the Dockerfile
- permiussion denied
- Not work the config SMTP to send email
- Performance issues HOT 1
- there's already an NSCA server running (PID 16). Bailing out... HOT 2
- Adding comments does not work
- Will you upgrade Nagios to the current version?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-nagios.