X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nagios%2Fmonitor-nagios.init;h=100dd956499769a40e43c73b66db0ec03eaffc05;hb=b409ce051ff5a7180f50bd1f359107acfebd5671;hp=8223ee31616771356d99269ec357c6cc6031e93a;hpb=145f2f31748357892139d5271f292c949bc9d062;p=monitor.git diff --git a/nagios/monitor-nagios.init b/nagios/monitor-nagios.init index 8223ee3..100dd95 100644 --- a/nagios/monitor-nagios.init +++ b/nagios/monitor-nagios.init @@ -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 @@ -71,7 +80,7 @@ EOF fi - if ! ( grep -q "cfg_file=/etc/nagios/objects/plc.cfg" /etc/nagios/nagios.cfg) ; then + if ! ( grep -q "cfg_file=/etc/nagios/objects/plc.cfg" /etc/nagios/nagios.cfg ) ; then echo "cfg_file=/etc/nagios/objects/plc.cfg" >> /etc/nagios/nagios.cfg echo "cfg_file=/etc/nagios/objects/plcusers.cfg" >> /etc/nagios/nagios.cfg fi