Whenever we newly setup the Nagios core server post installation we will see this warning alert “Nagios HTTP WARNING: HTTP/1.1 403 Forbidden”. In this article we will solve this problem.
Problem Statement
After installation of Nagios Core , you will find this warning on Host called ‘localhost’. In given below screenshot, the warning is shown in yellow colour.
Solution
To solve this warning alert, create a blank index.html file inside /var/www/html in Nagios Core server.
touch /var/www/html/index.html
Wait for a few minutes meanwhile the Nagios will check this alert again. Now check your Dashboard. Voila! the yellow warning is turned to green . You will also find in the ‘Status Information’ the message is showing the HTTP 200 status code.
Reason
Do you want to know reason ? Let us explain some more part of the troubleshooting steps.
You can use check_http plugin here with command line to check if the problem exist or not.
Have a look in given below code snippets.
Here we have executed the check_http plugin to check HTTP Status code of Nagios Server’s HTTP service. The error shows the HTTP status code 403, means the page is forbidden to access.
After placing the blank index.html in root folder of Apache the on recheck by Nagios it has solved the problem.
[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 our case it was in /usr/lib/nagios/plugins/
mi nie helped kurwa
Hi, it resolves for me, thank you!! Francesca
Thanks Buddy!
Regards
Sharad
Thanks, it was helpfull
Helped me thanks!
Thank you for giving us the feedback.
Thanks Batchen 🙂
Regards
Sharad
Thank you for your article