This script is to monitor a failure when Nagios daemons fails to start or sometimes Nagios stops sending alerts. When you check the logs at "/usr/local/nagios/var/log/nagios.log
" you might come across messages like "Caught SIGSEGV, shutting down".
These messages need to be monitored and then fixed so that Nagios works in a proper fashion. This would be monitored via Cronjob on the host as Nagios itself won't be able to detect the failure.