Nagios HTTP WARNING: HTTP/1.1 403 Forbidden

Whenever we newly setup the nagios server we mostly get this error “Nagios HTTP WARNING: HTTP/1.1 403 Forbidden”.
In dashboard it shows alert on localhost i.e our own newly set up nagios server.

http-nagios-error

To solve this alert, create a index.html file inside /var/www/html in server

touch /var/www/html/index.html

Restart the httpd and nagios service. Even without doing this it will clear the alert after a few minutes.

/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.

nagios-html-ok

OK do you want to know some more,let me explain some more part of troubleshooting steps.

You can use check_http plugin here with command line to check do the problem exist or not.
Have a look in below given blocks, how troubleshooting is done. I hope these steps are enough to explain.

[root@localhost html]# whoami
root
[root@localhost html]# /usr/lib/nagios/plugins/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
[root@localhost html]# 
[root@localhost html]# pwd
/var/www/html
[root@localhost html]#  touch index.html
[root@localhost html]# 
[root@localhost html]# /usr/lib/nagios/plugins/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
[root@localhost html]# 
[root@localhost html]#

Note: check your check_http plugin where it is located in server. In my case it was in /usr/lib/nagios/plugins/

7 thoughts on “Nagios HTTP WARNING: HTTP/1.1 403 Forbidden”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.