Search code examples
nagios

Nagios - HTTP WARNING: HTTP/1.1 403 Forbidden


I am using Nagios XI. I entered following command in order to monitor httpd service of the remote Linux server (128.19.5.131):

/usr/local/nagios/libexec/check_http -H 128.19.5.131

It is giving me following output:

HTTP WARNING: HTTP/1.1 403 Forbidden


Solution

  • I created a file with name index.html in the /var/www/html directory of the remote Linux machine (128.19.5.131). Restarted the HTTP service with service httpd restart and then executed the same command, i.e. :

    nagiossrv root [libexec] >/usr/local/nagios/libexec/check_http -H 128.19.5.131

    I got following output:

    HTTP OK HTTP/1.1 200 OK - 250 bytes in 0.001 seconds |time=0.000977s;;;0.000000 size=250B;;;0

    I do not know whether it is proper to add index.html file in the /var/www/html directory of each host to be monitored or not, but it is showing desired results in the Nagios XI console.