Hello,
Hopefully this is the right approach for patch submission. This
patch adds support for a Host: header in the http process check
module. This allows the checking of an apache instance that serves
virtual hosts but throws
a 404 or other such error on the default host.
I did a cursory test on this using the config:
check process test with pidfile "/tmp/test.pid"
start program = "/bin/bash -c 'echo $$ > /tmp/test.pid ; /usr/bin/
nc -k -l 6000 | tee /tmp/test.txt'"
stop program = "/bin/false"
if failed host localhost port 6000 protocol http and request '/
testing' hostheader 'example.com' with timeout 20 seconds for 2
cycles then restart
This produced the request:
GET /testing HTTP/1.1
Host: example.com
Accept: */*
Connection: close
User-Agent: monit/5.1
Please let me know if you have any comments, questions, or if I have
done this completely wrong. =)