Nagios CHECK_HTTP Error HTTP WARNING: HTTP/1.1 403 Forbidden

less than 1 minute read

So, I was deploying a new server and added the default CHECK_HTTP Nagios plug-in as follows:


define service{
use host_name
service_description HTTP
check_command check_http
}

However, the check would come back as an 403 Forbidden error. I know we have some restrictions set on our http.conf to allow only internal IP addresses to the Apache server, but the Nagios server is in the internal network. Poked around the settings and configurations for awhile and could not see any issues as I was able to browse the default Apache page.

Looked a bit more and found that the CHECK_HTTP is actually looking for an index page in the root html location. So I ended up creating a dummy page for Nagios and the checks came back fine! I'm sure you could make something nicer but this is all I did in the /var/www/html directory:


echo "This is a dummy page for ." >> index.html

Works like a charm!

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...