Failed to start nagios
Posted: Wed Sep 02, 2015 8:42 am
hello!
Clean install of Nagios 4.1.1 on debian 8 jessie.
I followed the quickstart install: https://assets.nagios.com/downloads/nag ... buntu.html
Wich is outdated but i managed to use it. it still works, only 2 details did not work you need unzip and:
It failed, i then searched the internet: http://www.unixmen.com/how-to-install-n ... ntu-15-04/
but the real problem is this:
I did the "hack" for the init script (somewhere on the forum). it worked partly....it is very weird. a restart of the nagios services takes a very long time. the website says the service is running. but the restart command fails (after a long time).
Clean install of Nagios 4.1.1 on debian 8 jessie.
I followed the quickstart install: https://assets.nagios.com/downloads/nag ... buntu.html
Wich is outdated but i managed to use it. it still works, only 2 details did not work you need unzip and:
Code: Select all
5) Configure the Web Interface
Install the Nagios web config file in the Apache conf.d directory.
make install-webconfCode: Select all
Install Nagios Web interface:
Enter the following commands to compile and install nagios web interface.
sudo make install-webconf
You may get the following error:
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file ‘/etc/httpd/conf.d/nagios.conf’: No such file or directory
Makefile:296: recipe for target 'install-webconf' failed
make: *** [install-webconf] Error 1
The above error message describes that nagios is trying to create the nagios.conf file inside the /etc/httpd.conf/directory. But, in Ubuntu systems the nagios.conf file should be placed in /etc/apache2/sites-enabled/directory.
So, run the following command instead of using sudo make install-webconf.
sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf
Check if nagios.conf is placed in /etc/apache2/sites-enabled directory.
sudo ls -l /etc/apache2/sites-enabled/
Sample output:
total 4
lrwxrwxrwx 1 root root 35 Aug 4 15:54 000-default.conf -> ../sites-available/000-default.conf
-rw-r--r-- 1 root root 982 Aug 4 16:19 nagios.confCode: Select all
/etc/init.d/nagios start
[....] Starting nagios (via systemctl): nagios.serviceFailed to start nagios.service: Unit nagios.service failed to load: No such file or directory.
failed!
service nagios start
Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory.