CentOS下Nagios的安装与配置:准备工作、安装登录、错误处理
五、错误处理
1、本机监控HTTP SSH的Notifications显示警告错误,解决方法:
- #vim /usr/local/nagios/etc/objects/localhost.cfg
- define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description SSH
- check_command check_ssh
- notifications_enabled 1 #改为1,即可
- }
- # Define a service to check HTTP on the local machine.
- # Disable notifications for this service by default, as not all users may have HTTP enabled.
- define service{
- use local-service ; Name of service template to use
- host_name localhost
- service_description HTTP
- check_command check_http
- notifications_enabled 1 #改为1,即可
- }
2、Nagios显示类似错误: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即可。
上一节:安装登录 CentOS下Nagios的安装与配置就讲到这里啦。
【编辑推荐】