Nagios HTTP WARNING: HTTP/1.1 403 Forbidden
最近新裝的Nagios,localhost总是会报警告:“WARNING: HTTP/1.1 403 Forbidden ”,今天下午得空Google了一番,找到一个解决方法分享出来。In dashboard it shows alert on localhost i.e our own newly set up nagios server.
http://s3.运维网.com/wyfs02/M01/58/B3/wKioL1S4uMyDsFUDAADSkhmfK5A589.jpg
在此目录创建一个index.html文件: /var/www/html
touch /var/www/html/index.html重启httpd和nagios服务,等待几分钟警告就自动清除了。
/etc/init.d/nagios restart
/etc/init.d/httpd restart
Wait for a few minutes the alert will be gone. Yes we are done here.
http://s3.运维网.com/wyfs02/M02/58/B5/wKiom1S4uGLDu655AAC6yITLRgE966.jpg
以下是操作步骤
# whoami
root
# /usr/local/nagios/libexec/check_http -I 127.0.0.1
HTTP WARNING: HTTP/1.1 403 Forbidden – 5237 bytes in 0.001 second response time |time=0.000719s;;;0.000000 size=5237B;;;0
# pwd
/var/www/html
# touch index.html
#service nagios restart
# service httpd restart
# /usr/local/nagios/libexec/check_http-I 127.0.0.1
HTTP OK: HTTP/1.1 200 OK – 265 bytes in 0.001 second response time |time=0.000574s;;;0.000000 size=265B;;;0
Note: check your check_http plugin where it is located in server. 我的主机上此文件在:/usr/local/nagios/libexec/check_http
页:
[1]