Comments (13)
I've finally got nagiosgraph working with the docker container after a couple of days head-scratching, but to do it I had to:
- Outside the container, edit .\etc\objects\templates.cfg correcting the path of the two entries:
- action_url /nagios/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='/nagios/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&period=day&rrdopts=-w+450+-j
- edit .\nagiosgraph\etc\nagiosgraph.conf correcting the three entries:
- graphcgiurl = /nagios/cgi-bin
- javascript = /nagios/nagiosgraph/nagiosgraph.js
- stylesheet = /nagios/nagiosgraph/nagiosgraph.css
The above two not too bad as the files are outside the container, but I also needed
- edit /opt/nagios/share/ssi/common-header.ssi. To do this I changed the startup command of the container in my docker-compose so that it runs the following before /usr/local/bin/start_nagios:
- /bin/sed -i -e "s/src="/nagiosgraph/nagiosgraph.js/src="/nagios/nagiosgraph/nagiosgraph.js/" /opt/nagios/share/ssi/common-header.ssi
I have to do it on each startup, otherwise the change is lost on container teardown/image update.
Having done all of that lot, it now draws graphs on mouseover, loads the nagiosgraph.js without 404ing, and the graph pages work too.
HTH (thanks for your work on the docker container, much appreciated BTW)
from docker-nagios.
I think a simple solution to this is to make the owner of those directories nagios rather than root. Makes sense?
from docker-nagios.
Hi! I just stumbled upon this project and created the pull request #65 to fix the ownership of a mounted /opt/nagios/var.
HTH
Thomas
from docker-nagios.
This happened again, because during docker build after building nagiosgraph the sources are deleted. During docker startup you check if nagiosgraph is installed and try to install it otherwise, but the source folder is missing now. Pull request #96 solves that.
from docker-nagios.
which files need to be copied ? can you give instructions ?
from docker-nagios.
can you update the docker image so I can use nagiosgraph out of the box ?
from docker-nagios.
I can't do that as my /opt/nagiosgraph location just contains 2 empty folders: etc and var
How do I populate them and what further steps should I take ?
I am not a docker expert - just a user...
Here is my docker run script
docker run --name nagios4
--hostname rcapp04-nagios
-v /srv/docker/volumes/nagios/opt/etc:/opt/nagios/etc
-v /srv/docker/volumes/nagios/opt/var:/opt/nagios/var
-v /srv/docker/volumes/Custom-Nagios-Plugins:/opt/Custom-Nagios-Plugins
-v /srv/docker/volumes/nagios/opt/nagiosgraph/var:/opt/nagiosgraph/var
-v /srv/docker/volumes/nagios/opt/nagiosgraph/etc:/opt/nagiosgraph/etc
-v /etc/timezone:/etc/timezone:ro
-v /etc/localtime:/etc/localtime:ro
-d --restart unless-stopped
-p 0.0.0.0:8099:80 jasonrivers/nagios:latest
here is what I see from
docker exec -it nagios4 /bin/bash
root@rcapp04-nagios:/# ls /
bin dev home lib64 mnt orig root sbin sys usr
boot etc lib media opt proc run srv tmp var
root@rcapp04-nagios:/# ls /opt
Custom-Nagios-Plugins JR-Nagios-Plugins nagios nagiosgraph
JE-Nagios-Plugins WL-Nagios-Plugins nagios-mssql
root@rcapp04-nagios:/# ls -R /opt/nagiosgraph
/opt/nagiosgraph:
etc var
/opt/nagiosgraph/etc:
/opt/nagiosgraph/var:
from docker-nagios.
Before you start, you need to drop mounting your external versions of /opt/nagiosgraph/etc and ./var, and mount your /srv/docker/volumes/nagios/opt/nagiosgraph somewhere else in the docker filesystem - e.g. /opt/nagiosgraph/mytmp. Then you can copy the docker image versions of ./etc and ./var out to your external filesystem.
Having done that, put the /opt/nagiosgraph/etc and /opt/nagiosgraph/var mounts back in and you should be good. This approach likely also needed for /opt/nagios/etc and /opt/nagios/var dirs too.
from docker-nagios.
great that did it with no other changes required
/opt/Nagios is OK
Thanks for your help so far...
I see 4 graphs. Yearly and Monthly have data, weekly and daily are blank.
Is there something I have to tweak ?
Or is it just a question of waiting
from docker-nagios.
Yay, glad it's working. There is one reading in the daily data (min=max=avg=curr), and you can just see the pixels on the RHS of the graph, so I think it's just a case of waiting.
from docker-nagios.
Hi, how did you mount back the volumes ? Because it seems like you can't mount volumes in a running container.. Please let me know
from docker-nagios.
you just need to stop the container to do the mounts and unmounts, then restart it
from docker-nagios.
thanks
from docker-nagios.
Related Issues (20)
- Error: Failed to create IO broker set: Cannot allocate memory HOT 6
- 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
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.