I am trying to monitor HTTP status with 404 or 403 page. As you all know Monit takes those pages as failed connection, but how could I change that. I just want to monitor that it shows the 404 or 403 page.
I need to check it with this config if its possible.
This is my check config:
check process httpd with pidfile /var/run/httpd.pid
start program = "/etc/init.d/httpd start"
stop program = "/etc/init.d/httpd stop"
if failed host hostname port 80
protocol HTTP request "/"
then exec "/bin/bash -c '/bin/echo -e "hostname\thttpd\t3\tFAILED" | /usr/sbin/send_nsca -H nagiosserver -c /etc/send_nsca.cfg; /usr/bin/monit restart nginx;'"