Can't restart nagios using sudo /etc/init.d/nagios restart

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Can't restart nagios using sudo /etc/init.d/nagios restart

Post by vy3734 »

Hi,
I had to do an offline NagiosXI install due to internet connectivity issues. On a regular online Nagios XI installation i could restart by using
sudo /etc/init.d/nagios start/restart/stop. after doing an offline install i don't even see /etc/init.d/nagios. I know for a fact that i missed something. However systemctl start nagios.service works, but in case of errors in config files i don't see a nagios.configtest file in /usr/local/nagios/var/ directory. Can someone please help!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't restart nagios using sudo /etc/init.d/nagios resta

Post by lmiltchev »

You are not going to see "/etc/init.d/nagios" on a new install of Nagios XI, and this is normal. You can use systemctl to start/stop/restart nagios, and view the status:

Code: Select all

systemctl start nagios.service
systemctl stop nagios.service
systemctl restart nagios.service
systemctl status nagios.service
You can verify the config (check for errors) from the command line by running:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
or in the GUI:

CCM > Tools > Config File Management > Write Configs > Verify Files

Note: Sometimes, the nagios.configtest cannot be created or updated because the nagios account does not have a user shell. See more here:

https://support.nagios.com/kb/article/n ... t-760.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
vy3734
Posts: 109
Joined: Tue Sep 29, 2015 4:48 pm

Re: Can't restart nagios using sudo /etc/init.d/nagios resta

Post by vy3734 »

Thanks lmiltchev for the quick response! That clarifies my concerns!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Can't restart nagios using sudo /etc/init.d/nagios resta

Post by lmiltchev »

Sounds good! Is it OK if we close this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked