nagios localhost-http 报警错误

2、Nagios显示类似错误:HTTP WARNING: HTTP/1.1 403 Forbidden - 5240 bytes in 0.002 second response time.
ommand.cfg:
define command{
        command_name    check_http
        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
        }
localhost.cfg:
define service{
        use                             local-service        
        host_name                       localhost
        service_description             HTTP
        check_command                   check_http
        notifications_enabled           0
        }
手动执行:
/usr/local/nagios/libexec
# ./check_http -I 127.0.0.1
HTTP WARNING: HTTP/1.1 403 Forbidden - 5240 bytes in 0.002 second response time.
该错误表明在apache web根目录没有index.html文件。
解决方法:在web根目录(如:/var/www/html/目录)建立index.html文件,重启apache和nagios即可。
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章