JasonRivers / Docker-Nagios

Docker image for Nagios
MIT License
232 stars 254 forks source link

Nagiosgraph not working v2 #125

Open maverick85 opened 3 years ago

maverick85 commented 3 years ago

Yeaa there is some issue with perl path like /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 ...etc.

The workaround is to reinstall NagiosGraph. Here is how you can do that:

Start your container with volumes

Enter your container

docker exec -it nagios4 /bin/bash

Clean /opt/nagiosgraph folder --- you will receive ...etc and ... var are busy dont worry.

rm -rf /opt/nagiosgraph

Build your NagiosGraph --- you dont need to download it its already there just reinstall it.

cd /tmp/nagiosgraph && \ ./install.pl --install \ --prefix /opt/nagiosgraph \ --nagios-user ${NAGIOS_USER} \ --www-user ${NAGIOS_USER} \ --nagios-perfdata-file ${NAGIOS_HOME}/var/perfdata.log \ --nagios-cgi-url /cgi-bin \ && \ cp share/nagiosgraph.ssi ${NAGIOS_HOME}/share/ssi/common-header.ssi

No errors anymore.

Originally posted by @vhristev in https://github.com/JasonRivers/Docker-Nagios/issues/67#issuecomment-402424918

Hi there, this doesn't work for me using the latest image available at this date:

# podman exec -it nagios4 /bin/bash
root@783c79af9929:/# rm -fr /opt/nagiosgraph 
rm: cannot remove '/opt/nagiosgraph/etc': Device or resource busy
rm: cannot remove '/opt/nagiosgraph/var': Device or resource busy
root@783c79af9929:/# cd /tmp/nagiosgraph
bash: cd: /tmp/nagiosgraph: No such file or directory

Suggestions? thanks

maverick85 commented 3 years ago

I ran the container without the volume binds and copied the contents to nagiosgraph, then stopped that container and started again with all the options, and its fixed.

duckmysick01 commented 2 years ago

So you did some docker cp ... then docker stop 'name' and then docker run 'with all options' ?

maverick85 commented 2 years ago

Hi @duckmysick01 that was over an year ago I don't remember at all, I'm sorry.

duckmysick01 commented 2 years ago

I made it work, no problem.

DarkDeddok commented 2 years ago

I made it work, no problem.

How to fix?