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
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