X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nagios%2Fmonitor-nagios.init;h=ab88aa7ba4525ea8d63d97f3f98a6c8b8c91c37a;hb=976e2654ef6da1dff75c0216338d4c9863e42a73;hp=6a5ac64a986022ca1919c16fc8cbfe9467cedc7f;hpb=f560f0061820009fdb69baff9c382bce1a0adc24;p=monitor.git diff --git a/nagios/monitor-nagios.init b/nagios/monitor-nagios.init index 6a5ac64..ab88aa7 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,8 +80,8 @@ EOF fi - 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 + if ! ( grep -q "cfg_file=/etc/nagios/objects/plcnodes.cfg" /etc/nagios/nagios.cfg ) ; then + echo "cfg_file=/etc/nagios/objects/plcnodes.cfg" >> /etc/nagios/nagios.cfg echo "cfg_file=/etc/nagios/objects/plcusers.cfg" >> /etc/nagios/nagios.cfg fi