Nagios Woudn't Start, now won't Stop!

Solution 1:

If you don't want to change the permissions on the /var/run folder itself, you can configure nagios to store the lock file anywhere on the system by adding the line below to your nagios.cfg file. As long as you point the lock_file option to a directory that nagios has access to create, modify and delete files then you should be good to go.

You could even store the lock file within your nagios installation directory by creating a a directory like: /usr/lib/nagios/var

lock_file=/usr/lib/nagios/var

Solution 2:

First, find out what the pid of nagios process is:

$ ps aux | grep nagios

Then you can use this command to restart the service:

kill -HUP <nagios_pid>

and this to stop:

kill <nagios_pid>

To stop nagios automatically , you should have its pid in /var/run/nagios.pid. Check it.