mclarkson / nagrestconf

Nagios REST Interface
12 stars 5 forks source link

restart_nagios #73

Closed ahmadnl closed 7 years ago

ahmadnl commented 7 years ago

Hello Mark, first i would like to sat thank you so much for your nice work and for all your help. i have a issue with restart_nagios, when i use restart_nagios from the command line everything works as well, but if i only click on apply changes from nagrestconf interface nothing change on nagios until I restart him via or .

thank you, Kind regards Ahmad

mclarkson commented 7 years ago

Maybe you did not wait long enough for the cron job to run .. by default it runs every minute.

Or.. the the cron job is not running, see the docs, you should have:

$ sudo su
# crontab -l
* * * * * /usr/bin/test -e /tmp/nagios_restart_request && ( /bin/rm /tmp/nagios_restart_request; /usr/bin/restart_nagios; )

and check your cron logs.

Or.. you're running CentOS 7 and you did not do the 'Configure the Operating System' section properly in the docs

If the above did not point you in the right direction please let me know your OS version.

ahmadnl commented 7 years ago

Thanks for your fast reaction, my OS is debian 9.2 (stretch) i am trying since 2 days i dont think thats something with waiting `# crontab -l

Oct 12 13:42:01 CRON[21188]: (root) CMD (/usr/bin/test -e /tmp/nagios_restart_request && ( /bin/rm /tmp/nagios_restart_request; /usr/bin/restart_nagios; )) Oct 12 13:43:01 CRON[21256]: (root) CMD (/usr/bin/test -e /tmp/nagios_restart_request && ( /bin/rm /tmp/nagios_restart_request; /usr/bin/restart_nagios; ))

mclarkson commented 7 years ago

I installed debian 9.2 and nagios3 isn't even in debian repos anymore, and nagrestconf will refuse to install without forcing it somehow. Debian recommends using icinga instead (see this bug report).

This might be a good time to try the docker installation instructions, which gives you the latest nagios with the latest nagrestconf.

If you want to fix this issue I think that you can work around the problem by changing the PrivateTmp setting in /lib/systemd/system/apache2.service to 'PrivateTmp=false'.

mclarkson commented 7 years ago

I have updated the website to make it clear that docker should be used for Debian 9.x, so many thanks for your query!

ahmadnl commented 7 years ago

Thanks i have did this /lib/systemd/system/apache2.service to 'PrivateTmp=false'. and its work now good !!! thank you so much i already usr your Docker container on other server and it's woks perfect without any issue/problem! well doen

mclarkson commented 7 years ago

That's great! Thanks for reporting back, and you're welcome :)