Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
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.conf
/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.
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).
I am still figuring out how to make it run at startup/reboot. there are some errors. but i think i can manage that. (i hope ) (edit: it runs at startup successfully now)
I am still figuring out how to make it run at startup/reboot. there are some errors. but i think i can manage that. (i hope ) (edit: it runs at startup successfully now)
Glad to hear that you have it working so far. I'll leave this thread open in case you want to include any specific errors for us to troubleshoot with you.