Nagios监控HTTP服务时,出现“HTTP WARNING: HTTP/1.1 403 Forbidden - 5237 bytes in 0.008 second response time ”。
check_http 是检测“/var/www/html/index.html”。当没有这个文件,就会有warn警告。
为了解决这个警告,你可以添加这个文件。执行脚本:
touch /var/www/html/index.html
重启apache和nagios,过2分钟后,warn警告会消失。
$ /etc/init.d/nagios restart
$ /etc/init.d/httpd restart