Page 1 of 4
Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 12:46 pm
by vinothsethuram
I couldn't start nagios due to apache's custom location.
service nagios start
/etc/init.d/nagios: 20: .: Can't open /etc/rc.d/init.d/functions
Can you please help to start nagios?
Re: Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 12:53 pm
by abrist
vinothsethuram wrote:I couldn't start nagios due to apache's custom location.
The error you are receiving is due to missing LSB init functions, not a custom apache location. What distribution are you running?
Re: Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 12:54 pm
by vinothsethuram
abrist wrote:vinothsethuram wrote:I couldn't start nagios due to apache's custom location.
The error you are receiving is due to missing LSB init functions, not a custom apache location. What distribution are you running?
Ubuntu 13.10
Re: Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 12:59 pm
by abrist
I presume you are running core 4. There have been issues with debian systems and the init scripts. See the following thread:
http://support.nagios.com/forum/viewtop ... nit#p76464
Re: Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 1:09 pm
by vinothsethuram
I executed below command
apt-get install daemon.
But confused with hack script. Which File I need to edit and where is the contents be copied or replaced?
Re: Can't start nagios if apache is in custom location
Posted: Tue Jan 14, 2014 1:11 pm
by slansing
You need to follow the other post in that thread which links back to the altered nagios init script.
http://support.nagios.com/forum/viewtop ... =20#p64091
It is a drop in replacement for the nagios init script.
Re: Can't start nagios if apache is in custom location
Posted: Wed Jan 15, 2014 11:32 am
by vinothsethuram
After replacing the script, I am getting error
sudo service nagios restart
$Stopping nagios:
$Starting nagios:
But nagios dashboard is not working ..
http://ipaddress/nagios/ is giving following error
Not Found
The requested URL /nagios/ was not found on this server.
Re: Can't start nagios if apache is in custom location
Posted: Wed Jan 15, 2014 11:48 am
by abrist
Restart httpd:
Or:
Do you have a vhost file for nagios?
Or:
Code: Select all
ls -la /etc/apache2/sites-available/
Re: Can't start nagios if apache is in custom location
Posted: Wed Jan 15, 2014 12:14 pm
by vinothsethuram
abrist wrote:Restart httpd:
Or:
Do you have a vhost file for nagios?
Or:
Code: Select all
ls -la /etc/apache2/sites-available/
service apache2 command executed fine. But still getting page not found error.
log for ls -la /etc/httpd/conf.d
total 12
drwxr-xr-x 3 root root 4096 Nov 19 16:30 .
drwxr-xr-x 3 root root 4096 Nov 19 16:30 ..
drwxr-xr-x 2 root root 4096 Nov 25 05:27 nagios.conf
log for ls -la /etc/apache2/sites-available/
total 20
drwxr-xr-x 2 root root 4096 Nov 21 03:53 .
drwxr-xr-x 8 root root 4096 Nov 21 03:53 ..
-rw-r--r-- 1 root root 1327 Jul 24 06:45 000-default.conf
-rw-r--r-- 1 root root 6432 Jul 20 16:44 default-ssl.conf
Re: Can't start nagios if apache is in custom location
Posted: Wed Jan 15, 2014 12:25 pm
by abrist
Lets copy the nagios vhost fole to sites-available:
Code: Select all
cp /etc/httpd/conf.d/nagios.conf /etc/apache2/sites-available/
And then restart apache: