maxc1017 发表于 2019-1-15 12:25:02

nagios localhost

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即可。




页: [1]
查看完整版本: nagios localhost