清空temp目录
rm -rf /var/www/nconf/temp/*
执行
/var/www/nconf/bin/generate_config.pl
删除原来配置文件
rm -rf /usr/local/nagios/etc/Default_collector
rm -rf /usr/local/nagios/etc/global
mv /var/www/nconf/temp/Default_collector /usr/local/nagios/etc/
mv /var/www/nconf/temp/global /usr/local/nagios/etc/
rm -rf /var/www/nconf/temp/*
校验
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg