add support for monitoring the plc servers and api
[monitor.git] / nagios / monitor-nagios.init
index 6a5ac64..100dd95 100644 (file)
@@ -55,6 +55,15 @@ EOF
                htpasswd -b -c /etc/nagios/passwd nagiosadmin nagiospassword
        fi
 
+       # disable /etc/httpd/conf.d/nagios.conf restriction to only 127.0.0.1
+       if ( grep -q -E "^service_check_timeout=60" /etc/nagios/nagios.cfg ) ; then
+        # NOTE: PCU checks can take several minutes due to timeouts and internal delays
+               sed -i -e 's/service_check_timeout=.*/service_check_timeout=150/g' /etc/nagios/nagios.cfg 
+        # NOTE: All 'action' commands are in the notification category.
+        #       Complex actions such as 'repair.py' may take several minutes.
+               sed -i -e 's/notification_timeout=.*/notification_timeout=240/g' /etc/nagios/nagios.cfg 
+       fi
+
        # disable /etc/httpd/conf.d/nagios.conf restriction to only 127.0.0.1
        if ( grep -q -E "^   deny from all" /etc/httpd/conf.d/nagios.conf ) ; then
                sed -i -e 's/   deny from all/   #allow from all/g' /etc/httpd/conf.d/nagios.conf